generated-configure.sh revision 927:5d71dcd42e73
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637LIBCXX
638LLVM_LIBS
639LLVM_LDFLAGS
640LLVM_CFLAGS
641LLVM_CONFIG
642LIBFFI_LIBS
643LIBFFI_CFLAGS
644STATIC_CXX_SETTING
645LIBDL
646LIBM
647LIBZIP_CAN_USE_MMAP
648USE_EXTERNAL_LIBZ
649USE_EXTERNAL_LIBGIF
650USE_EXTERNAL_LIBJPEG
651ALSA_LIBS
652ALSA_CFLAGS
653FREETYPE_BUNDLE_LIB_PATH
654FREETYPE_LIBS
655FREETYPE_CFLAGS
656CUPS_CFLAGS
657OPENWIN_HOME
658X_EXTRA_LIBS
659X_LIBS
660X_PRE_LIBS
661X_CFLAGS
662XMKMF
663FIXPATH
664CXXFLAGS_DEBUG_SYMBOLS
665CFLAGS_DEBUG_SYMBOLS
666ZIP_DEBUGINFO_FILES
667ENABLE_DEBUG_SYMBOLS
668COMPILER_SUPPORTS_TARGET_BITS_FLAG
669ZERO_ARCHFLAG
670LDFLAGS_CXX_JDK
671LDFLAGS_JDKEXE_SUFFIX
672LDFLAGS_JDKLIB_SUFFIX
673LDFLAGS_JDKEXE
674LDFLAGS_JDKLIB
675CXXFLAGS_JDKEXE
676CXXFLAGS_JDKLIB
677CFLAGS_JDKEXE
678CFLAGS_JDKLIB
679MACOSX_VERSION_MIN
680PACKAGE_PATH
681LEGACY_EXTRA_LDFLAGS
682LEGACY_EXTRA_CXXFLAGS
683LEGACY_EXTRA_CFLAGS
684CXX_FLAG_DEPS
685C_FLAG_DEPS
686CXX_O_FLAG_NONE
687CXX_O_FLAG_NORM
688CXX_O_FLAG_HI
689CXX_O_FLAG_HIGHEST
690C_O_FLAG_NONE
691C_O_FLAG_NORM
692C_O_FLAG_HI
693C_O_FLAG_HIGHEST
694POST_MCS_CMD
695POST_STRIP_CMD
696SET_EXECUTABLE_ORIGIN
697SET_SHARED_LIBRARY_ORIGIN
698CXX_FLAG_REORDER
699C_FLAG_REORDER
700SET_SHARED_LIBRARY_MAPFILE
701SET_SHARED_LIBRARY_NAME
702SHARED_LIBRARY_FLAGS
703EXE_SUFFIX
704STATIC_LIBRARY_SUFFIX
705SHARED_LIBRARY_SUFFIX
706LIBRARY_PREFIX
707STATIC_LIBRARY
708SHARED_LIBRARY
709OBJ_SUFFIX
710COMPILER_NAME
711JT_HOME
712JTREGEXE
713LIPO
714ac_ct_OBJDUMP
715OBJDUMP
716ac_ct_OBJCOPY
717OBJCOPY
718MCS
719STRIP
720GNM
721NM
722AS
723CXXCPP
724CPP
725COMPILER_TYPE
726RC_FLAGS
727DUMPBIN
728WINAR
729HOTSPOT_RC
730HOTSPOT_MT
731RC
732MT
733WINLD
734HOTSPOT_LD
735HOTSPOT_CXX
736ARFLAGS
737AR
738LDEXECXX
739LDCXX
740LDEXE
741LD
742ac_ct_OBJC
743OBJCFLAGS
744OBJC
745ac_ct_CXX
746CXXFLAGS
747CXX
748ac_ct_PROPER_COMPILER_CXX
749PROPER_COMPILER_CXX
750POTENTIAL_CXX
751TOOLS_DIR_CXX
752OBJEXT
753EXEEXT
754ac_ct_CC
755CPPFLAGS
756LDFLAGS
757CFLAGS
758CC
759ac_ct_PROPER_COMPILER_CC
760PROPER_COMPILER_CC
761POTENTIAL_CC
762TOOLS_DIR_CC
763BUILD_LD
764BUILD_CXX
765BUILD_CC
766MSVCR_DLL
767VS_PATH
768VS_LIB
769VS_INCLUDE
770CYGWIN_LINK
771AR_OUT_OPTION
772LD_OUT_OPTION
773EXE_OUT_OPTION
774CC_OUT_OPTION
775BUILD_HOTSPOT
776HOTSPOT_DIST
777BUILD_OUTPUT
778OVERRIDE_SRC_ROOT
779ADD_SRC_ROOT
780JDK_TOPDIR
781NASHORN_TOPDIR
782HOTSPOT_TOPDIR
783JAXWS_TOPDIR
784JAXP_TOPDIR
785CORBA_TOPDIR
786LANGTOOLS_TOPDIR
787BOOT_JDK_JVMARGS
788JAVAC_FLAGS
789BOOT_JDK_SOURCETARGET
790BOOT_JDK
791BOOT_TOOLSJAR
792BOOT_RTJAR
793JAVA_CHECK
794JAVAC_CHECK
795COOKED_BUILD_NUMBER
796JDK_VERSION
797COPYRIGHT_YEAR
798MACOSX_BUNDLE_ID_BASE
799MACOSX_BUNDLE_NAME_BASE
800COMPANY_NAME
801JDK_RC_PLATFORM_NAME
802PRODUCT_SUFFIX
803PRODUCT_NAME
804LAUNCHER_NAME
805MILESTONE
806JDK_BUILD_NUMBER
807JDK_UPDATE_VERSION
808JDK_MICRO_VERSION
809JDK_MINOR_VERSION
810JDK_MAJOR_VERSION
811USER_RELEASE_SUFFIX
812COMPRESS_JARS
813UNLIMITED_CRYPTO
814CACERTS_FILE
815TEST_IN_BUILD
816BUILD_HEADLESS
817SUPPORT_HEADFUL
818SUPPORT_HEADLESS
819BDEPS_FTP
820BDEPS_UNZIP
821OS_VERSION_MICRO
822OS_VERSION_MINOR
823OS_VERSION_MAJOR
824PKG_CONFIG
825CODESIGN
826XATTR
827DSYMUTIL
828IS_GNU_TIME
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853INCLUDE_SA
854JVM_VARIANT_ZEROSHARK
855JVM_VARIANT_ZERO
856JVM_VARIANT_KERNEL
857JVM_VARIANT_MINIMAL1
858JVM_VARIANT_CLIENT
859JVM_VARIANT_SERVER
860JVM_VARIANTS
861JDK_VARIANT
862SET_OPENJDK
863BUILD_LOG_WRAPPER
864BUILD_LOG_PREVIOUS
865BUILD_LOG
866SYS_ROOT
867PATH_SEP
868SRC_ROOT
869ZERO_ARCHDEF
870DEFINE_CROSS_COMPILE_ARCH
871LP64
872OPENJDK_TARGET_OS_EXPORT_DIR
873OPENJDK_TARGET_OS_API_DIR
874OPENJDK_TARGET_CPU_JLI_CFLAGS
875OPENJDK_TARGET_CPU_OSARCH
876OPENJDK_TARGET_CPU_ISADIR
877OPENJDK_TARGET_CPU_LIBDIR
878OPENJDK_TARGET_CPU_LEGACY_LIB
879OPENJDK_TARGET_CPU_LEGACY
880REQUIRED_OS_VERSION
881REQUIRED_OS_NAME
882COMPILE_TYPE
883OPENJDK_TARGET_CPU_ENDIAN
884OPENJDK_TARGET_CPU_BITS
885OPENJDK_TARGET_CPU_ARCH
886OPENJDK_TARGET_CPU
887OPENJDK_TARGET_OS_API
888OPENJDK_TARGET_OS
889OPENJDK_BUILD_CPU_ENDIAN
890OPENJDK_BUILD_CPU_BITS
891OPENJDK_BUILD_CPU_ARCH
892OPENJDK_BUILD_CPU
893OPENJDK_BUILD_OS_API
894OPENJDK_BUILD_OS
895OPENJDK_BUILD_AUTOCONF_NAME
896OPENJDK_TARGET_AUTOCONF_NAME
897target_os
898target_vendor
899target_cpu
900target
901host_os
902host_vendor
903host_cpu
904host
905build_os
906build_vendor
907build_cpu
908build
909SETFILE
910DF
911READLINK
912CYGPATH
913NAWK
914SED
915FGREP
916EGREP
917GREP
918AWK
919XARGS
920WHICH
921WC
922UNIQ
923UNAME
924TR
925TOUCH
926TEE
927TAR
928TAIL
929SORT
930SH
931RM
932PRINTF
933MV
934MKTEMP
935MKDIR
936LS
937LN
938HEAD
939FIND
940FILE
941EXPR
942ECHO
943DIRNAME
944DIFF
945DATE
946CUT
947CPIO
948CP
949COMM
950CMP
951CHMOD
952CAT
953BASH
954BASENAME
955DATE_WHEN_CONFIGURED
956CONFIGURE_COMMAND_LINE
957CUSTOM_MAKE_DIR
958target_alias
959host_alias
960build_alias
961LIBS
962ECHO_T
963ECHO_N
964ECHO_C
965DEFS
966mandir
967localedir
968libdir
969psdir
970pdfdir
971dvidir
972htmldir
973infodir
974docdir
975oldincludedir
976includedir
977localstatedir
978sharedstatedir
979sysconfdir
980datadir
981datarootdir
982libexecdir
983sbindir
984bindir
985program_transform_name
986prefix
987exec_prefix
988PACKAGE_URL
989PACKAGE_BUGREPORT
990PACKAGE_STRING
991PACKAGE_VERSION
992PACKAGE_TARNAME
993PACKAGE_NAME
994PATH_SEPARATOR
995SHELL'
996ac_subst_files=''
997ac_user_opts='
998enable_option_checking
999with_custom_make_dir
1000with_target_bits
1001with_sys_root
1002with_tools_dir
1003with_devkit
1004enable_openjdk_only
1005with_jdk_variant
1006with_jvm_variants
1007enable_debug
1008with_debug_level
1009with_conf_name
1010with_builddeps_conf
1011with_builddeps_server
1012with_builddeps_dir
1013with_builddeps_group
1014enable_headful
1015enable_hotspot_test_in_build
1016with_cacerts_file
1017enable_unlimited_crypto
1018with_milestone
1019with_update_version
1020with_user_release_suffix
1021with_build_number
1022with_boot_jdk
1023with_boot_jdk_jvmargs
1024with_add_source_root
1025with_override_source_root
1026with_adds_and_overrides
1027with_override_langtools
1028with_override_corba
1029with_override_jaxp
1030with_override_jaxws
1031with_override_hotspot
1032with_override_nashorn
1033with_override_jdk
1034with_import_hotspot
1035with_msvcr_dll
1036with_dxsdk
1037with_dxsdk_lib
1038with_dxsdk_include
1039with_jtreg
1040with_extra_cflags
1041with_extra_cxxflags
1042with_extra_ldflags
1043enable_debug_symbols
1044enable_zip_debug_info
1045enable_macosx_runtime_support
1046with_x
1047with_cups
1048with_cups_include
1049with_freetype
1050with_freetype_include
1051with_freetype_lib
1052enable_freetype_bundling
1053with_alsa
1054with_alsa_include
1055with_alsa_lib
1056with_giflib
1057with_zlib
1058with_stdc__lib
1059with_num_cores
1060with_memory_size
1061with_jobs
1062with_sjavac_server_java
1063enable_sjavac
1064enable_precompiled_headers
1065enable_ccache
1066with_ccache_dir
1067'
1068      ac_precious_vars='build_alias
1069host_alias
1070target_alias
1071PKG_CONFIG
1072CC
1073CFLAGS
1074LDFLAGS
1075LIBS
1076CPPFLAGS
1077CXX
1078CXXFLAGS
1079CCC
1080OBJC
1081OBJCFLAGS
1082CPP
1083CXXCPP
1084XMKMF
1085FREETYPE_CFLAGS
1086FREETYPE_LIBS
1087ALSA_CFLAGS
1088ALSA_LIBS
1089LIBFFI_CFLAGS
1090LIBFFI_LIBS'
1091
1092
1093# Initialize some variables set by options.
1094ac_init_help=
1095ac_init_version=false
1096ac_unrecognized_opts=
1097ac_unrecognized_sep=
1098# The variables have the same names as the options, with
1099# dashes changed to underlines.
1100cache_file=/dev/null
1101exec_prefix=NONE
1102no_create=
1103no_recursion=
1104prefix=NONE
1105program_prefix=NONE
1106program_suffix=NONE
1107program_transform_name=s,x,x,
1108silent=
1109site=
1110srcdir=
1111verbose=
1112x_includes=NONE
1113x_libraries=NONE
1114
1115# Installation directory options.
1116# These are left unexpanded so users can "make install exec_prefix=/foo"
1117# and all the variables that are supposed to be based on exec_prefix
1118# by default will actually change.
1119# Use braces instead of parens because sh, perl, etc. also accept them.
1120# (The list follows the same order as the GNU Coding Standards.)
1121bindir='${exec_prefix}/bin'
1122sbindir='${exec_prefix}/sbin'
1123libexecdir='${exec_prefix}/libexec'
1124datarootdir='${prefix}/share'
1125datadir='${datarootdir}'
1126sysconfdir='${prefix}/etc'
1127sharedstatedir='${prefix}/com'
1128localstatedir='${prefix}/var'
1129includedir='${prefix}/include'
1130oldincludedir='/usr/include'
1131docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1132infodir='${datarootdir}/info'
1133htmldir='${docdir}'
1134dvidir='${docdir}'
1135pdfdir='${docdir}'
1136psdir='${docdir}'
1137libdir='${exec_prefix}/lib'
1138localedir='${datarootdir}/locale'
1139mandir='${datarootdir}/man'
1140
1141ac_prev=
1142ac_dashdash=
1143for ac_option
1144do
1145  # If the previous option needs an argument, assign it.
1146  if test -n "$ac_prev"; then
1147    eval $ac_prev=\$ac_option
1148    ac_prev=
1149    continue
1150  fi
1151
1152  case $ac_option in
1153  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1154  *=)   ac_optarg= ;;
1155  *)    ac_optarg=yes ;;
1156  esac
1157
1158  # Accept the important Cygnus configure options, so we can diagnose typos.
1159
1160  case $ac_dashdash$ac_option in
1161  --)
1162    ac_dashdash=yes ;;
1163
1164  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1165    ac_prev=bindir ;;
1166  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1167    bindir=$ac_optarg ;;
1168
1169  -build | --build | --buil | --bui | --bu)
1170    ac_prev=build_alias ;;
1171  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1172    build_alias=$ac_optarg ;;
1173
1174  -cache-file | --cache-file | --cache-fil | --cache-fi \
1175  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1176    ac_prev=cache_file ;;
1177  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1178  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1179    cache_file=$ac_optarg ;;
1180
1181  --config-cache | -C)
1182    cache_file=config.cache ;;
1183
1184  -datadir | --datadir | --datadi | --datad)
1185    ac_prev=datadir ;;
1186  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1187    datadir=$ac_optarg ;;
1188
1189  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1190  | --dataroo | --dataro | --datar)
1191    ac_prev=datarootdir ;;
1192  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1193  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1194    datarootdir=$ac_optarg ;;
1195
1196  -disable-* | --disable-*)
1197    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1198    # Reject names that are not valid shell variable names.
1199    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1200      as_fn_error $? "invalid feature name: $ac_useropt"
1201    ac_useropt_orig=$ac_useropt
1202    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203    case $ac_user_opts in
1204      *"
1205"enable_$ac_useropt"
1206"*) ;;
1207      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1208	 ac_unrecognized_sep=', ';;
1209    esac
1210    eval enable_$ac_useropt=no ;;
1211
1212  -docdir | --docdir | --docdi | --doc | --do)
1213    ac_prev=docdir ;;
1214  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1215    docdir=$ac_optarg ;;
1216
1217  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1218    ac_prev=dvidir ;;
1219  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1220    dvidir=$ac_optarg ;;
1221
1222  -enable-* | --enable-*)
1223    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1224    # Reject names that are not valid shell variable names.
1225    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226      as_fn_error $? "invalid feature name: $ac_useropt"
1227    ac_useropt_orig=$ac_useropt
1228    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229    case $ac_user_opts in
1230      *"
1231"enable_$ac_useropt"
1232"*) ;;
1233      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1234	 ac_unrecognized_sep=', ';;
1235    esac
1236    eval enable_$ac_useropt=\$ac_optarg ;;
1237
1238  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1239  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1240  | --exec | --exe | --ex)
1241    ac_prev=exec_prefix ;;
1242  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1243  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1244  | --exec=* | --exe=* | --ex=*)
1245    exec_prefix=$ac_optarg ;;
1246
1247  -gas | --gas | --ga | --g)
1248    # Obsolete; use --with-gas.
1249    with_gas=yes ;;
1250
1251  -help | --help | --hel | --he | -h)
1252    ac_init_help=long ;;
1253  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1254    ac_init_help=recursive ;;
1255  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1256    ac_init_help=short ;;
1257
1258  -host | --host | --hos | --ho)
1259    ac_prev=host_alias ;;
1260  -host=* | --host=* | --hos=* | --ho=*)
1261    host_alias=$ac_optarg ;;
1262
1263  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1264    ac_prev=htmldir ;;
1265  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1266  | --ht=*)
1267    htmldir=$ac_optarg ;;
1268
1269  -includedir | --includedir | --includedi | --included | --include \
1270  | --includ | --inclu | --incl | --inc)
1271    ac_prev=includedir ;;
1272  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1273  | --includ=* | --inclu=* | --incl=* | --inc=*)
1274    includedir=$ac_optarg ;;
1275
1276  -infodir | --infodir | --infodi | --infod | --info | --inf)
1277    ac_prev=infodir ;;
1278  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1279    infodir=$ac_optarg ;;
1280
1281  -libdir | --libdir | --libdi | --libd)
1282    ac_prev=libdir ;;
1283  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1284    libdir=$ac_optarg ;;
1285
1286  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1287  | --libexe | --libex | --libe)
1288    ac_prev=libexecdir ;;
1289  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1290  | --libexe=* | --libex=* | --libe=*)
1291    libexecdir=$ac_optarg ;;
1292
1293  -localedir | --localedir | --localedi | --localed | --locale)
1294    ac_prev=localedir ;;
1295  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1296    localedir=$ac_optarg ;;
1297
1298  -localstatedir | --localstatedir | --localstatedi | --localstated \
1299  | --localstate | --localstat | --localsta | --localst | --locals)
1300    ac_prev=localstatedir ;;
1301  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1302  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1303    localstatedir=$ac_optarg ;;
1304
1305  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1306    ac_prev=mandir ;;
1307  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1308    mandir=$ac_optarg ;;
1309
1310  -nfp | --nfp | --nf)
1311    # Obsolete; use --without-fp.
1312    with_fp=no ;;
1313
1314  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1315  | --no-cr | --no-c | -n)
1316    no_create=yes ;;
1317
1318  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1319  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1320    no_recursion=yes ;;
1321
1322  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1323  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1324  | --oldin | --oldi | --old | --ol | --o)
1325    ac_prev=oldincludedir ;;
1326  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1327  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1328  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1329    oldincludedir=$ac_optarg ;;
1330
1331  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1332    ac_prev=prefix ;;
1333  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1334    prefix=$ac_optarg ;;
1335
1336  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1337  | --program-pre | --program-pr | --program-p)
1338    ac_prev=program_prefix ;;
1339  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1340  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1341    program_prefix=$ac_optarg ;;
1342
1343  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1344  | --program-suf | --program-su | --program-s)
1345    ac_prev=program_suffix ;;
1346  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1347  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1348    program_suffix=$ac_optarg ;;
1349
1350  -program-transform-name | --program-transform-name \
1351  | --program-transform-nam | --program-transform-na \
1352  | --program-transform-n | --program-transform- \
1353  | --program-transform | --program-transfor \
1354  | --program-transfo | --program-transf \
1355  | --program-trans | --program-tran \
1356  | --progr-tra | --program-tr | --program-t)
1357    ac_prev=program_transform_name ;;
1358  -program-transform-name=* | --program-transform-name=* \
1359  | --program-transform-nam=* | --program-transform-na=* \
1360  | --program-transform-n=* | --program-transform-=* \
1361  | --program-transform=* | --program-transfor=* \
1362  | --program-transfo=* | --program-transf=* \
1363  | --program-trans=* | --program-tran=* \
1364  | --progr-tra=* | --program-tr=* | --program-t=*)
1365    program_transform_name=$ac_optarg ;;
1366
1367  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1368    ac_prev=pdfdir ;;
1369  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1370    pdfdir=$ac_optarg ;;
1371
1372  -psdir | --psdir | --psdi | --psd | --ps)
1373    ac_prev=psdir ;;
1374  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1375    psdir=$ac_optarg ;;
1376
1377  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1378  | -silent | --silent | --silen | --sile | --sil)
1379    silent=yes ;;
1380
1381  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1382    ac_prev=sbindir ;;
1383  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1384  | --sbi=* | --sb=*)
1385    sbindir=$ac_optarg ;;
1386
1387  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1388  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1389  | --sharedst | --shareds | --shared | --share | --shar \
1390  | --sha | --sh)
1391    ac_prev=sharedstatedir ;;
1392  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1393  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1394  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1395  | --sha=* | --sh=*)
1396    sharedstatedir=$ac_optarg ;;
1397
1398  -site | --site | --sit)
1399    ac_prev=site ;;
1400  -site=* | --site=* | --sit=*)
1401    site=$ac_optarg ;;
1402
1403  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1404    ac_prev=srcdir ;;
1405  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1406    srcdir=$ac_optarg ;;
1407
1408  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1409  | --syscon | --sysco | --sysc | --sys | --sy)
1410    ac_prev=sysconfdir ;;
1411  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1412  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1413    sysconfdir=$ac_optarg ;;
1414
1415  -target | --target | --targe | --targ | --tar | --ta | --t)
1416    ac_prev=target_alias ;;
1417  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1418    target_alias=$ac_optarg ;;
1419
1420  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1421    verbose=yes ;;
1422
1423  -version | --version | --versio | --versi | --vers | -V)
1424    ac_init_version=: ;;
1425
1426  -with-* | --with-*)
1427    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1428    # Reject names that are not valid shell variable names.
1429    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1430      as_fn_error $? "invalid package name: $ac_useropt"
1431    ac_useropt_orig=$ac_useropt
1432    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1433    case $ac_user_opts in
1434      *"
1435"with_$ac_useropt"
1436"*) ;;
1437      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1438	 ac_unrecognized_sep=', ';;
1439    esac
1440    eval with_$ac_useropt=\$ac_optarg ;;
1441
1442  -without-* | --without-*)
1443    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1444    # Reject names that are not valid shell variable names.
1445    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1446      as_fn_error $? "invalid package name: $ac_useropt"
1447    ac_useropt_orig=$ac_useropt
1448    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1449    case $ac_user_opts in
1450      *"
1451"with_$ac_useropt"
1452"*) ;;
1453      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1454	 ac_unrecognized_sep=', ';;
1455    esac
1456    eval with_$ac_useropt=no ;;
1457
1458  --x)
1459    # Obsolete; use --with-x.
1460    with_x=yes ;;
1461
1462  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1463  | --x-incl | --x-inc | --x-in | --x-i)
1464    ac_prev=x_includes ;;
1465  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1466  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1467    x_includes=$ac_optarg ;;
1468
1469  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1470  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1471    ac_prev=x_libraries ;;
1472  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1473  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1474    x_libraries=$ac_optarg ;;
1475
1476  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1477Try \`$0 --help' for more information"
1478    ;;
1479
1480  *=*)
1481    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1482    # Reject names that are not valid shell variable names.
1483    case $ac_envvar in #(
1484      '' | [0-9]* | *[!_$as_cr_alnum]* )
1485      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1486    esac
1487    eval $ac_envvar=\$ac_optarg
1488    export $ac_envvar ;;
1489
1490  *)
1491    # FIXME: should be removed in autoconf 3.0.
1492    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1493    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1494      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1495    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1496    ;;
1497
1498  esac
1499done
1500
1501if test -n "$ac_prev"; then
1502  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1503  as_fn_error $? "missing argument to $ac_option"
1504fi
1505
1506if test -n "$ac_unrecognized_opts"; then
1507  case $enable_option_checking in
1508    no) ;;
1509    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1510    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1511  esac
1512fi
1513
1514# Check all directory arguments for consistency.
1515for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1516		datadir sysconfdir sharedstatedir localstatedir includedir \
1517		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1518		libdir localedir mandir
1519do
1520  eval ac_val=\$$ac_var
1521  # Remove trailing slashes.
1522  case $ac_val in
1523    */ )
1524      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1525      eval $ac_var=\$ac_val;;
1526  esac
1527  # Be sure to have absolute directory names.
1528  case $ac_val in
1529    [\\/$]* | ?:[\\/]* )  continue;;
1530    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1531  esac
1532  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1533done
1534
1535# There might be people who depend on the old broken behavior: `$host'
1536# used to hold the argument of --host etc.
1537# FIXME: To remove some day.
1538build=$build_alias
1539host=$host_alias
1540target=$target_alias
1541
1542# FIXME: To remove some day.
1543if test "x$host_alias" != x; then
1544  if test "x$build_alias" = x; then
1545    cross_compiling=maybe
1546  elif test "x$build_alias" != "x$host_alias"; then
1547    cross_compiling=yes
1548  fi
1549fi
1550
1551ac_tool_prefix=
1552test -n "$host_alias" && ac_tool_prefix=$host_alias-
1553
1554test "$silent" = yes && exec 6>/dev/null
1555
1556
1557ac_pwd=`pwd` && test -n "$ac_pwd" &&
1558ac_ls_di=`ls -di .` &&
1559ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1560  as_fn_error $? "working directory cannot be determined"
1561test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1562  as_fn_error $? "pwd does not report name of working directory"
1563
1564
1565# Find the source files, if location was not specified.
1566if test -z "$srcdir"; then
1567  ac_srcdir_defaulted=yes
1568  # Try the directory containing this script, then the parent directory.
1569  ac_confdir=`$as_dirname -- "$as_myself" ||
1570$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1571	 X"$as_myself" : 'X\(//\)[^/]' \| \
1572	 X"$as_myself" : 'X\(//\)$' \| \
1573	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1574$as_echo X"$as_myself" |
1575    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1576	    s//\1/
1577	    q
1578	  }
1579	  /^X\(\/\/\)[^/].*/{
1580	    s//\1/
1581	    q
1582	  }
1583	  /^X\(\/\/\)$/{
1584	    s//\1/
1585	    q
1586	  }
1587	  /^X\(\/\).*/{
1588	    s//\1/
1589	    q
1590	  }
1591	  s/.*/./; q'`
1592  srcdir=$ac_confdir
1593  if test ! -r "$srcdir/$ac_unique_file"; then
1594    srcdir=..
1595  fi
1596else
1597  ac_srcdir_defaulted=no
1598fi
1599if test ! -r "$srcdir/$ac_unique_file"; then
1600  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1601  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1602fi
1603ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1604ac_abs_confdir=`(
1605	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1606	pwd)`
1607# When building in place, set srcdir=.
1608if test "$ac_abs_confdir" = "$ac_pwd"; then
1609  srcdir=.
1610fi
1611# Remove unnecessary trailing slashes from srcdir.
1612# Double slashes in file names in object file debugging info
1613# mess up M-x gdb in Emacs.
1614case $srcdir in
1615*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1616esac
1617for ac_var in $ac_precious_vars; do
1618  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1619  eval ac_env_${ac_var}_value=\$${ac_var}
1620  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1621  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1622done
1623
1624#
1625# Report the --help message.
1626#
1627if test "$ac_init_help" = "long"; then
1628  # Omit some internal or obsolete options to make the list less imposing.
1629  # This message is too long to be a string in the A/UX 3.1 sh.
1630  cat <<_ACEOF
1631\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1632
1633Usage: $0 [OPTION]... [VAR=VALUE]...
1634
1635To assign environment variables (e.g., CC, CFLAGS...), specify them as
1636VAR=VALUE.  See below for descriptions of some of the useful variables.
1637
1638Defaults for the options are specified in brackets.
1639
1640Configuration:
1641  -h, --help              display this help and exit
1642      --help=short        display options specific to this package
1643      --help=recursive    display the short help of all the included packages
1644  -V, --version           display version information and exit
1645  -q, --quiet, --silent   do not print \`checking ...' messages
1646      --cache-file=FILE   cache test results in FILE [disabled]
1647  -C, --config-cache      alias for \`--cache-file=config.cache'
1648  -n, --no-create         do not create output files
1649      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1650
1651Installation directories:
1652  --prefix=PREFIX         install architecture-independent files in PREFIX
1653                          [$ac_default_prefix]
1654  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1655                          [PREFIX]
1656
1657By default, \`make install' will install all the files in
1658\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1659an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1660for instance \`--prefix=\$HOME'.
1661
1662For better control, use the options below.
1663
1664Fine tuning of the installation directories:
1665  --bindir=DIR            user executables [EPREFIX/bin]
1666  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1667  --libexecdir=DIR        program executables [EPREFIX/libexec]
1668  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1669  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1670  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1671  --libdir=DIR            object code libraries [EPREFIX/lib]
1672  --includedir=DIR        C header files [PREFIX/include]
1673  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1674  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1675  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1676  --infodir=DIR           info documentation [DATAROOTDIR/info]
1677  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1678  --mandir=DIR            man documentation [DATAROOTDIR/man]
1679  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1680  --htmldir=DIR           html documentation [DOCDIR]
1681  --dvidir=DIR            dvi documentation [DOCDIR]
1682  --pdfdir=DIR            pdf documentation [DOCDIR]
1683  --psdir=DIR             ps documentation [DOCDIR]
1684_ACEOF
1685
1686  cat <<\_ACEOF
1687
1688X features:
1689  --x-includes=DIR    X include files are in DIR
1690  --x-libraries=DIR   X library files are in DIR
1691
1692System types:
1693  --build=BUILD     configure for building on BUILD [guessed]
1694  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1695  --target=TARGET   configure for building compilers for TARGET [HOST]
1696_ACEOF
1697fi
1698
1699if test -n "$ac_init_help"; then
1700  case $ac_init_help in
1701     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1702   esac
1703  cat <<\_ACEOF
1704
1705Optional Features:
1706  --disable-option-checking  ignore unrecognized --enable/--with options
1707  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1708  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1709  --enable-openjdk-only   suppress building custom source even if present
1710                          [disabled]
1711  --enable-debug          set the debug level to fastdebug (shorthand for
1712                          --with-debug-level=fastdebug) [disabled]
1713  --disable-headful       disable building headful support (graphical UI
1714                          support) [enabled]
1715  --enable-hotspot-test-in-build
1716                          run the Queens test after Hotspot build [disabled]
1717  --enable-unlimited-crypto
1718                          Enable unlimited crypto policy [disabled]
1719  --disable-debug-symbols disable generation of debug symbols [enabled]
1720  --disable-zip-debug-info
1721                          disable zipping of debug-info files [enabled]
1722  --enable-macosx-runtime-support
1723                          Deprecated. Option is kept for backwards
1724                          compatibility and is ignored
1725  --disable-freetype-bundling
1726                          disable bundling of the freetype library with the
1727                          build result [enabled on Windows or when using
1728                          --with-freetype, disabled otherwise]
1729  --enable-sjavac         use sjavac to do fast incremental compiles
1730                          [disabled]
1731  --disable-precompiled-headers
1732                          disable using precompiled headers when compiling C++
1733                          [enabled]
1734  --disable-ccache        disable using ccache to speed up recompilations
1735                          [enabled]
1736
1737Optional Packages:
1738  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1739  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1740  --with-custom-make-dir  use this directory for custom build/make files
1741  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1742                          support it), e.g. --with-target-bits=32 [guessed]
1743  --with-sys-root         pass this sys-root to the compilers and tools (for
1744                          cross-compiling)
1745  --with-tools-dir        search this directory for compilers and tools (for
1746                          cross-compiling)
1747  --with-devkit           use this directory as base for tools-dir and
1748                          sys-root (for cross-compiling)
1749  --with-jdk-variant      JDK variant to build (normal) [normal]
1750  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1751                          client, minimal1, kernel, zero, zeroshark) [server]
1752  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1753                          [release]
1754  --with-conf-name        use this as the name of the configuration [generated
1755                          from important configuration options]
1756  --with-builddeps-conf   use this configuration file for the builddeps
1757  --with-builddeps-server download and use build dependencies from this server
1758                          url
1759  --with-builddeps-dir    store downloaded build dependencies here
1760                          [/localhome/builddeps]
1761  --with-builddeps-group  chgrp the downloaded build dependencies to this
1762                          group
1763  --with-cacerts-file     specify alternative cacerts file
1764  --with-milestone        Set milestone value for build [internal]
1765  --with-update-version   Set update version value for build [b00]
1766  --with-user-release-suffix
1767                          Add a custom string to the version string if build
1768                          number isn't set.[username_builddateb00]
1769  --with-build-number     Set build number value for build [b00]
1770  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1771  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1772                          invocations of the Boot JDK, overriding the default
1773                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1774                          -enableassertions"
1775  --with-add-source-root  for each and every source directory, look in this
1776                          additional source root for the same directory; if it
1777                          exists and have files in it, include it in the build
1778  --with-override-source-root
1779                          for each and every source directory, look in this
1780                          override source root for the same directory; if it
1781                          exists, use that directory instead and ignore the
1782                          directory in the original source root
1783  --with-adds-and-overrides
1784                          use the subdirs 'adds' and 'overrides' in the
1785                          specified directory as add-source-root and
1786                          override-source-root
1787  --with-override-langtools
1788                          use this langtools dir for the build
1789  --with-override-corba   use this corba dir for the build
1790  --with-override-jaxp    use this jaxp dir for the build
1791  --with-override-jaxws   use this jaxws dir for the build
1792  --with-override-hotspot use this hotspot dir for the build
1793  --with-override-nashorn use this nashorn dir for the build
1794  --with-override-jdk     use this jdk dir for the build
1795  --with-import-hotspot   import hotspot binaries from this jdk image or
1796                          hotspot build dist dir instead of building from
1797                          source
1798  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1799                          only) [probed]
1800  --with-dxsdk            Deprecated. Option is kept for backwards
1801                          compatibility and is ignored
1802  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1803                          compatibility and is ignored
1804  --with-dxsdk-include    Deprecated. Option is kept for backwards
1805                          compatibility and is ignored
1806  --with-jtreg            Regression Test Harness [probed]
1807  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1808  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1809  --with-extra-ldflags    extra flags to be used when linking jdk
1810  --with-x                use the X Window System
1811  --with-cups             specify prefix directory for the cups package
1812                          (expecting the headers under PATH/include)
1813  --with-cups-include     specify directory for the cups include files
1814  --with-freetype         specify prefix directory for the freetype package
1815                          (expecting the libraries under PATH/lib and the
1816                          headers under PATH/include)
1817  --with-freetype-include specify directory for the freetype include files
1818  --with-freetype-lib     specify directory for the freetype library
1819  --with-alsa             specify prefix directory for the alsa package
1820                          (expecting the libraries under PATH/lib and the
1821                          headers under PATH/include)
1822  --with-alsa-include     specify directory for the alsa include files
1823  --with-alsa-lib         specify directory for the alsa library
1824  --with-giflib           use giflib from build system or OpenJDK source
1825                          (system, bundled) [bundled]
1826  --with-zlib             use zlib from build system or OpenJDK source
1827                          (system, bundled) [bundled]
1828  --with-stdc++lib=<static>,<dynamic>,<default>
1829                          force linking of the C++ runtime on Linux to either
1830                          static or dynamic, default is static with dynamic as
1831                          fallback
1832  --with-num-cores        number of cores in the build system, e.g.
1833                          --with-num-cores=8 [probed]
1834  --with-memory-size      memory (in MB) available in the build system, e.g.
1835                          --with-memory-size=1024 [probed]
1836  --with-jobs             number of parallel jobs to let make run [calculated
1837                          based on cores and memory]
1838  --with-sjavac-server-java
1839                          use this java binary for running the sjavac
1840                          background server [Boot JDK java]
1841  --with-ccache-dir       where to store ccache files [~/.ccache]
1842
1843Some influential environment variables:
1844  PKG_CONFIG  path to pkg-config utility
1845  CC          C compiler command
1846  CFLAGS      C compiler flags
1847  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1848              nonstandard directory <lib dir>
1849  LIBS        libraries to pass to the linker, e.g. -l<library>
1850  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1851              you have headers in a nonstandard directory <include dir>
1852  CXX         C++ compiler command
1853  CXXFLAGS    C++ compiler flags
1854  OBJC        Objective C compiler command
1855  OBJCFLAGS   Objective C compiler flags
1856  CPP         C preprocessor
1857  CXXCPP      C++ preprocessor
1858  XMKMF       Path to xmkmf, Makefile generator for X Window System
1859  FREETYPE_CFLAGS
1860              C compiler flags for FREETYPE, overriding pkg-config
1861  FREETYPE_LIBS
1862              linker flags for FREETYPE, overriding pkg-config
1863  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1864  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1865  LIBFFI_CFLAGS
1866              C compiler flags for LIBFFI, overriding pkg-config
1867  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1868
1869Use these variables to override the choices made by `configure' or to help
1870it to find libraries and programs with nonstandard names/locations.
1871
1872Report bugs to <build-dev@openjdk.java.net>.
1873OpenJDK home page: <http://openjdk.java.net>.
1874_ACEOF
1875ac_status=$?
1876fi
1877
1878if test "$ac_init_help" = "recursive"; then
1879  # If there are subdirs, report their specific --help.
1880  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1881    test -d "$ac_dir" ||
1882      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1883      continue
1884    ac_builddir=.
1885
1886case "$ac_dir" in
1887.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1888*)
1889  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1890  # A ".." for each directory in $ac_dir_suffix.
1891  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1892  case $ac_top_builddir_sub in
1893  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1894  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1895  esac ;;
1896esac
1897ac_abs_top_builddir=$ac_pwd
1898ac_abs_builddir=$ac_pwd$ac_dir_suffix
1899# for backward compatibility:
1900ac_top_builddir=$ac_top_build_prefix
1901
1902case $srcdir in
1903  .)  # We are building in place.
1904    ac_srcdir=.
1905    ac_top_srcdir=$ac_top_builddir_sub
1906    ac_abs_top_srcdir=$ac_pwd ;;
1907  [\\/]* | ?:[\\/]* )  # Absolute name.
1908    ac_srcdir=$srcdir$ac_dir_suffix;
1909    ac_top_srcdir=$srcdir
1910    ac_abs_top_srcdir=$srcdir ;;
1911  *) # Relative name.
1912    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1913    ac_top_srcdir=$ac_top_build_prefix$srcdir
1914    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1915esac
1916ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1917
1918    cd "$ac_dir" || { ac_status=$?; continue; }
1919    # Check for guested configure.
1920    if test -f "$ac_srcdir/configure.gnu"; then
1921      echo &&
1922      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1923    elif test -f "$ac_srcdir/configure"; then
1924      echo &&
1925      $SHELL "$ac_srcdir/configure" --help=recursive
1926    else
1927      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1928    fi || ac_status=$?
1929    cd "$ac_pwd" || { ac_status=$?; break; }
1930  done
1931fi
1932
1933test -n "$ac_init_help" && exit $ac_status
1934if $ac_init_version; then
1935  cat <<\_ACEOF
1936OpenJDK configure jdk8
1937generated by GNU Autoconf 2.69
1938
1939Copyright (C) 2012 Free Software Foundation, Inc.
1940This configure script is free software; the Free Software Foundation
1941gives unlimited permission to copy, distribute and modify it.
1942_ACEOF
1943  exit
1944fi
1945
1946## ------------------------ ##
1947## Autoconf initialization. ##
1948## ------------------------ ##
1949
1950# ac_fn_c_try_compile LINENO
1951# --------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_c_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_c_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_c_try_compile
1987
1988# ac_fn_cxx_try_compile LINENO
1989# ----------------------------
1990# Try to compile conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_cxx_try_compile ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  rm -f conftest.$ac_objext
1995  if { { ac_try="$ac_compile"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_compile") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } && {
2011	 test -z "$ac_cxx_werror_flag" ||
2012	 test ! -s conftest.err
2013       } && test -s conftest.$ac_objext; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019	ac_retval=1
2020fi
2021  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_cxx_try_compile
2025
2026# ac_fn_objc_try_compile LINENO
2027# -----------------------------
2028# Try to compile conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_objc_try_compile ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  rm -f conftest.$ac_objext
2033  if { { ac_try="$ac_compile"
2034case "(($ac_try" in
2035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2036  *) ac_try_echo=$ac_try;;
2037esac
2038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2039$as_echo "$ac_try_echo"; } >&5
2040  (eval "$ac_compile") 2>conftest.err
2041  ac_status=$?
2042  if test -s conftest.err; then
2043    grep -v '^ *+' conftest.err >conftest.er1
2044    cat conftest.er1 >&5
2045    mv -f conftest.er1 conftest.err
2046  fi
2047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2048  test $ac_status = 0; } && {
2049	 test -z "$ac_objc_werror_flag" ||
2050	 test ! -s conftest.err
2051       } && test -s conftest.$ac_objext; then :
2052  ac_retval=0
2053else
2054  $as_echo "$as_me: failed program was:" >&5
2055sed 's/^/| /' conftest.$ac_ext >&5
2056
2057	ac_retval=1
2058fi
2059  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2060  as_fn_set_status $ac_retval
2061
2062} # ac_fn_objc_try_compile
2063
2064# ac_fn_c_try_cpp LINENO
2065# ----------------------
2066# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2067ac_fn_c_try_cpp ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if { { ac_try="$ac_cpp conftest.$ac_ext"
2071case "(($ac_try" in
2072  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2073  *) ac_try_echo=$ac_try;;
2074esac
2075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2076$as_echo "$ac_try_echo"; } >&5
2077  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2078  ac_status=$?
2079  if test -s conftest.err; then
2080    grep -v '^ *+' conftest.err >conftest.er1
2081    cat conftest.er1 >&5
2082    mv -f conftest.er1 conftest.err
2083  fi
2084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2085  test $ac_status = 0; } > conftest.i && {
2086	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2087	 test ! -s conftest.err
2088       }; then :
2089  ac_retval=0
2090else
2091  $as_echo "$as_me: failed program was:" >&5
2092sed 's/^/| /' conftest.$ac_ext >&5
2093
2094    ac_retval=1
2095fi
2096  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2097  as_fn_set_status $ac_retval
2098
2099} # ac_fn_c_try_cpp
2100
2101# ac_fn_cxx_try_cpp LINENO
2102# ------------------------
2103# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2104ac_fn_cxx_try_cpp ()
2105{
2106  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107  if { { ac_try="$ac_cpp conftest.$ac_ext"
2108case "(($ac_try" in
2109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2110  *) ac_try_echo=$ac_try;;
2111esac
2112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2113$as_echo "$ac_try_echo"; } >&5
2114  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2115  ac_status=$?
2116  if test -s conftest.err; then
2117    grep -v '^ *+' conftest.err >conftest.er1
2118    cat conftest.er1 >&5
2119    mv -f conftest.er1 conftest.err
2120  fi
2121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2122  test $ac_status = 0; } > conftest.i && {
2123	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2124	 test ! -s conftest.err
2125       }; then :
2126  ac_retval=0
2127else
2128  $as_echo "$as_me: failed program was:" >&5
2129sed 's/^/| /' conftest.$ac_ext >&5
2130
2131    ac_retval=1
2132fi
2133  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2134  as_fn_set_status $ac_retval
2135
2136} # ac_fn_cxx_try_cpp
2137
2138# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2139# ---------------------------------------------------------
2140# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2141# the include files in INCLUDES and setting the cache variable VAR
2142# accordingly.
2143ac_fn_cxx_check_header_mongrel ()
2144{
2145  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2146  if eval \${$3+:} false; then :
2147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2148$as_echo_n "checking for $2... " >&6; }
2149if eval \${$3+:} false; then :
2150  $as_echo_n "(cached) " >&6
2151fi
2152eval ac_res=\$$3
2153	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2154$as_echo "$ac_res" >&6; }
2155else
2156  # Is the header compilable?
2157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2158$as_echo_n "checking $2 usability... " >&6; }
2159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h.  */
2161$4
2162#include <$2>
2163_ACEOF
2164if ac_fn_cxx_try_compile "$LINENO"; then :
2165  ac_header_compiler=yes
2166else
2167  ac_header_compiler=no
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2171$as_echo "$ac_header_compiler" >&6; }
2172
2173# Is the header present?
2174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2175$as_echo_n "checking $2 presence... " >&6; }
2176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h.  */
2178#include <$2>
2179_ACEOF
2180if ac_fn_cxx_try_cpp "$LINENO"; then :
2181  ac_header_preproc=yes
2182else
2183  ac_header_preproc=no
2184fi
2185rm -f conftest.err conftest.i conftest.$ac_ext
2186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2187$as_echo "$ac_header_preproc" >&6; }
2188
2189# So?  What about this header?
2190case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2191  yes:no: )
2192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2193$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2195$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2196    ;;
2197  no:yes:* )
2198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2199$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2201$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2202    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2203$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2205$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2206    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2207$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2208( $as_echo "## ----------------------------------------- ##
2209## Report this to build-dev@openjdk.java.net ##
2210## ----------------------------------------- ##"
2211     ) | sed "s/^/$as_me: WARNING:     /" >&2
2212    ;;
2213esac
2214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2215$as_echo_n "checking for $2... " >&6; }
2216if eval \${$3+:} false; then :
2217  $as_echo_n "(cached) " >&6
2218else
2219  eval "$3=\$ac_header_compiler"
2220fi
2221eval ac_res=\$$3
2222	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2223$as_echo "$ac_res" >&6; }
2224fi
2225  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226
2227} # ac_fn_cxx_check_header_mongrel
2228
2229# ac_fn_cxx_try_run LINENO
2230# ------------------------
2231# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2232# that executables *can* be run.
2233ac_fn_cxx_try_run ()
2234{
2235  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236  if { { ac_try="$ac_link"
2237case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_link") 2>&5
2244  ac_status=$?
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2247  { { case "(($ac_try" in
2248  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2249  *) ac_try_echo=$ac_try;;
2250esac
2251eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2252$as_echo "$ac_try_echo"; } >&5
2253  (eval "$ac_try") 2>&5
2254  ac_status=$?
2255  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2256  test $ac_status = 0; }; }; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: program exited with status $ac_status" >&5
2260       $as_echo "$as_me: failed program was:" >&5
2261sed 's/^/| /' conftest.$ac_ext >&5
2262
2263       ac_retval=$ac_status
2264fi
2265  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2266  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2267  as_fn_set_status $ac_retval
2268
2269} # ac_fn_cxx_try_run
2270
2271# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2272# ---------------------------------------------------------
2273# Tests whether HEADER exists and can be compiled using the include files in
2274# INCLUDES, setting the cache variable VAR accordingly.
2275ac_fn_cxx_check_header_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2279$as_echo_n "checking for $2... " >&6; }
2280if eval \${$3+:} false; then :
2281  $as_echo_n "(cached) " >&6
2282else
2283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h.  */
2285$4
2286#include <$2>
2287_ACEOF
2288if ac_fn_cxx_try_compile "$LINENO"; then :
2289  eval "$3=yes"
2290else
2291  eval "$3=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299
2300} # ac_fn_cxx_check_header_compile
2301
2302# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2303# ----------------------------------------------
2304# Tries to find the compile-time value of EXPR in a program that includes
2305# INCLUDES, setting VAR accordingly. Returns whether the value could be
2306# computed
2307ac_fn_cxx_compute_int ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if test "$cross_compiling" = yes; then
2311    # Depending upon the size, compute the lo and hi bounds.
2312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h.  */
2314$4
2315int
2316main ()
2317{
2318static int test_array [1 - 2 * !(($2) >= 0)];
2319test_array [0] = 0;
2320return test_array [0];
2321
2322  ;
2323  return 0;
2324}
2325_ACEOF
2326if ac_fn_cxx_try_compile "$LINENO"; then :
2327  ac_lo=0 ac_mid=0
2328  while :; do
2329    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h.  */
2331$4
2332int
2333main ()
2334{
2335static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336test_array [0] = 0;
2337return test_array [0];
2338
2339  ;
2340  return 0;
2341}
2342_ACEOF
2343if ac_fn_cxx_try_compile "$LINENO"; then :
2344  ac_hi=$ac_mid; break
2345else
2346  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2347			if test $ac_lo -le $ac_mid; then
2348			  ac_lo= ac_hi=
2349			  break
2350			fi
2351			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354  done
2355else
2356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h.  */
2358$4
2359int
2360main ()
2361{
2362static int test_array [1 - 2 * !(($2) < 0)];
2363test_array [0] = 0;
2364return test_array [0];
2365
2366  ;
2367  return 0;
2368}
2369_ACEOF
2370if ac_fn_cxx_try_compile "$LINENO"; then :
2371  ac_hi=-1 ac_mid=-1
2372  while :; do
2373    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h.  */
2375$4
2376int
2377main ()
2378{
2379static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2380test_array [0] = 0;
2381return test_array [0];
2382
2383  ;
2384  return 0;
2385}
2386_ACEOF
2387if ac_fn_cxx_try_compile "$LINENO"; then :
2388  ac_lo=$ac_mid; break
2389else
2390  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2391			if test $ac_mid -le $ac_hi; then
2392			  ac_lo= ac_hi=
2393			  break
2394			fi
2395			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398  done
2399else
2400  ac_lo= ac_hi=
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405# Binary search between lo and hi bounds.
2406while test "x$ac_lo" != "x$ac_hi"; do
2407  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411int
2412main ()
2413{
2414static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2415test_array [0] = 0;
2416return test_array [0];
2417
2418  ;
2419  return 0;
2420}
2421_ACEOF
2422if ac_fn_cxx_try_compile "$LINENO"; then :
2423  ac_hi=$ac_mid
2424else
2425  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428done
2429case $ac_lo in #((
2430?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2431'') ac_retval=1 ;;
2432esac
2433  else
2434    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435/* end confdefs.h.  */
2436$4
2437static long int longval () { return $2; }
2438static unsigned long int ulongval () { return $2; }
2439#include <stdio.h>
2440#include <stdlib.h>
2441int
2442main ()
2443{
2444
2445  FILE *f = fopen ("conftest.val", "w");
2446  if (! f)
2447    return 1;
2448  if (($2) < 0)
2449    {
2450      long int i = longval ();
2451      if (i != ($2))
2452	return 1;
2453      fprintf (f, "%ld", i);
2454    }
2455  else
2456    {
2457      unsigned long int i = ulongval ();
2458      if (i != ($2))
2459	return 1;
2460      fprintf (f, "%lu", i);
2461    }
2462  /* Do not output a trailing newline, as this causes \r\n confusion
2463     on some platforms.  */
2464  return ferror (f) || fclose (f) != 0;
2465
2466  ;
2467  return 0;
2468}
2469_ACEOF
2470if ac_fn_cxx_try_run "$LINENO"; then :
2471  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2472else
2473  ac_retval=1
2474fi
2475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2476  conftest.$ac_objext conftest.beam conftest.$ac_ext
2477rm -f conftest.val
2478
2479  fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_compute_int
2484
2485# ac_fn_cxx_try_link LINENO
2486# -------------------------
2487# Try to link conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_cxx_try_link ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  rm -f conftest.$ac_objext conftest$ac_exeext
2492  if { { ac_try="$ac_link"
2493case "(($ac_try" in
2494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2495  *) ac_try_echo=$ac_try;;
2496esac
2497eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2498$as_echo "$ac_try_echo"; } >&5
2499  (eval "$ac_link") 2>conftest.err
2500  ac_status=$?
2501  if test -s conftest.err; then
2502    grep -v '^ *+' conftest.err >conftest.er1
2503    cat conftest.er1 >&5
2504    mv -f conftest.er1 conftest.err
2505  fi
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; } && {
2508	 test -z "$ac_cxx_werror_flag" ||
2509	 test ! -s conftest.err
2510       } && test -s conftest$ac_exeext && {
2511	 test "$cross_compiling" = yes ||
2512	 test -x conftest$ac_exeext
2513       }; then :
2514  ac_retval=0
2515else
2516  $as_echo "$as_me: failed program was:" >&5
2517sed 's/^/| /' conftest.$ac_ext >&5
2518
2519	ac_retval=1
2520fi
2521  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2522  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2523  # interfere with the next link command; also delete a directory that is
2524  # left behind by Apple's compiler.  We do this before executing the actions.
2525  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2526  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2527  as_fn_set_status $ac_retval
2528
2529} # ac_fn_cxx_try_link
2530
2531# ac_fn_cxx_check_func LINENO FUNC VAR
2532# ------------------------------------
2533# Tests whether FUNC exists, setting the cache variable VAR accordingly
2534ac_fn_cxx_check_func ()
2535{
2536  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2538$as_echo_n "checking for $2... " >&6; }
2539if eval \${$3+:} false; then :
2540  $as_echo_n "(cached) " >&6
2541else
2542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2543/* end confdefs.h.  */
2544/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2545   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2546#define $2 innocuous_$2
2547
2548/* System header to define __stub macros and hopefully few prototypes,
2549    which can conflict with char $2 (); below.
2550    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2551    <limits.h> exists even on freestanding compilers.  */
2552
2553#ifdef __STDC__
2554# include <limits.h>
2555#else
2556# include <assert.h>
2557#endif
2558
2559#undef $2
2560
2561/* Override any GCC internal prototype to avoid an error.
2562   Use char because int might match the return type of a GCC
2563   builtin and then its argument prototype would still apply.  */
2564#ifdef __cplusplus
2565extern "C"
2566#endif
2567char $2 ();
2568/* The GNU C library defines this for functions which it implements
2569    to always fail with ENOSYS.  Some functions are actually named
2570    something starting with __ and the normal name is an alias.  */
2571#if defined __stub_$2 || defined __stub___$2
2572choke me
2573#endif
2574
2575int
2576main ()
2577{
2578return $2 ();
2579  ;
2580  return 0;
2581}
2582_ACEOF
2583if ac_fn_cxx_try_link "$LINENO"; then :
2584  eval "$3=yes"
2585else
2586  eval "$3=no"
2587fi
2588rm -f core conftest.err conftest.$ac_objext \
2589    conftest$ac_exeext conftest.$ac_ext
2590fi
2591eval ac_res=\$$3
2592	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2593$as_echo "$ac_res" >&6; }
2594  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2595
2596} # ac_fn_cxx_check_func
2597
2598# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2599# -------------------------------------------------------
2600# Tests whether HEADER exists and can be compiled using the include files in
2601# INCLUDES, setting the cache variable VAR accordingly.
2602ac_fn_c_check_header_compile ()
2603{
2604  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2606$as_echo_n "checking for $2... " >&6; }
2607if eval \${$3+:} false; then :
2608  $as_echo_n "(cached) " >&6
2609else
2610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_c_try_compile "$LINENO"; then :
2616  eval "$3=yes"
2617else
2618  eval "$3=no"
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2626
2627} # ac_fn_c_check_header_compile
2628cat >config.log <<_ACEOF
2629This file contains any messages produced by compilers while
2630running configure, to aid debugging if configure makes a mistake.
2631
2632It was created by OpenJDK $as_me jdk8, which was
2633generated by GNU Autoconf 2.69.  Invocation command line was
2634
2635  $ $0 $@
2636
2637_ACEOF
2638exec 5>>config.log
2639{
2640cat <<_ASUNAME
2641## --------- ##
2642## Platform. ##
2643## --------- ##
2644
2645hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2646uname -m = `(uname -m) 2>/dev/null || echo unknown`
2647uname -r = `(uname -r) 2>/dev/null || echo unknown`
2648uname -s = `(uname -s) 2>/dev/null || echo unknown`
2649uname -v = `(uname -v) 2>/dev/null || echo unknown`
2650
2651/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2652/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2653
2654/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2655/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2656/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2657/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2658/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2659/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2660/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2661
2662_ASUNAME
2663
2664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2665for as_dir in $PATH
2666do
2667  IFS=$as_save_IFS
2668  test -z "$as_dir" && as_dir=.
2669    $as_echo "PATH: $as_dir"
2670  done
2671IFS=$as_save_IFS
2672
2673} >&5
2674
2675cat >&5 <<_ACEOF
2676
2677
2678## ----------- ##
2679## Core tests. ##
2680## ----------- ##
2681
2682_ACEOF
2683
2684
2685# Keep a trace of the command line.
2686# Strip out --no-create and --no-recursion so they do not pile up.
2687# Strip out --silent because we don't want to record it for future runs.
2688# Also quote any args containing shell meta-characters.
2689# Make two passes to allow for proper duplicate-argument suppression.
2690ac_configure_args=
2691ac_configure_args0=
2692ac_configure_args1=
2693ac_must_keep_next=false
2694for ac_pass in 1 2
2695do
2696  for ac_arg
2697  do
2698    case $ac_arg in
2699    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2700    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2701    | -silent | --silent | --silen | --sile | --sil)
2702      continue ;;
2703    *\'*)
2704      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2705    esac
2706    case $ac_pass in
2707    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2708    2)
2709      as_fn_append ac_configure_args1 " '$ac_arg'"
2710      if test $ac_must_keep_next = true; then
2711	ac_must_keep_next=false # Got value, back to normal.
2712      else
2713	case $ac_arg in
2714	  *=* | --config-cache | -C | -disable-* | --disable-* \
2715	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2716	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2717	  | -with-* | --with-* | -without-* | --without-* | --x)
2718	    case "$ac_configure_args0 " in
2719	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2720	    esac
2721	    ;;
2722	  -* ) ac_must_keep_next=true ;;
2723	esac
2724      fi
2725      as_fn_append ac_configure_args " '$ac_arg'"
2726      ;;
2727    esac
2728  done
2729done
2730{ ac_configure_args0=; unset ac_configure_args0;}
2731{ ac_configure_args1=; unset ac_configure_args1;}
2732
2733# When interrupted or exit'd, cleanup temporary files, and complete
2734# config.log.  We remove comments because anyway the quotes in there
2735# would cause problems or look ugly.
2736# WARNING: Use '\'' to represent an apostrophe within the trap.
2737# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2738trap 'exit_status=$?
2739  # Save into config.log some information that might help in debugging.
2740  {
2741    echo
2742
2743    $as_echo "## ---------------- ##
2744## Cache variables. ##
2745## ---------------- ##"
2746    echo
2747    # The following way of writing the cache mishandles newlines in values,
2748(
2749  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2750    eval ac_val=\$$ac_var
2751    case $ac_val in #(
2752    *${as_nl}*)
2753      case $ac_var in #(
2754      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2755$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2756      esac
2757      case $ac_var in #(
2758      _ | IFS | as_nl) ;; #(
2759      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2760      *) { eval $ac_var=; unset $ac_var;} ;;
2761      esac ;;
2762    esac
2763  done
2764  (set) 2>&1 |
2765    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2766    *${as_nl}ac_space=\ *)
2767      sed -n \
2768	"s/'\''/'\''\\\\'\'''\''/g;
2769	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2770      ;; #(
2771    *)
2772      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2773      ;;
2774    esac |
2775    sort
2776)
2777    echo
2778
2779    $as_echo "## ----------------- ##
2780## Output variables. ##
2781## ----------------- ##"
2782    echo
2783    for ac_var in $ac_subst_vars
2784    do
2785      eval ac_val=\$$ac_var
2786      case $ac_val in
2787      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2788      esac
2789      $as_echo "$ac_var='\''$ac_val'\''"
2790    done | sort
2791    echo
2792
2793    if test -n "$ac_subst_files"; then
2794      $as_echo "## ------------------- ##
2795## File substitutions. ##
2796## ------------------- ##"
2797      echo
2798      for ac_var in $ac_subst_files
2799      do
2800	eval ac_val=\$$ac_var
2801	case $ac_val in
2802	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2803	esac
2804	$as_echo "$ac_var='\''$ac_val'\''"
2805      done | sort
2806      echo
2807    fi
2808
2809    if test -s confdefs.h; then
2810      $as_echo "## ----------- ##
2811## confdefs.h. ##
2812## ----------- ##"
2813      echo
2814      cat confdefs.h
2815      echo
2816    fi
2817    test "$ac_signal" != 0 &&
2818      $as_echo "$as_me: caught signal $ac_signal"
2819    $as_echo "$as_me: exit $exit_status"
2820  } >&5
2821  rm -f core *.core core.conftest.* &&
2822    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2823    exit $exit_status
2824' 0
2825for ac_signal in 1 2 13 15; do
2826  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2827done
2828ac_signal=0
2829
2830# confdefs.h avoids OS command line length limits that DEFS can exceed.
2831rm -f -r conftest* confdefs.h
2832
2833$as_echo "/* confdefs.h */" > confdefs.h
2834
2835# Predefined preprocessor variables.
2836
2837cat >>confdefs.h <<_ACEOF
2838#define PACKAGE_NAME "$PACKAGE_NAME"
2839_ACEOF
2840
2841cat >>confdefs.h <<_ACEOF
2842#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2843_ACEOF
2844
2845cat >>confdefs.h <<_ACEOF
2846#define PACKAGE_VERSION "$PACKAGE_VERSION"
2847_ACEOF
2848
2849cat >>confdefs.h <<_ACEOF
2850#define PACKAGE_STRING "$PACKAGE_STRING"
2851_ACEOF
2852
2853cat >>confdefs.h <<_ACEOF
2854#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2855_ACEOF
2856
2857cat >>confdefs.h <<_ACEOF
2858#define PACKAGE_URL "$PACKAGE_URL"
2859_ACEOF
2860
2861
2862# Let the site file select an alternate cache file if it wants to.
2863# Prefer an explicitly selected file to automatically selected ones.
2864ac_site_file1=NONE
2865ac_site_file2=NONE
2866if test -n "$CONFIG_SITE"; then
2867  # We do not want a PATH search for config.site.
2868  case $CONFIG_SITE in #((
2869    -*)  ac_site_file1=./$CONFIG_SITE;;
2870    */*) ac_site_file1=$CONFIG_SITE;;
2871    *)   ac_site_file1=./$CONFIG_SITE;;
2872  esac
2873elif test "x$prefix" != xNONE; then
2874  ac_site_file1=$prefix/share/config.site
2875  ac_site_file2=$prefix/etc/config.site
2876else
2877  ac_site_file1=$ac_default_prefix/share/config.site
2878  ac_site_file2=$ac_default_prefix/etc/config.site
2879fi
2880for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2881do
2882  test "x$ac_site_file" = xNONE && continue
2883  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2884    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2885$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2886    sed 's/^/| /' "$ac_site_file" >&5
2887    . "$ac_site_file" \
2888      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2890as_fn_error $? "failed to load site script $ac_site_file
2891See \`config.log' for more details" "$LINENO" 5; }
2892  fi
2893done
2894
2895if test -r "$cache_file"; then
2896  # Some versions of bash will fail to source /dev/null (special files
2897  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2898  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2899    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2900$as_echo "$as_me: loading cache $cache_file" >&6;}
2901    case $cache_file in
2902      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2903      *)                      . "./$cache_file";;
2904    esac
2905  fi
2906else
2907  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2908$as_echo "$as_me: creating cache $cache_file" >&6;}
2909  >$cache_file
2910fi
2911
2912# Check that the precious variables saved in the cache have kept the same
2913# value.
2914ac_cache_corrupted=false
2915for ac_var in $ac_precious_vars; do
2916  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2917  eval ac_new_set=\$ac_env_${ac_var}_set
2918  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2919  eval ac_new_val=\$ac_env_${ac_var}_value
2920  case $ac_old_set,$ac_new_set in
2921    set,)
2922      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2923$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2924      ac_cache_corrupted=: ;;
2925    ,set)
2926      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2927$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2928      ac_cache_corrupted=: ;;
2929    ,);;
2930    *)
2931      if test "x$ac_old_val" != "x$ac_new_val"; then
2932	# differences in whitespace do not lead to failure.
2933	ac_old_val_w=`echo x $ac_old_val`
2934	ac_new_val_w=`echo x $ac_new_val`
2935	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2936	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2937$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2938	  ac_cache_corrupted=:
2939	else
2940	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2941$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2942	  eval $ac_var=\$ac_old_val
2943	fi
2944	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2945$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2946	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2947$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2948      fi;;
2949  esac
2950  # Pass precious variables to config.status.
2951  if test "$ac_new_set" = set; then
2952    case $ac_new_val in
2953    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2954    *) ac_arg=$ac_var=$ac_new_val ;;
2955    esac
2956    case " $ac_configure_args " in
2957      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2958      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2959    esac
2960  fi
2961done
2962if $ac_cache_corrupted; then
2963  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2965  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2966$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2967  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2968fi
2969## -------------------- ##
2970## Main body of script. ##
2971## -------------------- ##
2972
2973ac_ext=c
2974ac_cpp='$CPP $CPPFLAGS'
2975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2977ac_compiler_gnu=$ac_cv_c_compiler_gnu
2978
2979
2980
2981ac_aux_dir=
2982for ac_dir in build-aux "$srcdir"/build-aux; do
2983  if test -f "$ac_dir/install-sh"; then
2984    ac_aux_dir=$ac_dir
2985    ac_install_sh="$ac_aux_dir/install-sh -c"
2986    break
2987  elif test -f "$ac_dir/install.sh"; then
2988    ac_aux_dir=$ac_dir
2989    ac_install_sh="$ac_aux_dir/install.sh -c"
2990    break
2991  elif test -f "$ac_dir/shtool"; then
2992    ac_aux_dir=$ac_dir
2993    ac_install_sh="$ac_aux_dir/shtool install -c"
2994    break
2995  fi
2996done
2997if test -z "$ac_aux_dir"; then
2998  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2999fi
3000
3001# These three variables are undocumented and unsupported,
3002# and are intended to be withdrawn in a future Autoconf release.
3003# They can cause serious problems if a builder's source tree is in a directory
3004# whose full name contains unusual characters.
3005ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3006ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3007ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3008
3009
3010# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3011
3012#
3013# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3014# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3015#
3016# This code is free software; you can redistribute it and/or modify it
3017# under the terms of the GNU General Public License version 2 only, as
3018# published by the Free Software Foundation.  Oracle designates this
3019# particular file as subject to the "Classpath" exception as provided
3020# by Oracle in the LICENSE file that accompanied this code.
3021#
3022# This code is distributed in the hope that it will be useful, but WITHOUT
3023# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3024# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3025# version 2 for more details (a copy is included in the LICENSE file that
3026# accompanied this code).
3027#
3028# You should have received a copy of the GNU General Public License version
3029# 2 along with this work; if not, write to the Free Software Foundation,
3030# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3031#
3032# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3033# or visit www.oracle.com if you need additional information or have any
3034# questions.
3035#
3036
3037#
3038# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3039#
3040# This program is free software; you can redistribute it and/or modify
3041# it under the terms of the GNU General Public License as published by
3042# the Free Software Foundation; either version 2 of the License, or
3043# (at your option) any later version.
3044#
3045# This program is distributed in the hope that it will be useful, but
3046# WITHOUT ANY WARRANTY; without even the implied warranty of
3047# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3048# General Public License for more details.
3049#
3050# You should have received a copy of the GNU General Public License
3051# along with this program; if not, write to the Free Software
3052# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3053#
3054# As a special exception to the GNU General Public License, if you
3055# distribute this file as part of a program that contains a
3056# configuration script generated by Autoconf, you may include it under
3057# the same distribution terms that you use for the rest of that program.
3058
3059# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3060# ----------------------------------
3061# PKG_PROG_PKG_CONFIG
3062
3063# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3064#
3065# Check to see whether a particular set of modules exists.  Similar
3066# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3067#
3068#
3069# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3070# this or PKG_CHECK_MODULES is called, or make sure to call
3071# PKG_CHECK_EXISTS manually
3072# --------------------------------------------------------------
3073
3074
3075
3076# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3077# ---------------------------------------------
3078# _PKG_CONFIG
3079
3080# _PKG_SHORT_ERRORS_SUPPORTED
3081# -----------------------------
3082# _PKG_SHORT_ERRORS_SUPPORTED
3083
3084
3085# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3086# [ACTION-IF-NOT-FOUND])
3087#
3088#
3089# Note that if there is a possibility the first call to
3090# PKG_CHECK_MODULES might not happen, you should be sure to include an
3091# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3092#
3093#
3094# --------------------------------------------------------------
3095# PKG_CHECK_MODULES
3096
3097
3098# Include these first...
3099#
3100# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3101# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3102#
3103# This code is free software; you can redistribute it and/or modify it
3104# under the terms of the GNU General Public License version 2 only, as
3105# published by the Free Software Foundation.  Oracle designates this
3106# particular file as subject to the "Classpath" exception as provided
3107# by Oracle in the LICENSE file that accompanied this code.
3108#
3109# This code is distributed in the hope that it will be useful, but WITHOUT
3110# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3111# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3112# version 2 for more details (a copy is included in the LICENSE file that
3113# accompanied this code).
3114#
3115# You should have received a copy of the GNU General Public License version
3116# 2 along with this work; if not, write to the Free Software Foundation,
3117# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3118#
3119# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3120# or visit www.oracle.com if you need additional information or have any
3121# questions.
3122#
3123
3124# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3125# If so, then append $1 to $2 \
3126# Also set JVM_ARG_OK to true/false depending on outcome.
3127
3128
3129# Appends a string to a path variable, only adding the : when needed.
3130
3131
3132# This will make sure the given variable points to a full and proper
3133# path. This means:
3134# 1) There will be no spaces in the path. On posix platforms,
3135#    spaces in the path will result in an error. On Windows,
3136#    the path will be rewritten using short-style to be space-free.
3137# 2) The path will be absolute, and it will be in unix-style (on
3138#     cygwin).
3139# $1: The name of the variable to fix
3140
3141
3142# This will make sure the given variable points to a executable
3143# with a full and proper path. This means:
3144# 1) There will be no spaces in the path. On posix platforms,
3145#    spaces in the path will result in an error. On Windows,
3146#    the path will be rewritten using short-style to be space-free.
3147# 2) The path will be absolute, and it will be in unix-style (on
3148#     cygwin).
3149# Any arguments given to the executable is preserved.
3150# If the input variable does not have a directory specification, then
3151# it need to be in the PATH.
3152# $1: The name of the variable to fix
3153
3154
3155
3156
3157# Register a --with argument but mark it as deprecated
3158# $1: The name of the with argument to deprecate, not including --with-
3159
3160
3161# Register a --enable argument but mark it as deprecated
3162# $1: The name of the with argument to deprecate, not including --enable-
3163# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3164
3165
3166
3167
3168# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3169# $1: variable to check
3170# $2: executable name to print in warning (optional)
3171
3172
3173# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3174# Arguments as AC_PATH_PROG:
3175# $1: variable to set
3176# $2: executable name to look for
3177
3178
3179# Setup the most fundamental tools that relies on not much else to set up,
3180# but is used by much of the early bootstrap code.
3181
3182
3183# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3184
3185
3186
3187
3188
3189
3190
3191#%%% Simple tools %%%
3192
3193# Check if we have found a usable version of make
3194# $1: the path to a potential make binary (or empty)
3195# $2: the description on how we found this
3196
3197
3198# Goes looking for a usable version of GNU make.
3199
3200
3201
3202
3203
3204
3205# Check if build directory is on local disk. If not possible to determine,
3206# we prefer to claim it's local.
3207# Argument 1: directory to test
3208# Argument 2: what to do if it is on local disk
3209# Argument 3: what to do otherwise (remote disk or failure)
3210
3211
3212# Check that source files have basic read permissions set. This might
3213# not be the case in cygwin in certain conditions.
3214
3215
3216
3217
3218#
3219# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3220# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3221#
3222# This code is free software; you can redistribute it and/or modify it
3223# under the terms of the GNU General Public License version 2 only, as
3224# published by the Free Software Foundation.  Oracle designates this
3225# particular file as subject to the "Classpath" exception as provided
3226# by Oracle in the LICENSE file that accompanied this code.
3227#
3228# This code is distributed in the hope that it will be useful, but WITHOUT
3229# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3230# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3231# version 2 for more details (a copy is included in the LICENSE file that
3232# accompanied this code).
3233#
3234# You should have received a copy of the GNU General Public License version
3235# 2 along with this work; if not, write to the Free Software Foundation,
3236# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3237#
3238# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3239# or visit www.oracle.com if you need additional information or have any
3240# questions.
3241#
3242
3243
3244
3245
3246
3247# Helper function which possibly converts a path using DOS-style short mode.
3248# If so, the updated path is stored in $new_path.
3249# $1: The path to check
3250
3251
3252# Helper function which possibly converts a path using DOS-style short mode.
3253# If so, the updated path is stored in $new_path.
3254# $1: The path to check
3255
3256
3257# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3258# and could probably be heavily simplified. However, all changes in this
3259# area tend to need lot of testing in different scenarios, and in lack of
3260# proper unit testing, cleaning this up has not been deemed worth the effort
3261# at the moment.
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3272
3273
3274
3275
3276#
3277# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279#
3280# This code is free software; you can redistribute it and/or modify it
3281# under the terms of the GNU General Public License version 2 only, as
3282# published by the Free Software Foundation.  Oracle designates this
3283# particular file as subject to the "Classpath" exception as provided
3284# by Oracle in the LICENSE file that accompanied this code.
3285#
3286# This code is distributed in the hope that it will be useful, but WITHOUT
3287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289# version 2 for more details (a copy is included in the LICENSE file that
3290# accompanied this code).
3291#
3292# You should have received a copy of the GNU General Public License version
3293# 2 along with this work; if not, write to the Free Software Foundation,
3294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295#
3296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297# or visit www.oracle.com if you need additional information or have any
3298# questions.
3299#
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311# ... then the rest
3312#
3313# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3314# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3315#
3316# This code is free software; you can redistribute it and/or modify it
3317# under the terms of the GNU General Public License version 2 only, as
3318# published by the Free Software Foundation.  Oracle designates this
3319# particular file as subject to the "Classpath" exception as provided
3320# by Oracle in the LICENSE file that accompanied this code.
3321#
3322# This code is distributed in the hope that it will be useful, but WITHOUT
3323# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3324# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3325# version 2 for more details (a copy is included in the LICENSE file that
3326# accompanied this code).
3327#
3328# You should have received a copy of the GNU General Public License version
3329# 2 along with this work; if not, write to the Free Software Foundation,
3330# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3331#
3332# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3333# or visit www.oracle.com if you need additional information or have any
3334# questions.
3335#
3336
3337# Execute the check given as argument, and verify the result
3338# If the Boot JDK was previously found, do nothing
3339# $1 A command line (typically autoconf macro) to execute
3340
3341
3342# Test: Is bootjdk explicitely set by command line arguments?
3343
3344
3345# Test: Is bootjdk available from builddeps?
3346
3347
3348# Test: Is $JAVA_HOME set?
3349
3350
3351# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3352
3353
3354# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3355
3356
3357# Look for a jdk in the given path. If there are multiple, try to select the newest.
3358# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3359# $1 = Path to directory containing jdk installations.
3360# $2 = String to append to the found JDK directory to get the proper JDK home
3361
3362
3363# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3364# environmental variable as base for where to look.
3365# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3366
3367
3368# Test: Is there a JDK installed in default, well-known locations?
3369
3370
3371# Check that a command-line tool in the Boot JDK is correct
3372# $1 = name of variable to assign
3373# $2 = name of binary
3374
3375
3376###############################################################################
3377#
3378# We need a Boot JDK to bootstrap the build.
3379#
3380
3381
3382
3383
3384
3385#
3386# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3387# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3388#
3389# This code is free software; you can redistribute it and/or modify it
3390# under the terms of the GNU General Public License version 2 only, as
3391# published by the Free Software Foundation.  Oracle designates this
3392# particular file as subject to the "Classpath" exception as provided
3393# by Oracle in the LICENSE file that accompanied this code.
3394#
3395# This code is distributed in the hope that it will be useful, but WITHOUT
3396# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3397# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3398# version 2 for more details (a copy is included in the LICENSE file that
3399# accompanied this code).
3400#
3401# You should have received a copy of the GNU General Public License version
3402# 2 along with this work; if not, write to the Free Software Foundation,
3403# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3404#
3405# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3406# or visit www.oracle.com if you need additional information or have any
3407# questions.
3408#
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429#
3430# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454
3455
3456
3457
3458cygwin_help() {
3459  case $1 in
3460    unzip)
3461      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3462      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3463      ;;
3464    zip)
3465      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3466      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3467      ;;
3468    make)
3469      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3470      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3471      ;;
3472    freetype)
3473      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3474        HELP_MSG="To install freetype, run:
3475wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3476chmod +x /tmp/freetype-setup.exe
3477/tmp/freetype-setup.exe
3478Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3479After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3480      else
3481        HELP_MSG="You need to build a 64-bit version of freetype.
3482This is not readily available.
3483You can find source code and build instructions on
3484http://www.freetype.org/
3485If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3486      fi
3487      ;;
3488    * )
3489      break ;;
3490  esac
3491}
3492
3493msys_help() {
3494  PKGHANDLER_COMMAND=""
3495}
3496
3497apt_help() {
3498  case $1 in
3499    devkit)
3500      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3501    openjdk)
3502      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3503    alsa)
3504      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3505    cups)
3506      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3507    freetype)
3508      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3509    pulse)
3510      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3511    x11)
3512      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3513    ccache)
3514      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3515    * )
3516      break ;;
3517  esac
3518}
3519
3520yum_help() {
3521  case $1 in
3522    devkit)
3523      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3524    openjdk)
3525      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3526    alsa)
3527      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3528    cups)
3529      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3530    freetype)
3531      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3532    pulse)
3533      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3534    x11)
3535      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3536    ccache)
3537      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3538    * )
3539      break ;;
3540  esac
3541}
3542
3543port_help() {
3544  PKGHANDLER_COMMAND=""
3545}
3546
3547pkgutil_help() {
3548  PKGHANDLER_COMMAND=""
3549}
3550
3551pkgadd_help() {
3552  PKGHANDLER_COMMAND=""
3553}
3554
3555
3556
3557#
3558# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3559# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560#
3561# This code is free software; you can redistribute it and/or modify it
3562# under the terms of the GNU General Public License version 2 only, as
3563# published by the Free Software Foundation.  Oracle designates this
3564# particular file as subject to the "Classpath" exception as provided
3565# by Oracle in the LICENSE file that accompanied this code.
3566#
3567# This code is distributed in the hope that it will be useful, but WITHOUT
3568# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570# version 2 for more details (a copy is included in the LICENSE file that
3571# accompanied this code).
3572#
3573# You should have received a copy of the GNU General Public License version
3574# 2 along with this work; if not, write to the Free Software Foundation,
3575# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576#
3577# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578# or visit www.oracle.com if you need additional information or have any
3579# questions.
3580#
3581
3582
3583
3584
3585
3586
3587
3588
3589###############################################################################
3590#
3591# Should we build only OpenJDK even if closed sources are present?
3592#
3593
3594
3595
3596
3597###############################################################################
3598#
3599# Setup version numbers
3600#
3601
3602
3603
3604
3605
3606
3607# Support for customization of the build process. Some build files
3608# will include counterparts from this location, if they exist. This allows
3609# for a degree of customization of the build targets and the rules/recipes
3610# to create them
3611
3612# Check whether --with-custom-make-dir was given.
3613if test "${with_custom_make_dir+set}" = set; then :
3614  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3615fi
3616
3617
3618
3619#
3620# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660#
3661# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3662# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3663#
3664# This code is free software; you can redistribute it and/or modify it
3665# under the terms of the GNU General Public License version 2 only, as
3666# published by the Free Software Foundation.  Oracle designates this
3667# particular file as subject to the "Classpath" exception as provided
3668# by Oracle in the LICENSE file that accompanied this code.
3669#
3670# This code is distributed in the hope that it will be useful, but WITHOUT
3671# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3672# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3673# version 2 for more details (a copy is included in the LICENSE file that
3674# accompanied this code).
3675#
3676# You should have received a copy of the GNU General Public License version
3677# 2 along with this work; if not, write to the Free Software Foundation,
3678# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3679#
3680# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3681# or visit www.oracle.com if you need additional information or have any
3682# questions.
3683#
3684
3685# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3686# Converts autoconf style CPU name to OpenJDK style, into
3687# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3688
3689
3690# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3691# Converts autoconf style OS name to OpenJDK style, into
3692# VAR_OS and VAR_OS_API.
3693
3694
3695# Expects $host_os $host_cpu $build_os and $build_cpu
3696# and $with_target_bits to have been setup!
3697#
3698# Translate the standard triplet(quadruplet) definition
3699# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3700# OPENJDK_BUILD_OS, etc.
3701
3702
3703# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3704# accordingly. Must be done after setting up build and target system, but before
3705# doing anything else with these values.
3706
3707
3708# Setup the legacy variables, for controlling the old makefiles.
3709#
3710
3711
3712
3713
3714#%%% Build and target systems %%%
3715
3716
3717
3718
3719# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3720# Add -mX to various FLAGS variables.
3721
3722
3723
3724
3725
3726
3727#
3728# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3729# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3730#
3731# This code is free software; you can redistribute it and/or modify it
3732# under the terms of the GNU General Public License version 2 only, as
3733# published by the Free Software Foundation.  Oracle designates this
3734# particular file as subject to the "Classpath" exception as provided
3735# by Oracle in the LICENSE file that accompanied this code.
3736#
3737# This code is distributed in the hope that it will be useful, but WITHOUT
3738# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3739# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3740# version 2 for more details (a copy is included in the LICENSE file that
3741# accompanied this code).
3742#
3743# You should have received a copy of the GNU General Public License version
3744# 2 along with this work; if not, write to the Free Software Foundation,
3745# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3746#
3747# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3748# or visit www.oracle.com if you need additional information or have any
3749# questions.
3750#
3751
3752
3753
3754
3755
3756
3757
3758
3759#
3760# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3761# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3762#
3763# This code is free software; you can redistribute it and/or modify it
3764# under the terms of the GNU General Public License version 2 only, as
3765# published by the Free Software Foundation.  Oracle designates this
3766# particular file as subject to the "Classpath" exception as provided
3767# by Oracle in the LICENSE file that accompanied this code.
3768#
3769# This code is distributed in the hope that it will be useful, but WITHOUT
3770# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3771# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3772# version 2 for more details (a copy is included in the LICENSE file that
3773# accompanied this code).
3774#
3775# You should have received a copy of the GNU General Public License version
3776# 2 along with this work; if not, write to the Free Software Foundation,
3777# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3778#
3779# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3780# or visit www.oracle.com if you need additional information or have any
3781# questions.
3782#
3783
3784# $1 = compiler to test (CC or CXX)
3785# $2 = human readable name of compiler (C or C++)
3786
3787
3788
3789
3790
3791# $1 = compiler to test (CC or CXX)
3792# $2 = human readable name of compiler (C or C++)
3793# $3 = list of compiler names to search for
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3808#                                   [RUN-IF-FALSE])
3809# ------------------------------------------------------------
3810# Check that the c and c++ compilers support an argument
3811
3812
3813
3814
3815# Setup the JTREG paths
3816
3817
3818#
3819# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3820# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3821#
3822# This code is free software; you can redistribute it and/or modify it
3823# under the terms of the GNU General Public License version 2 only, as
3824# published by the Free Software Foundation.  Oracle designates this
3825# particular file as subject to the "Classpath" exception as provided
3826# by Oracle in the LICENSE file that accompanied this code.
3827#
3828# This code is distributed in the hope that it will be useful, but WITHOUT
3829# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3830# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3831# version 2 for more details (a copy is included in the LICENSE file that
3832# accompanied this code).
3833#
3834# You should have received a copy of the GNU General Public License version
3835# 2 along with this work; if not, write to the Free Software Foundation,
3836# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3837#
3838# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3839# or visit www.oracle.com if you need additional information or have any
3840# questions.
3841#
3842
3843
3844
3845
3846
3847
3848
3849# Check if the VS env variables were setup prior to running configure.
3850# If not, then find vcvarsall.bat and run it automatically, and integrate
3851# the set env variables into the spec file.
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862# This line needs to be here, verbatim, after all includes and the dummy hook
3863# definitions. It is replaced with custom functionality when building
3864# custom sources.
3865#CUSTOM_AUTOCONF_INCLUDE
3866
3867# Do not change or remove the following line, it is needed for consistency checks:
3868DATE_WHEN_GENERATED=1389267188
3869
3870###############################################################################
3871#
3872# Initialization / Boot-strapping
3873#
3874# The bootstrapping process needs to solve the "chicken or the egg" problem,
3875# thus it jumps back and forth, each time gaining something needed later on.
3876#
3877###############################################################################
3878
3879# Basic initialization that must happen first of all
3880
3881  # Save the original command line. This is passed to us by the wrapper configure script.
3882
3883  DATE_WHEN_CONFIGURED=`LANG=C date`
3884
3885  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3886$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3888$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3889
3890
3891
3892  # Start with tools that do not need have cross compilation support
3893  # and can be expected to be found in the default PATH. These tools are
3894  # used by configure. Nor are these tools expected to be found in the
3895  # devkit from the builddeps server either, since they are
3896  # needed to download the devkit.
3897
3898  # First are all the simple required tools.
3899
3900  for ac_prog in basename
3901do
3902  # Extract the first word of "$ac_prog", so it can be a program name with args.
3903set dummy $ac_prog; ac_word=$2
3904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3905$as_echo_n "checking for $ac_word... " >&6; }
3906if ${ac_cv_path_BASENAME+:} false; then :
3907  $as_echo_n "(cached) " >&6
3908else
3909  case $BASENAME in
3910  [\\/]* | ?:[\\/]*)
3911  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3912  ;;
3913  *)
3914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3915for as_dir in $PATH
3916do
3917  IFS=$as_save_IFS
3918  test -z "$as_dir" && as_dir=.
3919    for ac_exec_ext in '' $ac_executable_extensions; do
3920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3921    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3923    break 2
3924  fi
3925done
3926  done
3927IFS=$as_save_IFS
3928
3929  ;;
3930esac
3931fi
3932BASENAME=$ac_cv_path_BASENAME
3933if test -n "$BASENAME"; then
3934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3935$as_echo "$BASENAME" >&6; }
3936else
3937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
3939fi
3940
3941
3942  test -n "$BASENAME" && break
3943done
3944
3945
3946  if test "x$BASENAME" = x; then
3947    if test "xbasename" = x; then
3948      PROG_NAME=basename
3949    else
3950      PROG_NAME=basename
3951    fi
3952    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3953$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3954    as_fn_error $? "Cannot continue" "$LINENO" 5
3955  fi
3956
3957
3958
3959  for ac_prog in bash
3960do
3961  # Extract the first word of "$ac_prog", so it can be a program name with args.
3962set dummy $ac_prog; ac_word=$2
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3964$as_echo_n "checking for $ac_word... " >&6; }
3965if ${ac_cv_path_BASH+:} false; then :
3966  $as_echo_n "(cached) " >&6
3967else
3968  case $BASH in
3969  [\\/]* | ?:[\\/]*)
3970  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3971  ;;
3972  *)
3973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3974for as_dir in $PATH
3975do
3976  IFS=$as_save_IFS
3977  test -z "$as_dir" && as_dir=.
3978    for ac_exec_ext in '' $ac_executable_extensions; do
3979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3980    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3982    break 2
3983  fi
3984done
3985  done
3986IFS=$as_save_IFS
3987
3988  ;;
3989esac
3990fi
3991BASH=$ac_cv_path_BASH
3992if test -n "$BASH"; then
3993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3994$as_echo "$BASH" >&6; }
3995else
3996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3997$as_echo "no" >&6; }
3998fi
3999
4000
4001  test -n "$BASH" && break
4002done
4003
4004
4005  if test "x$BASH" = x; then
4006    if test "xbash" = x; then
4007      PROG_NAME=bash
4008    else
4009      PROG_NAME=bash
4010    fi
4011    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4012$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4013    as_fn_error $? "Cannot continue" "$LINENO" 5
4014  fi
4015
4016
4017
4018  for ac_prog in cat
4019do
4020  # Extract the first word of "$ac_prog", so it can be a program name with args.
4021set dummy $ac_prog; ac_word=$2
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4023$as_echo_n "checking for $ac_word... " >&6; }
4024if ${ac_cv_path_CAT+:} false; then :
4025  $as_echo_n "(cached) " >&6
4026else
4027  case $CAT in
4028  [\\/]* | ?:[\\/]*)
4029  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4030  ;;
4031  *)
4032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033for as_dir in $PATH
4034do
4035  IFS=$as_save_IFS
4036  test -z "$as_dir" && as_dir=.
4037    for ac_exec_ext in '' $ac_executable_extensions; do
4038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4039    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4041    break 2
4042  fi
4043done
4044  done
4045IFS=$as_save_IFS
4046
4047  ;;
4048esac
4049fi
4050CAT=$ac_cv_path_CAT
4051if test -n "$CAT"; then
4052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4053$as_echo "$CAT" >&6; }
4054else
4055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056$as_echo "no" >&6; }
4057fi
4058
4059
4060  test -n "$CAT" && break
4061done
4062
4063
4064  if test "x$CAT" = x; then
4065    if test "xcat" = x; then
4066      PROG_NAME=cat
4067    else
4068      PROG_NAME=cat
4069    fi
4070    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4071$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4072    as_fn_error $? "Cannot continue" "$LINENO" 5
4073  fi
4074
4075
4076
4077  for ac_prog in chmod
4078do
4079  # Extract the first word of "$ac_prog", so it can be a program name with args.
4080set dummy $ac_prog; ac_word=$2
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4082$as_echo_n "checking for $ac_word... " >&6; }
4083if ${ac_cv_path_CHMOD+:} false; then :
4084  $as_echo_n "(cached) " >&6
4085else
4086  case $CHMOD in
4087  [\\/]* | ?:[\\/]*)
4088  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4089  ;;
4090  *)
4091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092for as_dir in $PATH
4093do
4094  IFS=$as_save_IFS
4095  test -z "$as_dir" && as_dir=.
4096    for ac_exec_ext in '' $ac_executable_extensions; do
4097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4100    break 2
4101  fi
4102done
4103  done
4104IFS=$as_save_IFS
4105
4106  ;;
4107esac
4108fi
4109CHMOD=$ac_cv_path_CHMOD
4110if test -n "$CHMOD"; then
4111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4112$as_echo "$CHMOD" >&6; }
4113else
4114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4115$as_echo "no" >&6; }
4116fi
4117
4118
4119  test -n "$CHMOD" && break
4120done
4121
4122
4123  if test "x$CHMOD" = x; then
4124    if test "xchmod" = x; then
4125      PROG_NAME=chmod
4126    else
4127      PROG_NAME=chmod
4128    fi
4129    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4130$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4131    as_fn_error $? "Cannot continue" "$LINENO" 5
4132  fi
4133
4134
4135
4136  for ac_prog in cmp
4137do
4138  # Extract the first word of "$ac_prog", so it can be a program name with args.
4139set dummy $ac_prog; ac_word=$2
4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4141$as_echo_n "checking for $ac_word... " >&6; }
4142if ${ac_cv_path_CMP+:} false; then :
4143  $as_echo_n "(cached) " >&6
4144else
4145  case $CMP in
4146  [\\/]* | ?:[\\/]*)
4147  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4148  ;;
4149  *)
4150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4151for as_dir in $PATH
4152do
4153  IFS=$as_save_IFS
4154  test -z "$as_dir" && as_dir=.
4155    for ac_exec_ext in '' $ac_executable_extensions; do
4156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4157    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4159    break 2
4160  fi
4161done
4162  done
4163IFS=$as_save_IFS
4164
4165  ;;
4166esac
4167fi
4168CMP=$ac_cv_path_CMP
4169if test -n "$CMP"; then
4170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4171$as_echo "$CMP" >&6; }
4172else
4173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174$as_echo "no" >&6; }
4175fi
4176
4177
4178  test -n "$CMP" && break
4179done
4180
4181
4182  if test "x$CMP" = x; then
4183    if test "xcmp" = x; then
4184      PROG_NAME=cmp
4185    else
4186      PROG_NAME=cmp
4187    fi
4188    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4189$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4190    as_fn_error $? "Cannot continue" "$LINENO" 5
4191  fi
4192
4193
4194
4195  for ac_prog in comm
4196do
4197  # Extract the first word of "$ac_prog", so it can be a program name with args.
4198set dummy $ac_prog; ac_word=$2
4199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4200$as_echo_n "checking for $ac_word... " >&6; }
4201if ${ac_cv_path_COMM+:} false; then :
4202  $as_echo_n "(cached) " >&6
4203else
4204  case $COMM in
4205  [\\/]* | ?:[\\/]*)
4206  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4207  ;;
4208  *)
4209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210for as_dir in $PATH
4211do
4212  IFS=$as_save_IFS
4213  test -z "$as_dir" && as_dir=.
4214    for ac_exec_ext in '' $ac_executable_extensions; do
4215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4216    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4218    break 2
4219  fi
4220done
4221  done
4222IFS=$as_save_IFS
4223
4224  ;;
4225esac
4226fi
4227COMM=$ac_cv_path_COMM
4228if test -n "$COMM"; then
4229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4230$as_echo "$COMM" >&6; }
4231else
4232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4233$as_echo "no" >&6; }
4234fi
4235
4236
4237  test -n "$COMM" && break
4238done
4239
4240
4241  if test "x$COMM" = x; then
4242    if test "xcomm" = x; then
4243      PROG_NAME=comm
4244    else
4245      PROG_NAME=comm
4246    fi
4247    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4248$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4249    as_fn_error $? "Cannot continue" "$LINENO" 5
4250  fi
4251
4252
4253
4254  for ac_prog in cp
4255do
4256  # Extract the first word of "$ac_prog", so it can be a program name with args.
4257set dummy $ac_prog; ac_word=$2
4258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4259$as_echo_n "checking for $ac_word... " >&6; }
4260if ${ac_cv_path_CP+:} false; then :
4261  $as_echo_n "(cached) " >&6
4262else
4263  case $CP in
4264  [\\/]* | ?:[\\/]*)
4265  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4266  ;;
4267  *)
4268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269for as_dir in $PATH
4270do
4271  IFS=$as_save_IFS
4272  test -z "$as_dir" && as_dir=.
4273    for ac_exec_ext in '' $ac_executable_extensions; do
4274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4275    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4277    break 2
4278  fi
4279done
4280  done
4281IFS=$as_save_IFS
4282
4283  ;;
4284esac
4285fi
4286CP=$ac_cv_path_CP
4287if test -n "$CP"; then
4288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4289$as_echo "$CP" >&6; }
4290else
4291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4292$as_echo "no" >&6; }
4293fi
4294
4295
4296  test -n "$CP" && break
4297done
4298
4299
4300  if test "x$CP" = x; then
4301    if test "xcp" = x; then
4302      PROG_NAME=cp
4303    else
4304      PROG_NAME=cp
4305    fi
4306    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4307$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4308    as_fn_error $? "Cannot continue" "$LINENO" 5
4309  fi
4310
4311
4312
4313  for ac_prog in cpio
4314do
4315  # Extract the first word of "$ac_prog", so it can be a program name with args.
4316set dummy $ac_prog; ac_word=$2
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4318$as_echo_n "checking for $ac_word... " >&6; }
4319if ${ac_cv_path_CPIO+:} false; then :
4320  $as_echo_n "(cached) " >&6
4321else
4322  case $CPIO in
4323  [\\/]* | ?:[\\/]*)
4324  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4325  ;;
4326  *)
4327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in $PATH
4329do
4330  IFS=$as_save_IFS
4331  test -z "$as_dir" && as_dir=.
4332    for ac_exec_ext in '' $ac_executable_extensions; do
4333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4334    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4336    break 2
4337  fi
4338done
4339  done
4340IFS=$as_save_IFS
4341
4342  ;;
4343esac
4344fi
4345CPIO=$ac_cv_path_CPIO
4346if test -n "$CPIO"; then
4347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4348$as_echo "$CPIO" >&6; }
4349else
4350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351$as_echo "no" >&6; }
4352fi
4353
4354
4355  test -n "$CPIO" && break
4356done
4357
4358
4359  if test "x$CPIO" = x; then
4360    if test "xcpio" = x; then
4361      PROG_NAME=cpio
4362    else
4363      PROG_NAME=cpio
4364    fi
4365    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4366$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4367    as_fn_error $? "Cannot continue" "$LINENO" 5
4368  fi
4369
4370
4371
4372  for ac_prog in cut
4373do
4374  # Extract the first word of "$ac_prog", so it can be a program name with args.
4375set dummy $ac_prog; ac_word=$2
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4377$as_echo_n "checking for $ac_word... " >&6; }
4378if ${ac_cv_path_CUT+:} false; then :
4379  $as_echo_n "(cached) " >&6
4380else
4381  case $CUT in
4382  [\\/]* | ?:[\\/]*)
4383  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4384  ;;
4385  *)
4386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH
4388do
4389  IFS=$as_save_IFS
4390  test -z "$as_dir" && as_dir=.
4391    for ac_exec_ext in '' $ac_executable_extensions; do
4392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4395    break 2
4396  fi
4397done
4398  done
4399IFS=$as_save_IFS
4400
4401  ;;
4402esac
4403fi
4404CUT=$ac_cv_path_CUT
4405if test -n "$CUT"; then
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4407$as_echo "$CUT" >&6; }
4408else
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410$as_echo "no" >&6; }
4411fi
4412
4413
4414  test -n "$CUT" && break
4415done
4416
4417
4418  if test "x$CUT" = x; then
4419    if test "xcut" = x; then
4420      PROG_NAME=cut
4421    else
4422      PROG_NAME=cut
4423    fi
4424    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4425$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4426    as_fn_error $? "Cannot continue" "$LINENO" 5
4427  fi
4428
4429
4430
4431  for ac_prog in date
4432do
4433  # Extract the first word of "$ac_prog", so it can be a program name with args.
4434set dummy $ac_prog; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_DATE+:} false; then :
4438  $as_echo_n "(cached) " >&6
4439else
4440  case $DATE in
4441  [\\/]* | ?:[\\/]*)
4442  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4443  ;;
4444  *)
4445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in $PATH
4447do
4448  IFS=$as_save_IFS
4449  test -z "$as_dir" && as_dir=.
4450    for ac_exec_ext in '' $ac_executable_extensions; do
4451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4452    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454    break 2
4455  fi
4456done
4457  done
4458IFS=$as_save_IFS
4459
4460  ;;
4461esac
4462fi
4463DATE=$ac_cv_path_DATE
4464if test -n "$DATE"; then
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4466$as_echo "$DATE" >&6; }
4467else
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473  test -n "$DATE" && break
4474done
4475
4476
4477  if test "x$DATE" = x; then
4478    if test "xdate" = x; then
4479      PROG_NAME=date
4480    else
4481      PROG_NAME=date
4482    fi
4483    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4484$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4485    as_fn_error $? "Cannot continue" "$LINENO" 5
4486  fi
4487
4488
4489
4490  for ac_prog in gdiff diff
4491do
4492  # Extract the first word of "$ac_prog", so it can be a program name with args.
4493set dummy $ac_prog; ac_word=$2
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4495$as_echo_n "checking for $ac_word... " >&6; }
4496if ${ac_cv_path_DIFF+:} false; then :
4497  $as_echo_n "(cached) " >&6
4498else
4499  case $DIFF in
4500  [\\/]* | ?:[\\/]*)
4501  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4502  ;;
4503  *)
4504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505for as_dir in $PATH
4506do
4507  IFS=$as_save_IFS
4508  test -z "$as_dir" && as_dir=.
4509    for ac_exec_ext in '' $ac_executable_extensions; do
4510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4511    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4513    break 2
4514  fi
4515done
4516  done
4517IFS=$as_save_IFS
4518
4519  ;;
4520esac
4521fi
4522DIFF=$ac_cv_path_DIFF
4523if test -n "$DIFF"; then
4524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4525$as_echo "$DIFF" >&6; }
4526else
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528$as_echo "no" >&6; }
4529fi
4530
4531
4532  test -n "$DIFF" && break
4533done
4534
4535
4536  if test "x$DIFF" = x; then
4537    if test "xgdiff diff" = x; then
4538      PROG_NAME=diff
4539    else
4540      PROG_NAME=gdiff diff
4541    fi
4542    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4543$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4544    as_fn_error $? "Cannot continue" "$LINENO" 5
4545  fi
4546
4547
4548
4549  for ac_prog in dirname
4550do
4551  # Extract the first word of "$ac_prog", so it can be a program name with args.
4552set dummy $ac_prog; ac_word=$2
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4554$as_echo_n "checking for $ac_word... " >&6; }
4555if ${ac_cv_path_DIRNAME+:} false; then :
4556  $as_echo_n "(cached) " >&6
4557else
4558  case $DIRNAME in
4559  [\\/]* | ?:[\\/]*)
4560  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4561  ;;
4562  *)
4563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4564for as_dir in $PATH
4565do
4566  IFS=$as_save_IFS
4567  test -z "$as_dir" && as_dir=.
4568    for ac_exec_ext in '' $ac_executable_extensions; do
4569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4570    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4572    break 2
4573  fi
4574done
4575  done
4576IFS=$as_save_IFS
4577
4578  ;;
4579esac
4580fi
4581DIRNAME=$ac_cv_path_DIRNAME
4582if test -n "$DIRNAME"; then
4583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4584$as_echo "$DIRNAME" >&6; }
4585else
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
4590
4591  test -n "$DIRNAME" && break
4592done
4593
4594
4595  if test "x$DIRNAME" = x; then
4596    if test "xdirname" = x; then
4597      PROG_NAME=dirname
4598    else
4599      PROG_NAME=dirname
4600    fi
4601    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4602$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4603    as_fn_error $? "Cannot continue" "$LINENO" 5
4604  fi
4605
4606
4607
4608  for ac_prog in echo
4609do
4610  # Extract the first word of "$ac_prog", so it can be a program name with args.
4611set dummy $ac_prog; ac_word=$2
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613$as_echo_n "checking for $ac_word... " >&6; }
4614if ${ac_cv_path_ECHO+:} false; then :
4615  $as_echo_n "(cached) " >&6
4616else
4617  case $ECHO in
4618  [\\/]* | ?:[\\/]*)
4619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4620  ;;
4621  *)
4622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4623for as_dir in $PATH
4624do
4625  IFS=$as_save_IFS
4626  test -z "$as_dir" && as_dir=.
4627    for ac_exec_ext in '' $ac_executable_extensions; do
4628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4631    break 2
4632  fi
4633done
4634  done
4635IFS=$as_save_IFS
4636
4637  ;;
4638esac
4639fi
4640ECHO=$ac_cv_path_ECHO
4641if test -n "$ECHO"; then
4642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4643$as_echo "$ECHO" >&6; }
4644else
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646$as_echo "no" >&6; }
4647fi
4648
4649
4650  test -n "$ECHO" && break
4651done
4652
4653
4654  if test "x$ECHO" = x; then
4655    if test "xecho" = x; then
4656      PROG_NAME=echo
4657    else
4658      PROG_NAME=echo
4659    fi
4660    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4661$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4662    as_fn_error $? "Cannot continue" "$LINENO" 5
4663  fi
4664
4665
4666
4667  for ac_prog in expr
4668do
4669  # Extract the first word of "$ac_prog", so it can be a program name with args.
4670set dummy $ac_prog; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_EXPR+:} false; then :
4674  $as_echo_n "(cached) " >&6
4675else
4676  case $EXPR in
4677  [\\/]* | ?:[\\/]*)
4678  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4679  ;;
4680  *)
4681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in $PATH
4683do
4684  IFS=$as_save_IFS
4685  test -z "$as_dir" && as_dir=.
4686    for ac_exec_ext in '' $ac_executable_extensions; do
4687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690    break 2
4691  fi
4692done
4693  done
4694IFS=$as_save_IFS
4695
4696  ;;
4697esac
4698fi
4699EXPR=$ac_cv_path_EXPR
4700if test -n "$EXPR"; then
4701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4702$as_echo "$EXPR" >&6; }
4703else
4704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709  test -n "$EXPR" && break
4710done
4711
4712
4713  if test "x$EXPR" = x; then
4714    if test "xexpr" = x; then
4715      PROG_NAME=expr
4716    else
4717      PROG_NAME=expr
4718    fi
4719    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4720$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4721    as_fn_error $? "Cannot continue" "$LINENO" 5
4722  fi
4723
4724
4725
4726  for ac_prog in file
4727do
4728  # Extract the first word of "$ac_prog", so it can be a program name with args.
4729set dummy $ac_prog; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
4732if ${ac_cv_path_FILE+:} false; then :
4733  $as_echo_n "(cached) " >&6
4734else
4735  case $FILE in
4736  [\\/]* | ?:[\\/]*)
4737  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4738  ;;
4739  *)
4740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743  IFS=$as_save_IFS
4744  test -z "$as_dir" && as_dir=.
4745    for ac_exec_ext in '' $ac_executable_extensions; do
4746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4747    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749    break 2
4750  fi
4751done
4752  done
4753IFS=$as_save_IFS
4754
4755  ;;
4756esac
4757fi
4758FILE=$ac_cv_path_FILE
4759if test -n "$FILE"; then
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4761$as_echo "$FILE" >&6; }
4762else
4763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767
4768  test -n "$FILE" && break
4769done
4770
4771
4772  if test "x$FILE" = x; then
4773    if test "xfile" = x; then
4774      PROG_NAME=file
4775    else
4776      PROG_NAME=file
4777    fi
4778    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4779$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4780    as_fn_error $? "Cannot continue" "$LINENO" 5
4781  fi
4782
4783
4784
4785  for ac_prog in find
4786do
4787  # Extract the first word of "$ac_prog", so it can be a program name with args.
4788set dummy $ac_prog; ac_word=$2
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4790$as_echo_n "checking for $ac_word... " >&6; }
4791if ${ac_cv_path_FIND+:} false; then :
4792  $as_echo_n "(cached) " >&6
4793else
4794  case $FIND in
4795  [\\/]* | ?:[\\/]*)
4796  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4797  ;;
4798  *)
4799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in $PATH
4801do
4802  IFS=$as_save_IFS
4803  test -z "$as_dir" && as_dir=.
4804    for ac_exec_ext in '' $ac_executable_extensions; do
4805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4806    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4808    break 2
4809  fi
4810done
4811  done
4812IFS=$as_save_IFS
4813
4814  ;;
4815esac
4816fi
4817FIND=$ac_cv_path_FIND
4818if test -n "$FIND"; then
4819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4820$as_echo "$FIND" >&6; }
4821else
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4823$as_echo "no" >&6; }
4824fi
4825
4826
4827  test -n "$FIND" && break
4828done
4829
4830
4831  if test "x$FIND" = x; then
4832    if test "xfind" = x; then
4833      PROG_NAME=find
4834    else
4835      PROG_NAME=find
4836    fi
4837    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4838$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4839    as_fn_error $? "Cannot continue" "$LINENO" 5
4840  fi
4841
4842
4843
4844  for ac_prog in head
4845do
4846  # Extract the first word of "$ac_prog", so it can be a program name with args.
4847set dummy $ac_prog; ac_word=$2
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
4850if ${ac_cv_path_HEAD+:} false; then :
4851  $as_echo_n "(cached) " >&6
4852else
4853  case $HEAD in
4854  [\\/]* | ?:[\\/]*)
4855  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4856  ;;
4857  *)
4858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in $PATH
4860do
4861  IFS=$as_save_IFS
4862  test -z "$as_dir" && as_dir=.
4863    for ac_exec_ext in '' $ac_executable_extensions; do
4864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4865    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867    break 2
4868  fi
4869done
4870  done
4871IFS=$as_save_IFS
4872
4873  ;;
4874esac
4875fi
4876HEAD=$ac_cv_path_HEAD
4877if test -n "$HEAD"; then
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4879$as_echo "$HEAD" >&6; }
4880else
4881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
4883fi
4884
4885
4886  test -n "$HEAD" && break
4887done
4888
4889
4890  if test "x$HEAD" = x; then
4891    if test "xhead" = x; then
4892      PROG_NAME=head
4893    else
4894      PROG_NAME=head
4895    fi
4896    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4897$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4898    as_fn_error $? "Cannot continue" "$LINENO" 5
4899  fi
4900
4901
4902
4903  for ac_prog in ln
4904do
4905  # Extract the first word of "$ac_prog", so it can be a program name with args.
4906set dummy $ac_prog; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_LN+:} false; then :
4910  $as_echo_n "(cached) " >&6
4911else
4912  case $LN in
4913  [\\/]* | ?:[\\/]*)
4914  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4915  ;;
4916  *)
4917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in $PATH
4919do
4920  IFS=$as_save_IFS
4921  test -z "$as_dir" && as_dir=.
4922    for ac_exec_ext in '' $ac_executable_extensions; do
4923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4924    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926    break 2
4927  fi
4928done
4929  done
4930IFS=$as_save_IFS
4931
4932  ;;
4933esac
4934fi
4935LN=$ac_cv_path_LN
4936if test -n "$LN"; then
4937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4938$as_echo "$LN" >&6; }
4939else
4940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944
4945  test -n "$LN" && break
4946done
4947
4948
4949  if test "x$LN" = x; then
4950    if test "xln" = x; then
4951      PROG_NAME=ln
4952    else
4953      PROG_NAME=ln
4954    fi
4955    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4956$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4957    as_fn_error $? "Cannot continue" "$LINENO" 5
4958  fi
4959
4960
4961
4962  for ac_prog in ls
4963do
4964  # Extract the first word of "$ac_prog", so it can be a program name with args.
4965set dummy $ac_prog; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
4968if ${ac_cv_path_LS+:} false; then :
4969  $as_echo_n "(cached) " >&6
4970else
4971  case $LS in
4972  [\\/]* | ?:[\\/]*)
4973  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4974  ;;
4975  *)
4976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in $PATH
4978do
4979  IFS=$as_save_IFS
4980  test -z "$as_dir" && as_dir=.
4981    for ac_exec_ext in '' $ac_executable_extensions; do
4982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985    break 2
4986  fi
4987done
4988  done
4989IFS=$as_save_IFS
4990
4991  ;;
4992esac
4993fi
4994LS=$ac_cv_path_LS
4995if test -n "$LS"; then
4996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4997$as_echo "$LS" >&6; }
4998else
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000$as_echo "no" >&6; }
5001fi
5002
5003
5004  test -n "$LS" && break
5005done
5006
5007
5008  if test "x$LS" = x; then
5009    if test "xls" = x; then
5010      PROG_NAME=ls
5011    else
5012      PROG_NAME=ls
5013    fi
5014    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5015$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5016    as_fn_error $? "Cannot continue" "$LINENO" 5
5017  fi
5018
5019
5020
5021  for ac_prog in mkdir
5022do
5023  # Extract the first word of "$ac_prog", so it can be a program name with args.
5024set dummy $ac_prog; ac_word=$2
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
5027if ${ac_cv_path_MKDIR+:} false; then :
5028  $as_echo_n "(cached) " >&6
5029else
5030  case $MKDIR in
5031  [\\/]* | ?:[\\/]*)
5032  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5033  ;;
5034  *)
5035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038  IFS=$as_save_IFS
5039  test -z "$as_dir" && as_dir=.
5040    for ac_exec_ext in '' $ac_executable_extensions; do
5041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044    break 2
5045  fi
5046done
5047  done
5048IFS=$as_save_IFS
5049
5050  ;;
5051esac
5052fi
5053MKDIR=$ac_cv_path_MKDIR
5054if test -n "$MKDIR"; then
5055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5056$as_echo "$MKDIR" >&6; }
5057else
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
5060fi
5061
5062
5063  test -n "$MKDIR" && break
5064done
5065
5066
5067  if test "x$MKDIR" = x; then
5068    if test "xmkdir" = x; then
5069      PROG_NAME=mkdir
5070    else
5071      PROG_NAME=mkdir
5072    fi
5073    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5075    as_fn_error $? "Cannot continue" "$LINENO" 5
5076  fi
5077
5078
5079
5080  for ac_prog in mktemp
5081do
5082  # Extract the first word of "$ac_prog", so it can be a program name with args.
5083set dummy $ac_prog; ac_word=$2
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
5086if ${ac_cv_path_MKTEMP+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089  case $MKTEMP in
5090  [\\/]* | ?:[\\/]*)
5091  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5092  ;;
5093  *)
5094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097  IFS=$as_save_IFS
5098  test -z "$as_dir" && as_dir=.
5099    for ac_exec_ext in '' $ac_executable_extensions; do
5100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103    break 2
5104  fi
5105done
5106  done
5107IFS=$as_save_IFS
5108
5109  ;;
5110esac
5111fi
5112MKTEMP=$ac_cv_path_MKTEMP
5113if test -n "$MKTEMP"; then
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5115$as_echo "$MKTEMP" >&6; }
5116else
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122  test -n "$MKTEMP" && break
5123done
5124
5125
5126  if test "x$MKTEMP" = x; then
5127    if test "xmktemp" = x; then
5128      PROG_NAME=mktemp
5129    else
5130      PROG_NAME=mktemp
5131    fi
5132    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5134    as_fn_error $? "Cannot continue" "$LINENO" 5
5135  fi
5136
5137
5138
5139  for ac_prog in mv
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_MV+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $MV in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171MV=$ac_cv_path_MV
5172if test -n "$MV"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5174$as_echo "$MV" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$MV" && break
5182done
5183
5184
5185  if test "x$MV" = x; then
5186    if test "xmv" = x; then
5187      PROG_NAME=mv
5188    else
5189      PROG_NAME=mv
5190    fi
5191    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5193    as_fn_error $? "Cannot continue" "$LINENO" 5
5194  fi
5195
5196
5197
5198  for ac_prog in printf
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_PRINTF+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $PRINTF in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230PRINTF=$ac_cv_path_PRINTF
5231if test -n "$PRINTF"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5233$as_echo "$PRINTF" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$PRINTF" && break
5241done
5242
5243
5244  if test "x$PRINTF" = x; then
5245    if test "xprintf" = x; then
5246      PROG_NAME=printf
5247    else
5248      PROG_NAME=printf
5249    fi
5250    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5251$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5252    as_fn_error $? "Cannot continue" "$LINENO" 5
5253  fi
5254
5255
5256
5257  for ac_prog in rm
5258do
5259  # Extract the first word of "$ac_prog", so it can be a program name with args.
5260set dummy $ac_prog; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if ${ac_cv_path_RM+:} false; then :
5264  $as_echo_n "(cached) " >&6
5265else
5266  case $RM in
5267  [\\/]* | ?:[\\/]*)
5268  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5269  ;;
5270  *)
5271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in $PATH
5273do
5274  IFS=$as_save_IFS
5275  test -z "$as_dir" && as_dir=.
5276    for ac_exec_ext in '' $ac_executable_extensions; do
5277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280    break 2
5281  fi
5282done
5283  done
5284IFS=$as_save_IFS
5285
5286  ;;
5287esac
5288fi
5289RM=$ac_cv_path_RM
5290if test -n "$RM"; then
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5292$as_echo "$RM" >&6; }
5293else
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  test -n "$RM" && break
5300done
5301
5302
5303  if test "x$RM" = x; then
5304    if test "xrm" = x; then
5305      PROG_NAME=rm
5306    else
5307      PROG_NAME=rm
5308    fi
5309    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5311    as_fn_error $? "Cannot continue" "$LINENO" 5
5312  fi
5313
5314
5315
5316  for ac_prog in sh
5317do
5318  # Extract the first word of "$ac_prog", so it can be a program name with args.
5319set dummy $ac_prog; ac_word=$2
5320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321$as_echo_n "checking for $ac_word... " >&6; }
5322if ${ac_cv_path_SH+:} false; then :
5323  $as_echo_n "(cached) " >&6
5324else
5325  case $SH in
5326  [\\/]* | ?:[\\/]*)
5327  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5328  ;;
5329  *)
5330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331for as_dir in $PATH
5332do
5333  IFS=$as_save_IFS
5334  test -z "$as_dir" && as_dir=.
5335    for ac_exec_ext in '' $ac_executable_extensions; do
5336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339    break 2
5340  fi
5341done
5342  done
5343IFS=$as_save_IFS
5344
5345  ;;
5346esac
5347fi
5348SH=$ac_cv_path_SH
5349if test -n "$SH"; then
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5351$as_echo "$SH" >&6; }
5352else
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356
5357
5358  test -n "$SH" && break
5359done
5360
5361
5362  if test "x$SH" = x; then
5363    if test "xsh" = x; then
5364      PROG_NAME=sh
5365    else
5366      PROG_NAME=sh
5367    fi
5368    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5369$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5370    as_fn_error $? "Cannot continue" "$LINENO" 5
5371  fi
5372
5373
5374
5375  for ac_prog in sort
5376do
5377  # Extract the first word of "$ac_prog", so it can be a program name with args.
5378set dummy $ac_prog; ac_word=$2
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5380$as_echo_n "checking for $ac_word... " >&6; }
5381if ${ac_cv_path_SORT+:} false; then :
5382  $as_echo_n "(cached) " >&6
5383else
5384  case $SORT in
5385  [\\/]* | ?:[\\/]*)
5386  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5387  ;;
5388  *)
5389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5390for as_dir in $PATH
5391do
5392  IFS=$as_save_IFS
5393  test -z "$as_dir" && as_dir=.
5394    for ac_exec_ext in '' $ac_executable_extensions; do
5395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5396    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5398    break 2
5399  fi
5400done
5401  done
5402IFS=$as_save_IFS
5403
5404  ;;
5405esac
5406fi
5407SORT=$ac_cv_path_SORT
5408if test -n "$SORT"; then
5409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5410$as_echo "$SORT" >&6; }
5411else
5412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413$as_echo "no" >&6; }
5414fi
5415
5416
5417  test -n "$SORT" && break
5418done
5419
5420
5421  if test "x$SORT" = x; then
5422    if test "xsort" = x; then
5423      PROG_NAME=sort
5424    else
5425      PROG_NAME=sort
5426    fi
5427    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5428$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5429    as_fn_error $? "Cannot continue" "$LINENO" 5
5430  fi
5431
5432
5433
5434  for ac_prog in tail
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_TAIL+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $TAIL in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466TAIL=$ac_cv_path_TAIL
5467if test -n "$TAIL"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5469$as_echo "$TAIL" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$TAIL" && break
5477done
5478
5479
5480  if test "x$TAIL" = x; then
5481    if test "xtail" = x; then
5482      PROG_NAME=tail
5483    else
5484      PROG_NAME=tail
5485    fi
5486    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5487$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5488    as_fn_error $? "Cannot continue" "$LINENO" 5
5489  fi
5490
5491
5492
5493  for ac_prog in tar
5494do
5495  # Extract the first word of "$ac_prog", so it can be a program name with args.
5496set dummy $ac_prog; ac_word=$2
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498$as_echo_n "checking for $ac_word... " >&6; }
5499if ${ac_cv_path_TAR+:} false; then :
5500  $as_echo_n "(cached) " >&6
5501else
5502  case $TAR in
5503  [\\/]* | ?:[\\/]*)
5504  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5505  ;;
5506  *)
5507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510  IFS=$as_save_IFS
5511  test -z "$as_dir" && as_dir=.
5512    for ac_exec_ext in '' $ac_executable_extensions; do
5513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516    break 2
5517  fi
5518done
5519  done
5520IFS=$as_save_IFS
5521
5522  ;;
5523esac
5524fi
5525TAR=$ac_cv_path_TAR
5526if test -n "$TAR"; then
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5528$as_echo "$TAR" >&6; }
5529else
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532fi
5533
5534
5535  test -n "$TAR" && break
5536done
5537
5538
5539  if test "x$TAR" = x; then
5540    if test "xtar" = x; then
5541      PROG_NAME=tar
5542    else
5543      PROG_NAME=tar
5544    fi
5545    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5546$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5547    as_fn_error $? "Cannot continue" "$LINENO" 5
5548  fi
5549
5550
5551
5552  for ac_prog in tee
5553do
5554  # Extract the first word of "$ac_prog", so it can be a program name with args.
5555set dummy $ac_prog; ac_word=$2
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557$as_echo_n "checking for $ac_word... " >&6; }
5558if ${ac_cv_path_TEE+:} false; then :
5559  $as_echo_n "(cached) " >&6
5560else
5561  case $TEE in
5562  [\\/]* | ?:[\\/]*)
5563  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5564  ;;
5565  *)
5566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567for as_dir in $PATH
5568do
5569  IFS=$as_save_IFS
5570  test -z "$as_dir" && as_dir=.
5571    for ac_exec_ext in '' $ac_executable_extensions; do
5572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5573    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5575    break 2
5576  fi
5577done
5578  done
5579IFS=$as_save_IFS
5580
5581  ;;
5582esac
5583fi
5584TEE=$ac_cv_path_TEE
5585if test -n "$TEE"; then
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5587$as_echo "$TEE" >&6; }
5588else
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590$as_echo "no" >&6; }
5591fi
5592
5593
5594  test -n "$TEE" && break
5595done
5596
5597
5598  if test "x$TEE" = x; then
5599    if test "xtee" = x; then
5600      PROG_NAME=tee
5601    else
5602      PROG_NAME=tee
5603    fi
5604    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5605$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5606    as_fn_error $? "Cannot continue" "$LINENO" 5
5607  fi
5608
5609
5610
5611  for ac_prog in touch
5612do
5613  # Extract the first word of "$ac_prog", so it can be a program name with args.
5614set dummy $ac_prog; ac_word=$2
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5616$as_echo_n "checking for $ac_word... " >&6; }
5617if ${ac_cv_path_TOUCH+:} false; then :
5618  $as_echo_n "(cached) " >&6
5619else
5620  case $TOUCH in
5621  [\\/]* | ?:[\\/]*)
5622  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5623  ;;
5624  *)
5625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628  IFS=$as_save_IFS
5629  test -z "$as_dir" && as_dir=.
5630    for ac_exec_ext in '' $ac_executable_extensions; do
5631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5632    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634    break 2
5635  fi
5636done
5637  done
5638IFS=$as_save_IFS
5639
5640  ;;
5641esac
5642fi
5643TOUCH=$ac_cv_path_TOUCH
5644if test -n "$TOUCH"; then
5645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5646$as_echo "$TOUCH" >&6; }
5647else
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
5650fi
5651
5652
5653  test -n "$TOUCH" && break
5654done
5655
5656
5657  if test "x$TOUCH" = x; then
5658    if test "xtouch" = x; then
5659      PROG_NAME=touch
5660    else
5661      PROG_NAME=touch
5662    fi
5663    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5664$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5665    as_fn_error $? "Cannot continue" "$LINENO" 5
5666  fi
5667
5668
5669
5670  for ac_prog in tr
5671do
5672  # Extract the first word of "$ac_prog", so it can be a program name with args.
5673set dummy $ac_prog; ac_word=$2
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675$as_echo_n "checking for $ac_word... " >&6; }
5676if ${ac_cv_path_TR+:} false; then :
5677  $as_echo_n "(cached) " >&6
5678else
5679  case $TR in
5680  [\\/]* | ?:[\\/]*)
5681  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5682  ;;
5683  *)
5684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685for as_dir in $PATH
5686do
5687  IFS=$as_save_IFS
5688  test -z "$as_dir" && as_dir=.
5689    for ac_exec_ext in '' $ac_executable_extensions; do
5690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5691    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5693    break 2
5694  fi
5695done
5696  done
5697IFS=$as_save_IFS
5698
5699  ;;
5700esac
5701fi
5702TR=$ac_cv_path_TR
5703if test -n "$TR"; then
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5705$as_echo "$TR" >&6; }
5706else
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708$as_echo "no" >&6; }
5709fi
5710
5711
5712  test -n "$TR" && break
5713done
5714
5715
5716  if test "x$TR" = x; then
5717    if test "xtr" = x; then
5718      PROG_NAME=tr
5719    else
5720      PROG_NAME=tr
5721    fi
5722    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5723$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5724    as_fn_error $? "Cannot continue" "$LINENO" 5
5725  fi
5726
5727
5728
5729  for ac_prog in uname
5730do
5731  # Extract the first word of "$ac_prog", so it can be a program name with args.
5732set dummy $ac_prog; ac_word=$2
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
5735if ${ac_cv_path_UNAME+:} false; then :
5736  $as_echo_n "(cached) " >&6
5737else
5738  case $UNAME in
5739  [\\/]* | ?:[\\/]*)
5740  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5741  ;;
5742  *)
5743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744for as_dir in $PATH
5745do
5746  IFS=$as_save_IFS
5747  test -z "$as_dir" && as_dir=.
5748    for ac_exec_ext in '' $ac_executable_extensions; do
5749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752    break 2
5753  fi
5754done
5755  done
5756IFS=$as_save_IFS
5757
5758  ;;
5759esac
5760fi
5761UNAME=$ac_cv_path_UNAME
5762if test -n "$UNAME"; then
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5764$as_echo "$UNAME" >&6; }
5765else
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770
5771  test -n "$UNAME" && break
5772done
5773
5774
5775  if test "x$UNAME" = x; then
5776    if test "xuname" = x; then
5777      PROG_NAME=uname
5778    else
5779      PROG_NAME=uname
5780    fi
5781    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5782$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5783    as_fn_error $? "Cannot continue" "$LINENO" 5
5784  fi
5785
5786
5787
5788  for ac_prog in uniq
5789do
5790  # Extract the first word of "$ac_prog", so it can be a program name with args.
5791set dummy $ac_prog; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_path_UNIQ+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $UNIQ in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5800  ;;
5801  *)
5802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805  IFS=$as_save_IFS
5806  test -z "$as_dir" && as_dir=.
5807    for ac_exec_ext in '' $ac_executable_extensions; do
5808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811    break 2
5812  fi
5813done
5814  done
5815IFS=$as_save_IFS
5816
5817  ;;
5818esac
5819fi
5820UNIQ=$ac_cv_path_UNIQ
5821if test -n "$UNIQ"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5823$as_echo "$UNIQ" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830  test -n "$UNIQ" && break
5831done
5832
5833
5834  if test "x$UNIQ" = x; then
5835    if test "xuniq" = x; then
5836      PROG_NAME=uniq
5837    else
5838      PROG_NAME=uniq
5839    fi
5840    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5841$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5842    as_fn_error $? "Cannot continue" "$LINENO" 5
5843  fi
5844
5845
5846
5847  for ac_prog in wc
5848do
5849  # Extract the first word of "$ac_prog", so it can be a program name with args.
5850set dummy $ac_prog; ac_word=$2
5851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5852$as_echo_n "checking for $ac_word... " >&6; }
5853if ${ac_cv_path_WC+:} false; then :
5854  $as_echo_n "(cached) " >&6
5855else
5856  case $WC in
5857  [\\/]* | ?:[\\/]*)
5858  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5859  ;;
5860  *)
5861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5862for as_dir in $PATH
5863do
5864  IFS=$as_save_IFS
5865  test -z "$as_dir" && as_dir=.
5866    for ac_exec_ext in '' $ac_executable_extensions; do
5867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5868    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5870    break 2
5871  fi
5872done
5873  done
5874IFS=$as_save_IFS
5875
5876  ;;
5877esac
5878fi
5879WC=$ac_cv_path_WC
5880if test -n "$WC"; then
5881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5882$as_echo "$WC" >&6; }
5883else
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886fi
5887
5888
5889  test -n "$WC" && break
5890done
5891
5892
5893  if test "x$WC" = x; then
5894    if test "xwc" = x; then
5895      PROG_NAME=wc
5896    else
5897      PROG_NAME=wc
5898    fi
5899    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5901    as_fn_error $? "Cannot continue" "$LINENO" 5
5902  fi
5903
5904
5905
5906  for ac_prog in which
5907do
5908  # Extract the first word of "$ac_prog", so it can be a program name with args.
5909set dummy $ac_prog; ac_word=$2
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5911$as_echo_n "checking for $ac_word... " >&6; }
5912if ${ac_cv_path_WHICH+:} false; then :
5913  $as_echo_n "(cached) " >&6
5914else
5915  case $WHICH in
5916  [\\/]* | ?:[\\/]*)
5917  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5918  ;;
5919  *)
5920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH
5922do
5923  IFS=$as_save_IFS
5924  test -z "$as_dir" && as_dir=.
5925    for ac_exec_ext in '' $ac_executable_extensions; do
5926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5927    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929    break 2
5930  fi
5931done
5932  done
5933IFS=$as_save_IFS
5934
5935  ;;
5936esac
5937fi
5938WHICH=$ac_cv_path_WHICH
5939if test -n "$WHICH"; then
5940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5941$as_echo "$WHICH" >&6; }
5942else
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948  test -n "$WHICH" && break
5949done
5950
5951
5952  if test "x$WHICH" = x; then
5953    if test "xwhich" = x; then
5954      PROG_NAME=which
5955    else
5956      PROG_NAME=which
5957    fi
5958    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5960    as_fn_error $? "Cannot continue" "$LINENO" 5
5961  fi
5962
5963
5964
5965  for ac_prog in xargs
5966do
5967  # Extract the first word of "$ac_prog", so it can be a program name with args.
5968set dummy $ac_prog; ac_word=$2
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970$as_echo_n "checking for $ac_word... " >&6; }
5971if ${ac_cv_path_XARGS+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974  case $XARGS in
5975  [\\/]* | ?:[\\/]*)
5976  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5977  ;;
5978  *)
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_exec_ext in '' $ac_executable_extensions; do
5985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5986    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5988    break 2
5989  fi
5990done
5991  done
5992IFS=$as_save_IFS
5993
5994  ;;
5995esac
5996fi
5997XARGS=$ac_cv_path_XARGS
5998if test -n "$XARGS"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6000$as_echo "$XARGS" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007  test -n "$XARGS" && break
6008done
6009
6010
6011  if test "x$XARGS" = x; then
6012    if test "xxargs" = x; then
6013      PROG_NAME=xargs
6014    else
6015      PROG_NAME=xargs
6016    fi
6017    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6018$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6019    as_fn_error $? "Cannot continue" "$LINENO" 5
6020  fi
6021
6022
6023
6024  # Then required tools that require some special treatment.
6025  for ac_prog in gawk mawk nawk awk
6026do
6027  # Extract the first word of "$ac_prog", so it can be a program name with args.
6028set dummy $ac_prog; ac_word=$2
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6030$as_echo_n "checking for $ac_word... " >&6; }
6031if ${ac_cv_prog_AWK+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  if test -n "$AWK"; then
6035  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6036else
6037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH
6039do
6040  IFS=$as_save_IFS
6041  test -z "$as_dir" && as_dir=.
6042    for ac_exec_ext in '' $ac_executable_extensions; do
6043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6044    ac_cv_prog_AWK="$ac_prog"
6045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6046    break 2
6047  fi
6048done
6049  done
6050IFS=$as_save_IFS
6051
6052fi
6053fi
6054AWK=$ac_cv_prog_AWK
6055if test -n "$AWK"; then
6056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6057$as_echo "$AWK" >&6; }
6058else
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6060$as_echo "no" >&6; }
6061fi
6062
6063
6064  test -n "$AWK" && break
6065done
6066
6067
6068  if test "x$AWK" = x; then
6069    if test "x" = x; then
6070      PROG_NAME=awk
6071    else
6072      PROG_NAME=
6073    fi
6074    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6075$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6076    as_fn_error $? "Cannot continue" "$LINENO" 5
6077  fi
6078
6079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6080$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6081if ${ac_cv_path_GREP+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  if test -z "$GREP"; then
6085  ac_path_GREP_found=false
6086  # Loop through the user's path and test for each of PROGNAME-LIST
6087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6089do
6090  IFS=$as_save_IFS
6091  test -z "$as_dir" && as_dir=.
6092    for ac_prog in grep ggrep; do
6093    for ac_exec_ext in '' $ac_executable_extensions; do
6094      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6095      as_fn_executable_p "$ac_path_GREP" || continue
6096# Check for GNU ac_path_GREP and select it if it is found.
6097  # Check for GNU $ac_path_GREP
6098case `"$ac_path_GREP" --version 2>&1` in
6099*GNU*)
6100  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6101*)
6102  ac_count=0
6103  $as_echo_n 0123456789 >"conftest.in"
6104  while :
6105  do
6106    cat "conftest.in" "conftest.in" >"conftest.tmp"
6107    mv "conftest.tmp" "conftest.in"
6108    cp "conftest.in" "conftest.nl"
6109    $as_echo 'GREP' >> "conftest.nl"
6110    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6111    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6112    as_fn_arith $ac_count + 1 && ac_count=$as_val
6113    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6114      # Best one so far, save it but keep looking for a better one
6115      ac_cv_path_GREP="$ac_path_GREP"
6116      ac_path_GREP_max=$ac_count
6117    fi
6118    # 10*(2^10) chars as input seems more than enough
6119    test $ac_count -gt 10 && break
6120  done
6121  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6122esac
6123
6124      $ac_path_GREP_found && break 3
6125    done
6126  done
6127  done
6128IFS=$as_save_IFS
6129  if test -z "$ac_cv_path_GREP"; then
6130    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6131  fi
6132else
6133  ac_cv_path_GREP=$GREP
6134fi
6135
6136fi
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6138$as_echo "$ac_cv_path_GREP" >&6; }
6139 GREP="$ac_cv_path_GREP"
6140
6141
6142
6143  if test "x$GREP" = x; then
6144    if test "x" = x; then
6145      PROG_NAME=grep
6146    else
6147      PROG_NAME=
6148    fi
6149    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6150$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6151    as_fn_error $? "Cannot continue" "$LINENO" 5
6152  fi
6153
6154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6155$as_echo_n "checking for egrep... " >&6; }
6156if ${ac_cv_path_EGREP+:} false; then :
6157  $as_echo_n "(cached) " >&6
6158else
6159  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6160   then ac_cv_path_EGREP="$GREP -E"
6161   else
6162     if test -z "$EGREP"; then
6163  ac_path_EGREP_found=false
6164  # Loop through the user's path and test for each of PROGNAME-LIST
6165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6167do
6168  IFS=$as_save_IFS
6169  test -z "$as_dir" && as_dir=.
6170    for ac_prog in egrep; do
6171    for ac_exec_ext in '' $ac_executable_extensions; do
6172      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6173      as_fn_executable_p "$ac_path_EGREP" || continue
6174# Check for GNU ac_path_EGREP and select it if it is found.
6175  # Check for GNU $ac_path_EGREP
6176case `"$ac_path_EGREP" --version 2>&1` in
6177*GNU*)
6178  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6179*)
6180  ac_count=0
6181  $as_echo_n 0123456789 >"conftest.in"
6182  while :
6183  do
6184    cat "conftest.in" "conftest.in" >"conftest.tmp"
6185    mv "conftest.tmp" "conftest.in"
6186    cp "conftest.in" "conftest.nl"
6187    $as_echo 'EGREP' >> "conftest.nl"
6188    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6189    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6190    as_fn_arith $ac_count + 1 && ac_count=$as_val
6191    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6192      # Best one so far, save it but keep looking for a better one
6193      ac_cv_path_EGREP="$ac_path_EGREP"
6194      ac_path_EGREP_max=$ac_count
6195    fi
6196    # 10*(2^10) chars as input seems more than enough
6197    test $ac_count -gt 10 && break
6198  done
6199  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6200esac
6201
6202      $ac_path_EGREP_found && break 3
6203    done
6204  done
6205  done
6206IFS=$as_save_IFS
6207  if test -z "$ac_cv_path_EGREP"; then
6208    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6209  fi
6210else
6211  ac_cv_path_EGREP=$EGREP
6212fi
6213
6214   fi
6215fi
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6217$as_echo "$ac_cv_path_EGREP" >&6; }
6218 EGREP="$ac_cv_path_EGREP"
6219
6220
6221
6222  if test "x$EGREP" = x; then
6223    if test "x" = x; then
6224      PROG_NAME=egrep
6225    else
6226      PROG_NAME=
6227    fi
6228    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6230    as_fn_error $? "Cannot continue" "$LINENO" 5
6231  fi
6232
6233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6234$as_echo_n "checking for fgrep... " >&6; }
6235if ${ac_cv_path_FGREP+:} false; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6239   then ac_cv_path_FGREP="$GREP -F"
6240   else
6241     if test -z "$FGREP"; then
6242  ac_path_FGREP_found=false
6243  # Loop through the user's path and test for each of PROGNAME-LIST
6244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6246do
6247  IFS=$as_save_IFS
6248  test -z "$as_dir" && as_dir=.
6249    for ac_prog in fgrep; do
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6252      as_fn_executable_p "$ac_path_FGREP" || continue
6253# Check for GNU ac_path_FGREP and select it if it is found.
6254  # Check for GNU $ac_path_FGREP
6255case `"$ac_path_FGREP" --version 2>&1` in
6256*GNU*)
6257  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6258*)
6259  ac_count=0
6260  $as_echo_n 0123456789 >"conftest.in"
6261  while :
6262  do
6263    cat "conftest.in" "conftest.in" >"conftest.tmp"
6264    mv "conftest.tmp" "conftest.in"
6265    cp "conftest.in" "conftest.nl"
6266    $as_echo 'FGREP' >> "conftest.nl"
6267    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269    as_fn_arith $ac_count + 1 && ac_count=$as_val
6270    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6271      # Best one so far, save it but keep looking for a better one
6272      ac_cv_path_FGREP="$ac_path_FGREP"
6273      ac_path_FGREP_max=$ac_count
6274    fi
6275    # 10*(2^10) chars as input seems more than enough
6276    test $ac_count -gt 10 && break
6277  done
6278  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6279esac
6280
6281      $ac_path_FGREP_found && break 3
6282    done
6283  done
6284  done
6285IFS=$as_save_IFS
6286  if test -z "$ac_cv_path_FGREP"; then
6287    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6288  fi
6289else
6290  ac_cv_path_FGREP=$FGREP
6291fi
6292
6293   fi
6294fi
6295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6296$as_echo "$ac_cv_path_FGREP" >&6; }
6297 FGREP="$ac_cv_path_FGREP"
6298
6299
6300
6301  if test "x$FGREP" = x; then
6302    if test "x" = x; then
6303      PROG_NAME=fgrep
6304    else
6305      PROG_NAME=
6306    fi
6307    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6308$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6309    as_fn_error $? "Cannot continue" "$LINENO" 5
6310  fi
6311
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6313$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6314if ${ac_cv_path_SED+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6318     for ac_i in 1 2 3 4 5 6 7; do
6319       ac_script="$ac_script$as_nl$ac_script"
6320     done
6321     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6322     { ac_script=; unset ac_script;}
6323     if test -z "$SED"; then
6324  ac_path_SED_found=false
6325  # Loop through the user's path and test for each of PROGNAME-LIST
6326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6327for as_dir in $PATH
6328do
6329  IFS=$as_save_IFS
6330  test -z "$as_dir" && as_dir=.
6331    for ac_prog in sed gsed; do
6332    for ac_exec_ext in '' $ac_executable_extensions; do
6333      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6334      as_fn_executable_p "$ac_path_SED" || continue
6335# Check for GNU ac_path_SED and select it if it is found.
6336  # Check for GNU $ac_path_SED
6337case `"$ac_path_SED" --version 2>&1` in
6338*GNU*)
6339  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6340*)
6341  ac_count=0
6342  $as_echo_n 0123456789 >"conftest.in"
6343  while :
6344  do
6345    cat "conftest.in" "conftest.in" >"conftest.tmp"
6346    mv "conftest.tmp" "conftest.in"
6347    cp "conftest.in" "conftest.nl"
6348    $as_echo '' >> "conftest.nl"
6349    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6350    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6351    as_fn_arith $ac_count + 1 && ac_count=$as_val
6352    if test $ac_count -gt ${ac_path_SED_max-0}; then
6353      # Best one so far, save it but keep looking for a better one
6354      ac_cv_path_SED="$ac_path_SED"
6355      ac_path_SED_max=$ac_count
6356    fi
6357    # 10*(2^10) chars as input seems more than enough
6358    test $ac_count -gt 10 && break
6359  done
6360  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6361esac
6362
6363      $ac_path_SED_found && break 3
6364    done
6365  done
6366  done
6367IFS=$as_save_IFS
6368  if test -z "$ac_cv_path_SED"; then
6369    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6370  fi
6371else
6372  ac_cv_path_SED=$SED
6373fi
6374
6375fi
6376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6377$as_echo "$ac_cv_path_SED" >&6; }
6378 SED="$ac_cv_path_SED"
6379  rm -f conftest.sed
6380
6381
6382  if test "x$SED" = x; then
6383    if test "x" = x; then
6384      PROG_NAME=sed
6385    else
6386      PROG_NAME=
6387    fi
6388    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6389$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6390    as_fn_error $? "Cannot continue" "$LINENO" 5
6391  fi
6392
6393
6394  for ac_prog in nawk gawk awk
6395do
6396  # Extract the first word of "$ac_prog", so it can be a program name with args.
6397set dummy $ac_prog; ac_word=$2
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if ${ac_cv_path_NAWK+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  case $NAWK in
6404  [\\/]* | ?:[\\/]*)
6405  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6406  ;;
6407  *)
6408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH
6410do
6411  IFS=$as_save_IFS
6412  test -z "$as_dir" && as_dir=.
6413    for ac_exec_ext in '' $ac_executable_extensions; do
6414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6415    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6417    break 2
6418  fi
6419done
6420  done
6421IFS=$as_save_IFS
6422
6423  ;;
6424esac
6425fi
6426NAWK=$ac_cv_path_NAWK
6427if test -n "$NAWK"; then
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6429$as_echo "$NAWK" >&6; }
6430else
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435
6436  test -n "$NAWK" && break
6437done
6438
6439
6440  if test "x$NAWK" = x; then
6441    if test "x" = x; then
6442      PROG_NAME=nawk
6443    else
6444      PROG_NAME=
6445    fi
6446    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6447$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6448    as_fn_error $? "Cannot continue" "$LINENO" 5
6449  fi
6450
6451
6452  # Always force rm.
6453  RM="$RM -f"
6454
6455  # pwd behaves differently on various platforms and some don't support the -L flag.
6456  # Always use the bash builtin pwd to get uniform behavior.
6457  THEPWDCMD=pwd
6458
6459  # These are not required on all platforms
6460  # Extract the first word of "cygpath", so it can be a program name with args.
6461set dummy cygpath; ac_word=$2
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463$as_echo_n "checking for $ac_word... " >&6; }
6464if ${ac_cv_path_CYGPATH+:} false; then :
6465  $as_echo_n "(cached) " >&6
6466else
6467  case $CYGPATH in
6468  [\\/]* | ?:[\\/]*)
6469  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6470  ;;
6471  *)
6472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6473for as_dir in $PATH
6474do
6475  IFS=$as_save_IFS
6476  test -z "$as_dir" && as_dir=.
6477    for ac_exec_ext in '' $ac_executable_extensions; do
6478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6479    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6481    break 2
6482  fi
6483done
6484  done
6485IFS=$as_save_IFS
6486
6487  ;;
6488esac
6489fi
6490CYGPATH=$ac_cv_path_CYGPATH
6491if test -n "$CYGPATH"; then
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6493$as_echo "$CYGPATH" >&6; }
6494else
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6496$as_echo "no" >&6; }
6497fi
6498
6499
6500  # Extract the first word of "readlink", so it can be a program name with args.
6501set dummy readlink; ac_word=$2
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6503$as_echo_n "checking for $ac_word... " >&6; }
6504if ${ac_cv_path_READLINK+:} false; then :
6505  $as_echo_n "(cached) " >&6
6506else
6507  case $READLINK in
6508  [\\/]* | ?:[\\/]*)
6509  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6510  ;;
6511  *)
6512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513for as_dir in $PATH
6514do
6515  IFS=$as_save_IFS
6516  test -z "$as_dir" && as_dir=.
6517    for ac_exec_ext in '' $ac_executable_extensions; do
6518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6519    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6521    break 2
6522  fi
6523done
6524  done
6525IFS=$as_save_IFS
6526
6527  ;;
6528esac
6529fi
6530READLINK=$ac_cv_path_READLINK
6531if test -n "$READLINK"; then
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6533$as_echo "$READLINK" >&6; }
6534else
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539
6540  # Extract the first word of "df", so it can be a program name with args.
6541set dummy df; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_DF+:} false; then :
6545  $as_echo_n "(cached) " >&6
6546else
6547  case $DF in
6548  [\\/]* | ?:[\\/]*)
6549  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6550  ;;
6551  *)
6552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in $PATH
6554do
6555  IFS=$as_save_IFS
6556  test -z "$as_dir" && as_dir=.
6557    for ac_exec_ext in '' $ac_executable_extensions; do
6558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561    break 2
6562  fi
6563done
6564  done
6565IFS=$as_save_IFS
6566
6567  ;;
6568esac
6569fi
6570DF=$ac_cv_path_DF
6571if test -n "$DF"; then
6572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6573$as_echo "$DF" >&6; }
6574else
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
6579
6580  # Extract the first word of "SetFile", so it can be a program name with args.
6581set dummy SetFile; ac_word=$2
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583$as_echo_n "checking for $ac_word... " >&6; }
6584if ${ac_cv_path_SETFILE+:} false; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  case $SETFILE in
6588  [\\/]* | ?:[\\/]*)
6589  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6590  ;;
6591  *)
6592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593for as_dir in $PATH
6594do
6595  IFS=$as_save_IFS
6596  test -z "$as_dir" && as_dir=.
6597    for ac_exec_ext in '' $ac_executable_extensions; do
6598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6599    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6601    break 2
6602  fi
6603done
6604  done
6605IFS=$as_save_IFS
6606
6607  ;;
6608esac
6609fi
6610SETFILE=$ac_cv_path_SETFILE
6611if test -n "$SETFILE"; then
6612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6613$as_echo "$SETFILE" >&6; }
6614else
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616$as_echo "no" >&6; }
6617fi
6618
6619
6620
6621
6622# Now we can determine OpenJDK build and target platforms. This is required to
6623# have early on.
6624# Make sure we can run config.sub.
6625$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6626  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6627
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6629$as_echo_n "checking build system type... " >&6; }
6630if ${ac_cv_build+:} false; then :
6631  $as_echo_n "(cached) " >&6
6632else
6633  ac_build_alias=$build_alias
6634test "x$ac_build_alias" = x &&
6635  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6636test "x$ac_build_alias" = x &&
6637  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6638ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6639  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6640
6641fi
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6643$as_echo "$ac_cv_build" >&6; }
6644case $ac_cv_build in
6645*-*-*) ;;
6646*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6647esac
6648build=$ac_cv_build
6649ac_save_IFS=$IFS; IFS='-'
6650set x $ac_cv_build
6651shift
6652build_cpu=$1
6653build_vendor=$2
6654shift; shift
6655# Remember, the first character of IFS is used to create $*,
6656# except with old shells:
6657build_os=$*
6658IFS=$ac_save_IFS
6659case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6660
6661
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6663$as_echo_n "checking host system type... " >&6; }
6664if ${ac_cv_host+:} false; then :
6665  $as_echo_n "(cached) " >&6
6666else
6667  if test "x$host_alias" = x; then
6668  ac_cv_host=$ac_cv_build
6669else
6670  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6671    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6672fi
6673
6674fi
6675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6676$as_echo "$ac_cv_host" >&6; }
6677case $ac_cv_host in
6678*-*-*) ;;
6679*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6680esac
6681host=$ac_cv_host
6682ac_save_IFS=$IFS; IFS='-'
6683set x $ac_cv_host
6684shift
6685host_cpu=$1
6686host_vendor=$2
6687shift; shift
6688# Remember, the first character of IFS is used to create $*,
6689# except with old shells:
6690host_os=$*
6691IFS=$ac_save_IFS
6692case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6693
6694
6695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6696$as_echo_n "checking target system type... " >&6; }
6697if ${ac_cv_target+:} false; then :
6698  $as_echo_n "(cached) " >&6
6699else
6700  if test "x$target_alias" = x; then
6701  ac_cv_target=$ac_cv_host
6702else
6703  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6704    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6705fi
6706
6707fi
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6709$as_echo "$ac_cv_target" >&6; }
6710case $ac_cv_target in
6711*-*-*) ;;
6712*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6713esac
6714target=$ac_cv_target
6715ac_save_IFS=$IFS; IFS='-'
6716set x $ac_cv_target
6717shift
6718target_cpu=$1
6719target_vendor=$2
6720shift; shift
6721# Remember, the first character of IFS is used to create $*,
6722# except with old shells:
6723target_os=$*
6724IFS=$ac_save_IFS
6725case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6726
6727
6728# The aliases save the names the user supplied, while $host etc.
6729# will get canonicalized.
6730test -n "$target_alias" &&
6731  test "$program_prefix$program_suffix$program_transform_name" = \
6732    NONENONEs,x,x, &&
6733  program_prefix=${target_alias}-
6734
6735  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6736  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6737  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6738  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6739  # to use the configure naming style.
6740
6741
6742
6743
6744
6745  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6746  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6747  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6748  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6749  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6750  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6751
6752
6753
6754  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6755
6756  case "$build_os" in
6757    *linux*)
6758      VAR_OS=linux
6759      VAR_OS_API=posix
6760      VAR_OS_ENV=linux
6761      ;;
6762    *solaris*)
6763      VAR_OS=solaris
6764      VAR_OS_API=posix
6765      VAR_OS_ENV=solaris
6766      ;;
6767    *darwin*)
6768      VAR_OS=macosx
6769      VAR_OS_API=posix
6770      VAR_OS_ENV=macosx
6771      ;;
6772    *bsd*)
6773      VAR_OS=bsd
6774      VAR_OS_API=posix
6775      VAR_OS_ENV=bsd
6776      ;;
6777    *cygwin*)
6778      VAR_OS=windows
6779      VAR_OS_API=winapi
6780      VAR_OS_ENV=windows.cygwin
6781      ;;
6782    *mingw*)
6783      VAR_OS=windows
6784      VAR_OS_API=winapi
6785      VAR_OS_ENV=windows.msys
6786      ;;
6787    *)
6788      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6789      ;;
6790  esac
6791
6792
6793  # First argument is the cpu name from the trip/quad
6794  case "$build_cpu" in
6795    x86_64)
6796      VAR_CPU=x86_64
6797      VAR_CPU_ARCH=x86
6798      VAR_CPU_BITS=64
6799      VAR_CPU_ENDIAN=little
6800      ;;
6801    i?86)
6802      VAR_CPU=x86
6803      VAR_CPU_ARCH=x86
6804      VAR_CPU_BITS=32
6805      VAR_CPU_ENDIAN=little
6806      ;;
6807    arm*)
6808      VAR_CPU=arm
6809      VAR_CPU_ARCH=arm
6810      VAR_CPU_BITS=32
6811      VAR_CPU_ENDIAN=little
6812      ;;
6813    powerpc)
6814      VAR_CPU=ppc
6815      VAR_CPU_ARCH=ppc
6816      VAR_CPU_BITS=32
6817      VAR_CPU_ENDIAN=big
6818      ;;
6819    powerpc64)
6820      VAR_CPU=ppc64
6821      VAR_CPU_ARCH=ppc
6822      VAR_CPU_BITS=64
6823      VAR_CPU_ENDIAN=big
6824      ;;
6825    s390)
6826      VAR_CPU=s390
6827      VAR_CPU_ARCH=s390
6828      VAR_CPU_BITS=32
6829      VAR_CPU_ENDIAN=big
6830      ;;
6831    s390x)
6832      VAR_CPU=s390x
6833      VAR_CPU_ARCH=s390
6834      VAR_CPU_BITS=64
6835      VAR_CPU_ENDIAN=big
6836      ;;
6837    sparc)
6838      VAR_CPU=sparc
6839      VAR_CPU_ARCH=sparc
6840      VAR_CPU_BITS=32
6841      VAR_CPU_ENDIAN=big
6842      ;;
6843    sparcv9)
6844      VAR_CPU=sparcv9
6845      VAR_CPU_ARCH=sparc
6846      VAR_CPU_BITS=64
6847      VAR_CPU_ENDIAN=big
6848      ;;
6849    *)
6850      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6851      ;;
6852  esac
6853
6854  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6855  OPENJDK_BUILD_OS="$VAR_OS"
6856  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6857  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6858  OPENJDK_BUILD_CPU="$VAR_CPU"
6859  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6860  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6861  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6862
6863
6864
6865
6866
6867
6868
6869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6870$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6872$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6873
6874  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6875
6876  case "$host_os" in
6877    *linux*)
6878      VAR_OS=linux
6879      VAR_OS_API=posix
6880      VAR_OS_ENV=linux
6881      ;;
6882    *solaris*)
6883      VAR_OS=solaris
6884      VAR_OS_API=posix
6885      VAR_OS_ENV=solaris
6886      ;;
6887    *darwin*)
6888      VAR_OS=macosx
6889      VAR_OS_API=posix
6890      VAR_OS_ENV=macosx
6891      ;;
6892    *bsd*)
6893      VAR_OS=bsd
6894      VAR_OS_API=posix
6895      VAR_OS_ENV=bsd
6896      ;;
6897    *cygwin*)
6898      VAR_OS=windows
6899      VAR_OS_API=winapi
6900      VAR_OS_ENV=windows.cygwin
6901      ;;
6902    *mingw*)
6903      VAR_OS=windows
6904      VAR_OS_API=winapi
6905      VAR_OS_ENV=windows.msys
6906      ;;
6907    *)
6908      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6909      ;;
6910  esac
6911
6912
6913  # First argument is the cpu name from the trip/quad
6914  case "$host_cpu" in
6915    x86_64)
6916      VAR_CPU=x86_64
6917      VAR_CPU_ARCH=x86
6918      VAR_CPU_BITS=64
6919      VAR_CPU_ENDIAN=little
6920      ;;
6921    i?86)
6922      VAR_CPU=x86
6923      VAR_CPU_ARCH=x86
6924      VAR_CPU_BITS=32
6925      VAR_CPU_ENDIAN=little
6926      ;;
6927    arm*)
6928      VAR_CPU=arm
6929      VAR_CPU_ARCH=arm
6930      VAR_CPU_BITS=32
6931      VAR_CPU_ENDIAN=little
6932      ;;
6933    powerpc)
6934      VAR_CPU=ppc
6935      VAR_CPU_ARCH=ppc
6936      VAR_CPU_BITS=32
6937      VAR_CPU_ENDIAN=big
6938      ;;
6939    powerpc64)
6940      VAR_CPU=ppc64
6941      VAR_CPU_ARCH=ppc
6942      VAR_CPU_BITS=64
6943      VAR_CPU_ENDIAN=big
6944      ;;
6945    s390)
6946      VAR_CPU=s390
6947      VAR_CPU_ARCH=s390
6948      VAR_CPU_BITS=32
6949      VAR_CPU_ENDIAN=big
6950      ;;
6951    s390x)
6952      VAR_CPU=s390x
6953      VAR_CPU_ARCH=s390
6954      VAR_CPU_BITS=64
6955      VAR_CPU_ENDIAN=big
6956      ;;
6957    sparc)
6958      VAR_CPU=sparc
6959      VAR_CPU_ARCH=sparc
6960      VAR_CPU_BITS=32
6961      VAR_CPU_ENDIAN=big
6962      ;;
6963    sparcv9)
6964      VAR_CPU=sparcv9
6965      VAR_CPU_ARCH=sparc
6966      VAR_CPU_BITS=64
6967      VAR_CPU_ENDIAN=big
6968      ;;
6969    *)
6970      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6971      ;;
6972  esac
6973
6974  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6975  OPENJDK_TARGET_OS="$VAR_OS"
6976  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6977  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6978  OPENJDK_TARGET_CPU="$VAR_CPU"
6979  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6980  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6981  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6982
6983
6984
6985
6986
6987
6988
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6990$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6992$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6993
6994
6995
6996# Check whether --with-target-bits was given.
6997if test "${with_target_bits+set}" = set; then :
6998  withval=$with_target_bits;
6999fi
7000
7001
7002  # We have three types of compiles:
7003  # native  == normal compilation, target system == build system
7004  # cross   == traditional cross compilation, target system != build system; special toolchain needed
7005  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7006  #
7007  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7008    # We're doing a proper cross-compilation
7009    COMPILE_TYPE="cross"
7010  else
7011    COMPILE_TYPE="native"
7012  fi
7013
7014  if test "x$with_target_bits" != x; then
7015    if test "x$COMPILE_TYPE" = "xcross"; then
7016      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7017    fi
7018
7019    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7020      # A reduced build is requested
7021      COMPILE_TYPE="reduced"
7022      OPENJDK_TARGET_CPU_BITS=32
7023      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7024        OPENJDK_TARGET_CPU=x86
7025      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7026        OPENJDK_TARGET_CPU=sparc
7027      else
7028        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7029      fi
7030    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7031      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
7032    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7033      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7034$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7035    else
7036      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7037    fi
7038  fi
7039
7040
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7042$as_echo_n "checking compilation type... " >&6; }
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7044$as_echo "$COMPILE_TYPE" >&6; }
7045
7046
7047  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7048    REQUIRED_OS_NAME=SunOS
7049    REQUIRED_OS_VERSION=5.10
7050  fi
7051  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7052    REQUIRED_OS_NAME=Linux
7053    REQUIRED_OS_VERSION=2.6
7054  fi
7055  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7056    REQUIRED_OS_NAME=Windows
7057    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7058      REQUIRED_OS_VERSION=5.2
7059    else
7060      REQUIRED_OS_VERSION=5.1
7061    fi
7062  fi
7063  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7064    REQUIRED_OS_NAME=Darwin
7065    REQUIRED_OS_VERSION=11.2
7066  fi
7067
7068
7069
7070
7071
7072  # Also store the legacy naming of the cpu.
7073  # Ie i586 and amd64 instead of x86 and x86_64
7074  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7075  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7076    OPENJDK_TARGET_CPU_LEGACY="i586"
7077  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7078    # On all platforms except MacOSX replace x86_64 with amd64.
7079    OPENJDK_TARGET_CPU_LEGACY="amd64"
7080  fi
7081
7082
7083  # And the second legacy naming of the cpu.
7084  # Ie i386 and amd64 instead of x86 and x86_64.
7085  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7086  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7087    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7088  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7089    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7090  fi
7091
7092
7093  # This is the name of the cpu (but using i386 and amd64 instead of
7094  # x86 and x86_64, respectively), preceeded by a /, to be used when
7095  # locating libraries. On macosx, it's empty, though.
7096  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7097  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7098    OPENJDK_TARGET_CPU_LIBDIR=""
7099  fi
7100
7101
7102  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7103  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7104  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7105  OPENJDK_TARGET_CPU_ISADIR=""
7106  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7107    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7108      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7109    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7110      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7111    fi
7112  fi
7113
7114
7115  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7116  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7117  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7118    # On linux only, we replace x86 with i386.
7119    OPENJDK_TARGET_CPU_OSARCH="i386"
7120  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7121    # On all platforms except macosx, we replace x86_64 with amd64.
7122    OPENJDK_TARGET_CPU_OSARCH="amd64"
7123  fi
7124
7125
7126  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7127  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7128    OPENJDK_TARGET_CPU_JLI="i386"
7129  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7130    # On all platforms except macosx, we replace x86_64 with amd64.
7131    OPENJDK_TARGET_CPU_JLI="amd64"
7132  fi
7133  # Now setup the -D flags for building libjli.
7134  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7135  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7136    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7137      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7138    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7139      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7140    fi
7141  fi
7142
7143
7144  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7145  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7146    OPENJDK_TARGET_OS_API_DIR="solaris"
7147  fi
7148  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7149    OPENJDK_TARGET_OS_API_DIR="windows"
7150  fi
7151
7152
7153  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7154      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7155  else
7156      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7157  fi
7158
7159
7160  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7161    A_LP64="LP64:="
7162    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7163    # unpack200.exe
7164    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7165      ADD_LP64="-D_LP64=1"
7166    fi
7167  fi
7168  LP64=$A_LP64
7169
7170
7171  if test "x$COMPILE_TYPE" = "xcross"; then
7172    # FIXME: ... or should this include reduced builds..?
7173    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7174  else
7175    DEFINE_CROSS_COMPILE_ARCH=""
7176  fi
7177
7178
7179  # ZERO_ARCHDEF is used to enable architecture-specific code
7180  case "${OPENJDK_TARGET_CPU}" in
7181    ppc*)    ZERO_ARCHDEF=PPC   ;;
7182    s390*)   ZERO_ARCHDEF=S390  ;;
7183    sparc*)  ZERO_ARCHDEF=SPARC ;;
7184    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7185    x86)     ZERO_ARCHDEF=IA32  ;;
7186    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7187  esac
7188
7189
7190
7191
7192# Continue setting up basic stuff. Most remaining code require fundamental tools.
7193
7194  # Locate the directory of this script.
7195  SCRIPT="$0"
7196  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7197
7198  # Where is the source? It is located two levels above the configure script.
7199  CURDIR="$PWD"
7200  cd "$AUTOCONF_DIR/../.."
7201  SRC_ROOT="`$THEPWDCMD -L`"
7202
7203  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7204    PATH_SEP=";"
7205
7206  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7207  if test $SRC_ROOT_LENGTH -gt 100; then
7208    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7209  fi
7210
7211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7213$as_echo_n "checking cygwin release... " >&6; }
7214    CYGWIN_VERSION=`$UNAME -r`
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7216$as_echo "$CYGWIN_VERSION" >&6; }
7217    WINDOWS_ENV_VENDOR='cygwin'
7218    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7219
7220    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7221    if test "x$CYGWIN_VERSION_OK" = x; then
7222      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7223$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7224      as_fn_error $? "Cannot continue" "$LINENO" 5
7225    fi
7226    if test "x$CYGPATH" = x; then
7227      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7228    fi
7229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7230$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7231    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7232    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7233    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7234    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7236$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7237    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7238    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7239    if test "x$test_cygdrive_prefix" = x; then
7240      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7241    fi
7242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7244$as_echo_n "checking msys release... " >&6; }
7245    MSYS_VERSION=`$UNAME -r`
7246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7247$as_echo "$MSYS_VERSION" >&6; }
7248
7249    WINDOWS_ENV_VENDOR='msys'
7250    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7251
7252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7253$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7254    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7255    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7256
7257  windows_path="$MSYS_ROOT_PATH"
7258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7259    unix_path=`$CYGPATH -u "$windows_path"`
7260    MSYS_ROOT_PATH="$unix_path"
7261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7263    MSYS_ROOT_PATH="$unix_path"
7264  fi
7265
7266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7267$as_echo "$MSYS_ROOT_PATH" >&6; }
7268    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7269  else
7270    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7271  fi
7272
7273  # Test if windows or unix (cygwin/msys) find is first in path.
7274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7275$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7276  FIND_BINARY_OUTPUT=`find --version 2>&1`
7277  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7279$as_echo "unix style" >&6; }
7280  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7282$as_echo "Windows" >&6; }
7283    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7284$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7285    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7286$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7287    as_fn_error $? "Cannot continue" "$LINENO" 5
7288  else
7289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7290$as_echo "unknown" >&6; }
7291    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7292$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7293  fi
7294
7295  else
7296    PATH_SEP=":"
7297  fi
7298
7299
7300
7301  cd "$CURDIR"
7302
7303
7304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7305
7306  # Input might be given as Windows format, start by converting to
7307  # unix format.
7308  path="$SRC_ROOT"
7309  new_path=`$CYGPATH -u "$path"`
7310
7311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7314  # "foo.exe" is OK but "foo" is an error.
7315  #
7316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7317  # It is also a way to make sure we got the proper file name for the real test later on.
7318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7319  if test "x$test_shortpath" = x; then
7320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7321$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7322    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7323  fi
7324
7325  # Call helper function which possibly converts this using DOS-style short mode.
7326  # If so, the updated path is stored in $new_path.
7327
7328  input_path="$new_path"
7329  # Check if we need to convert this using DOS-style short mode. If the path
7330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7331  # take no chances and rewrite it.
7332  # Note: m4 eats our [], so we need to use [ and ] instead.
7333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7334  if test "x$has_forbidden_chars" != x; then
7335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7339      # Going to short mode and back again did indeed matter. Since short mode is
7340      # case insensitive, let's make it lowercase to improve readability.
7341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7342      # Now convert it back to Unix-stile (cygpath)
7343      input_path=`$CYGPATH -u "$shortmode_path"`
7344      new_path="$input_path"
7345    fi
7346  fi
7347
7348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7349  if test "x$test_cygdrive_prefix" = x; then
7350    # As a simple fix, exclude /usr/bin since it's not a real path.
7351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7353      # a path prefixed by /cygdrive for fixpath to work.
7354      new_path="$CYGWIN_ROOT_PATH$input_path"
7355    fi
7356  fi
7357
7358
7359  if test "x$path" != "x$new_path"; then
7360    SRC_ROOT="$new_path"
7361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7362$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7363  fi
7364
7365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7366
7367  path="$SRC_ROOT"
7368  has_colon=`$ECHO $path | $GREP ^.:`
7369  new_path="$path"
7370  if test "x$has_colon" = x; then
7371    # Not in mixed or Windows style, start by that.
7372    new_path=`cmd //c echo $path`
7373  fi
7374
7375
7376  input_path="$new_path"
7377  # Check if we need to convert this using DOS-style short mode. If the path
7378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7379  # take no chances and rewrite it.
7380  # Note: m4 eats our [], so we need to use [ and ] instead.
7381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7382  if test "x$has_forbidden_chars" != x; then
7383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7385  fi
7386
7387
7388  windows_path="$new_path"
7389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7390    unix_path=`$CYGPATH -u "$windows_path"`
7391    new_path="$unix_path"
7392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7394    new_path="$unix_path"
7395  fi
7396
7397  if test "x$path" != "x$new_path"; then
7398    SRC_ROOT="$new_path"
7399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7400$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7401  fi
7402
7403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7405
7406  else
7407    # We're on a posix platform. Hooray! :)
7408    path="$SRC_ROOT"
7409    has_space=`$ECHO "$path" | $GREP " "`
7410    if test "x$has_space" != x; then
7411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7412$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7413      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7414    fi
7415
7416    # Use eval to expand a potential ~
7417    eval path="$path"
7418    if test ! -f "$path" && test ! -d "$path"; then
7419      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7420    fi
7421
7422    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7423  fi
7424
7425
7426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7427
7428  # Input might be given as Windows format, start by converting to
7429  # unix format.
7430  path="$CURDIR"
7431  new_path=`$CYGPATH -u "$path"`
7432
7433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7436  # "foo.exe" is OK but "foo" is an error.
7437  #
7438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7439  # It is also a way to make sure we got the proper file name for the real test later on.
7440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7441  if test "x$test_shortpath" = x; then
7442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7443$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7444    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7445  fi
7446
7447  # Call helper function which possibly converts this using DOS-style short mode.
7448  # If so, the updated path is stored in $new_path.
7449
7450  input_path="$new_path"
7451  # Check if we need to convert this using DOS-style short mode. If the path
7452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7453  # take no chances and rewrite it.
7454  # Note: m4 eats our [], so we need to use [ and ] instead.
7455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7456  if test "x$has_forbidden_chars" != x; then
7457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7461      # Going to short mode and back again did indeed matter. Since short mode is
7462      # case insensitive, let's make it lowercase to improve readability.
7463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7464      # Now convert it back to Unix-stile (cygpath)
7465      input_path=`$CYGPATH -u "$shortmode_path"`
7466      new_path="$input_path"
7467    fi
7468  fi
7469
7470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7471  if test "x$test_cygdrive_prefix" = x; then
7472    # As a simple fix, exclude /usr/bin since it's not a real path.
7473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7475      # a path prefixed by /cygdrive for fixpath to work.
7476      new_path="$CYGWIN_ROOT_PATH$input_path"
7477    fi
7478  fi
7479
7480
7481  if test "x$path" != "x$new_path"; then
7482    CURDIR="$new_path"
7483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7484$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7485  fi
7486
7487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7488
7489  path="$CURDIR"
7490  has_colon=`$ECHO $path | $GREP ^.:`
7491  new_path="$path"
7492  if test "x$has_colon" = x; then
7493    # Not in mixed or Windows style, start by that.
7494    new_path=`cmd //c echo $path`
7495  fi
7496
7497
7498  input_path="$new_path"
7499  # Check if we need to convert this using DOS-style short mode. If the path
7500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7501  # take no chances and rewrite it.
7502  # Note: m4 eats our [], so we need to use [ and ] instead.
7503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7504  if test "x$has_forbidden_chars" != x; then
7505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7507  fi
7508
7509
7510  windows_path="$new_path"
7511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7512    unix_path=`$CYGPATH -u "$windows_path"`
7513    new_path="$unix_path"
7514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7516    new_path="$unix_path"
7517  fi
7518
7519  if test "x$path" != "x$new_path"; then
7520    CURDIR="$new_path"
7521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7522$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7523  fi
7524
7525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7527
7528  else
7529    # We're on a posix platform. Hooray! :)
7530    path="$CURDIR"
7531    has_space=`$ECHO "$path" | $GREP " "`
7532    if test "x$has_space" != x; then
7533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7534$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7536    fi
7537
7538    # Use eval to expand a potential ~
7539    eval path="$path"
7540    if test ! -f "$path" && test ! -d "$path"; then
7541      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7542    fi
7543
7544    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7545  fi
7546
7547
7548  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7549    # Add extra search paths on solaris for utilities like ar and as etc...
7550    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7551  fi
7552
7553  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7554  # is not correct.
7555
7556# Check whether --with-sys-root was given.
7557if test "${with_sys_root+set}" = set; then :
7558  withval=$with_sys_root;
7559fi
7560
7561
7562  if test "x$with_sys_root" != x; then
7563    SYS_ROOT=$with_sys_root
7564  else
7565    SYS_ROOT=/
7566  fi
7567
7568
7569
7570# Check whether --with-tools-dir was given.
7571if test "${with_tools_dir+set}" = set; then :
7572  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7573
7574fi
7575
7576
7577
7578# Check whether --with-devkit was given.
7579if test "${with_devkit+set}" = set; then :
7580  withval=$with_devkit;
7581        if test "x$with_sys_root" != x; then
7582          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7583        fi
7584
7585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7586
7587  # Input might be given as Windows format, start by converting to
7588  # unix format.
7589  path="$with_devkit"
7590  new_path=`$CYGPATH -u "$path"`
7591
7592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7595  # "foo.exe" is OK but "foo" is an error.
7596  #
7597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7598  # It is also a way to make sure we got the proper file name for the real test later on.
7599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7600  if test "x$test_shortpath" = x; then
7601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7602$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7603    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7604  fi
7605
7606  # Call helper function which possibly converts this using DOS-style short mode.
7607  # If so, the updated path is stored in $new_path.
7608
7609  input_path="$new_path"
7610  # Check if we need to convert this using DOS-style short mode. If the path
7611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7612  # take no chances and rewrite it.
7613  # Note: m4 eats our [], so we need to use [ and ] instead.
7614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7615  if test "x$has_forbidden_chars" != x; then
7616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7620      # Going to short mode and back again did indeed matter. Since short mode is
7621      # case insensitive, let's make it lowercase to improve readability.
7622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7623      # Now convert it back to Unix-stile (cygpath)
7624      input_path=`$CYGPATH -u "$shortmode_path"`
7625      new_path="$input_path"
7626    fi
7627  fi
7628
7629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7630  if test "x$test_cygdrive_prefix" = x; then
7631    # As a simple fix, exclude /usr/bin since it's not a real path.
7632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7634      # a path prefixed by /cygdrive for fixpath to work.
7635      new_path="$CYGWIN_ROOT_PATH$input_path"
7636    fi
7637  fi
7638
7639
7640  if test "x$path" != "x$new_path"; then
7641    with_devkit="$new_path"
7642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7643$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7644  fi
7645
7646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7647
7648  path="$with_devkit"
7649  has_colon=`$ECHO $path | $GREP ^.:`
7650  new_path="$path"
7651  if test "x$has_colon" = x; then
7652    # Not in mixed or Windows style, start by that.
7653    new_path=`cmd //c echo $path`
7654  fi
7655
7656
7657  input_path="$new_path"
7658  # Check if we need to convert this using DOS-style short mode. If the path
7659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7660  # take no chances and rewrite it.
7661  # Note: m4 eats our [], so we need to use [ and ] instead.
7662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7663  if test "x$has_forbidden_chars" != x; then
7664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7666  fi
7667
7668
7669  windows_path="$new_path"
7670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7671    unix_path=`$CYGPATH -u "$windows_path"`
7672    new_path="$unix_path"
7673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7675    new_path="$unix_path"
7676  fi
7677
7678  if test "x$path" != "x$new_path"; then
7679    with_devkit="$new_path"
7680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7681$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7682  fi
7683
7684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7686
7687  else
7688    # We're on a posix platform. Hooray! :)
7689    path="$with_devkit"
7690    has_space=`$ECHO "$path" | $GREP " "`
7691    if test "x$has_space" != x; then
7692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7693$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7694      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7695    fi
7696
7697    # Use eval to expand a potential ~
7698    eval path="$path"
7699    if test ! -f "$path" && test ! -d "$path"; then
7700      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7701    fi
7702
7703    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7704  fi
7705
7706
7707  if test "x$TOOLS_DIR" = x; then
7708    TOOLS_DIR="$with_devkit/bin"
7709  else
7710    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7711  fi
7712
7713        if test -d "$with_devkit/$host_alias/libc"; then
7714          SYS_ROOT=$with_devkit/$host_alias/libc
7715        elif test -d "$with_devkit/$host/sys-root"; then
7716          SYS_ROOT=$with_devkit/$host/sys-root
7717        fi
7718
7719fi
7720
7721
7722
7723  # Setup default logging of stdout and stderr to build.log in the output root.
7724  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7725  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7726  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7727
7728
7729
7730
7731
7732# Check if it's a pure open build or if custom sources are to be used.
7733
7734  # Check whether --enable-openjdk-only was given.
7735if test "${enable_openjdk_only+set}" = set; then :
7736  enableval=$enable_openjdk_only;
7737else
7738  enable_openjdk_only="no"
7739fi
7740
7741
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7743$as_echo_n "checking for presence of closed sources... " >&6; }
7744  if test -d "$SRC_ROOT/jdk/src/closed"; then
7745    CLOSED_SOURCE_PRESENT=yes
7746  else
7747    CLOSED_SOURCE_PRESENT=no
7748  fi
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7750$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7751
7752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7753$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7754  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7756$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7757
7758  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7759    OPENJDK=true
7760    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7761      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7762$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7763    fi
7764  else
7765    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7766      OPENJDK=true
7767    else
7768      OPENJDK=false
7769    fi
7770  fi
7771
7772  if test "x$OPENJDK" = "xtrue"; then
7773    SET_OPENJDK="OPENJDK=true"
7774  fi
7775
7776
7777
7778
7779# These are needed to be able to create a configuration name (and thus the output directory)
7780
7781  ###############################################################################
7782  #
7783  # Check which variant of the JDK that we want to build.
7784  # Currently we have:
7785  #    normal:   standard edition
7786  # but the custom make system may add other variants
7787  #
7788  # Effectively the JDK variant gives a name to a specific set of
7789  # modules to compile into the JDK. In the future, these modules
7790  # might even be Jigsaw modules.
7791  #
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7793$as_echo_n "checking which variant of the JDK to build... " >&6; }
7794
7795# Check whether --with-jdk-variant was given.
7796if test "${with_jdk_variant+set}" = set; then :
7797  withval=$with_jdk_variant;
7798fi
7799
7800
7801  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7802    JDK_VARIANT="normal"
7803  else
7804    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7805  fi
7806
7807
7808
7809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7810$as_echo "$JDK_VARIANT" >&6; }
7811
7812
7813
7814  ###############################################################################
7815  #
7816  # Check which variants of the JVM that we want to build.
7817  # Currently we have:
7818  #    server: normal interpreter and a tiered C1/C2 compiler
7819  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7820  #    minimal1: reduced form of client with optional VM services and features stripped out
7821  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7822  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7823  #    zero: no machine code interpreter, no compiler
7824  #    zeroshark: zero interpreter and shark/llvm compiler backend
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7826$as_echo_n "checking which variants of the JVM to build... " >&6; }
7827
7828# Check whether --with-jvm-variants was given.
7829if test "${with_jvm_variants+set}" = set; then :
7830  withval=$with_jvm_variants;
7831fi
7832
7833
7834  if test "x$with_jvm_variants" = x; then
7835    with_jvm_variants="server"
7836  fi
7837
7838  JVM_VARIANTS=",$with_jvm_variants,"
7839  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7840
7841  if test "x$TEST_VARIANTS" != "x,"; then
7842    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7843  fi
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7845$as_echo "$with_jvm_variants" >&6; }
7846
7847  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7848  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7849  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7850  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7851  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7852  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7853
7854  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7855    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7856      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7857    fi
7858  fi
7859  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7860    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7861      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7862    fi
7863  fi
7864  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7865    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7866      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7867    fi
7868  fi
7869
7870  # Replace the commas with AND for use in the build directory name.
7871  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7872  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7873  if test "x$COUNT_VARIANTS" != "x,1"; then
7874    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7875  else
7876    BUILDING_MULTIPLE_JVM_VARIANTS=no
7877  fi
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887  INCLUDE_SA=true
7888  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7889    INCLUDE_SA=false
7890  fi
7891  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7892    INCLUDE_SA=false
7893  fi
7894
7895
7896  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7897    MACOSX_UNIVERSAL="true"
7898  fi
7899
7900
7901
7902
7903  ###############################################################################
7904  #
7905  # Set the debug level
7906  #    release: no debug information, all optimizations, no asserts.
7907  #    fastdebug: debug information (-g), all optimizations, all asserts
7908  #    slowdebug: debug information (-g), no optimizations, all asserts
7909  #
7910  DEBUG_LEVEL="release"
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7912$as_echo_n "checking which debug level to use... " >&6; }
7913  # Check whether --enable-debug was given.
7914if test "${enable_debug+set}" = set; then :
7915  enableval=$enable_debug;
7916        ENABLE_DEBUG="${enableval}"
7917        DEBUG_LEVEL="fastdebug"
7918
7919else
7920  ENABLE_DEBUG="no"
7921fi
7922
7923
7924
7925# Check whether --with-debug-level was given.
7926if test "${with_debug_level+set}" = set; then :
7927  withval=$with_debug_level;
7928        DEBUG_LEVEL="${withval}"
7929        if test "x$ENABLE_DEBUG" = xyes; then
7930          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7931        fi
7932
7933fi
7934
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7936$as_echo "$DEBUG_LEVEL" >&6; }
7937
7938  if test "x$DEBUG_LEVEL" != xrelease && \
7939      test "x$DEBUG_LEVEL" != xfastdebug && \
7940      test "x$DEBUG_LEVEL" != xslowdebug; then
7941    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7942  fi
7943
7944
7945  ###############################################################################
7946  #
7947  # Setup legacy vars/targets and new vars to deal with different debug levels.
7948  #
7949
7950  case $DEBUG_LEVEL in
7951    release )
7952      VARIANT="OPT"
7953      FASTDEBUG="false"
7954      DEBUG_CLASSFILES="false"
7955      BUILD_VARIANT_RELEASE=""
7956      HOTSPOT_DEBUG_LEVEL="product"
7957      HOTSPOT_EXPORT="product"
7958      ;;
7959    fastdebug )
7960      VARIANT="DBG"
7961      FASTDEBUG="true"
7962      DEBUG_CLASSFILES="true"
7963      BUILD_VARIANT_RELEASE="-fastdebug"
7964      HOTSPOT_DEBUG_LEVEL="fastdebug"
7965      HOTSPOT_EXPORT="fastdebug"
7966      ;;
7967    slowdebug )
7968      VARIANT="DBG"
7969      FASTDEBUG="false"
7970      DEBUG_CLASSFILES="true"
7971      BUILD_VARIANT_RELEASE="-debug"
7972      HOTSPOT_DEBUG_LEVEL="jvmg"
7973      HOTSPOT_EXPORT="debug"
7974      ;;
7975  esac
7976
7977  #####
7978  # Generate the legacy makefile targets for hotspot.
7979  # The hotspot api for selecting the build artifacts, really, needs to be improved.
7980  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7981  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7982  # But until then ...
7983  HOTSPOT_TARGET=""
7984
7985  if test "x$JVM_VARIANT_SERVER" = xtrue; then
7986    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7987  fi
7988
7989  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7990    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7991  fi
7992
7993  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7994    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7995  fi
7996
7997  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7998    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7999  fi
8000
8001  if test "x$JVM_VARIANT_ZERO" = xtrue; then
8002    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8003  fi
8004
8005  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8006    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8007  fi
8008
8009  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8010
8011  # On Macosx universal binaries are produced, but they only contain
8012  # 64 bit intel. This invalidates control of which jvms are built
8013  # from configure, but only server is valid anyway. Fix this
8014  # when hotspot makefiles are rewritten.
8015  if test "x$MACOSX_UNIVERSAL" = xtrue; then
8016    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8017  fi
8018
8019  #####
8020
8021
8022
8023
8024
8025
8026
8027
8028# With basic setup done, call the custom early hook.
8029
8030
8031# To properly create a configuration name, we need to have the OpenJDK target
8032# and options (variants and debug level) parsed.
8033
8034
8035
8036# Check whether --with-conf-name was given.
8037if test "${with_conf_name+set}" = set; then :
8038  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8039fi
8040
8041
8042  # Test from where we are running configure, in or outside of src root.
8043  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8044      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8045      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8046    # We are running configure from the src root.
8047    # Create a default ./build/target-variant-debuglevel output root.
8048    if test "x${CONF_NAME}" = x; then
8049      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8050    fi
8051    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8052    $MKDIR -p "$OUTPUT_ROOT"
8053    if test ! -d "$OUTPUT_ROOT"; then
8054      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8055    fi
8056  else
8057    # We are running configure from outside of the src dir.
8058    # Then use the current directory as output dir!
8059    # If configuration is situated in normal build directory, just use the build
8060    # directory name as configuration name, otherwise use the complete path.
8061    if test "x${CONF_NAME}" = x; then
8062      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8063    fi
8064    OUTPUT_ROOT="$CURDIR"
8065
8066    # WARNING: This might be a bad thing to do. You need to be sure you want to
8067    # have a configuration in this directory. Do some sanity checks!
8068
8069    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8070      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8071      # other files
8072      files_present=`$LS $OUTPUT_ROOT`
8073      # Configure has already touched config.log and confdefs.h in the current dir when this check
8074      # is performed.
8075      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8076      | $TR -d '\n'`
8077      if test "x$filtered_files" != x; then
8078        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8079$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8080        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8081$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8083$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8084        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8085$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8086        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8087$as_echo "$as_me: seriously mess up just about everything." >&6;}
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8089$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8090        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8091$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8092        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8093      fi
8094    fi
8095  fi
8096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8097$as_echo_n "checking what configuration name to use... " >&6; }
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8099$as_echo "$CONF_NAME" >&6; }
8100
8101
8102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8103
8104  # Input might be given as Windows format, start by converting to
8105  # unix format.
8106  path="$OUTPUT_ROOT"
8107  new_path=`$CYGPATH -u "$path"`
8108
8109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8112  # "foo.exe" is OK but "foo" is an error.
8113  #
8114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8115  # It is also a way to make sure we got the proper file name for the real test later on.
8116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8117  if test "x$test_shortpath" = x; then
8118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8119$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8120    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8121  fi
8122
8123  # Call helper function which possibly converts this using DOS-style short mode.
8124  # If so, the updated path is stored in $new_path.
8125
8126  input_path="$new_path"
8127  # Check if we need to convert this using DOS-style short mode. If the path
8128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8129  # take no chances and rewrite it.
8130  # Note: m4 eats our [], so we need to use [ and ] instead.
8131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8132  if test "x$has_forbidden_chars" != x; then
8133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8137      # Going to short mode and back again did indeed matter. Since short mode is
8138      # case insensitive, let's make it lowercase to improve readability.
8139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8140      # Now convert it back to Unix-stile (cygpath)
8141      input_path=`$CYGPATH -u "$shortmode_path"`
8142      new_path="$input_path"
8143    fi
8144  fi
8145
8146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8147  if test "x$test_cygdrive_prefix" = x; then
8148    # As a simple fix, exclude /usr/bin since it's not a real path.
8149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8151      # a path prefixed by /cygdrive for fixpath to work.
8152      new_path="$CYGWIN_ROOT_PATH$input_path"
8153    fi
8154  fi
8155
8156
8157  if test "x$path" != "x$new_path"; then
8158    OUTPUT_ROOT="$new_path"
8159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8160$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8161  fi
8162
8163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8164
8165  path="$OUTPUT_ROOT"
8166  has_colon=`$ECHO $path | $GREP ^.:`
8167  new_path="$path"
8168  if test "x$has_colon" = x; then
8169    # Not in mixed or Windows style, start by that.
8170    new_path=`cmd //c echo $path`
8171  fi
8172
8173
8174  input_path="$new_path"
8175  # Check if we need to convert this using DOS-style short mode. If the path
8176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8177  # take no chances and rewrite it.
8178  # Note: m4 eats our [], so we need to use [ and ] instead.
8179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8180  if test "x$has_forbidden_chars" != x; then
8181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8183  fi
8184
8185
8186  windows_path="$new_path"
8187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8188    unix_path=`$CYGPATH -u "$windows_path"`
8189    new_path="$unix_path"
8190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8192    new_path="$unix_path"
8193  fi
8194
8195  if test "x$path" != "x$new_path"; then
8196    OUTPUT_ROOT="$new_path"
8197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8198$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8199  fi
8200
8201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8203
8204  else
8205    # We're on a posix platform. Hooray! :)
8206    path="$OUTPUT_ROOT"
8207    has_space=`$ECHO "$path" | $GREP " "`
8208    if test "x$has_space" != x; then
8209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8210$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8212    fi
8213
8214    # Use eval to expand a potential ~
8215    eval path="$path"
8216    if test ! -f "$path" && test ! -d "$path"; then
8217      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8218    fi
8219
8220    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8221  fi
8222
8223
8224  SPEC=$OUTPUT_ROOT/spec.gmk
8225
8226  CONF_NAME=$CONF_NAME
8227
8228  OUTPUT_ROOT=$OUTPUT_ROOT
8229
8230
8231  # Most of the probed defines are put into config.h
8232  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8233
8234  # The spec.gmk file contains all variables for the make system.
8235  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8236
8237  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8238  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8239
8240  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8241  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8242
8243  # The compare.sh is used to compare the build output to other builds.
8244  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8245
8246  # Spec.sh is currently used by compare-objects.sh
8247  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8248
8249  # The generated Makefile knows where the spec.gmk is and where the source is.
8250  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8251  # which will look for generated configurations
8252  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8253
8254
8255  # Save the arguments given to us
8256  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8257
8258
8259# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8260
8261  for ac_prog in apt-get yum port pkgutil pkgadd
8262do
8263  # Extract the first word of "$ac_prog", so it can be a program name with args.
8264set dummy $ac_prog; ac_word=$2
8265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8266$as_echo_n "checking for $ac_word... " >&6; }
8267if ${ac_cv_prog_PKGHANDLER+:} false; then :
8268  $as_echo_n "(cached) " >&6
8269else
8270  if test -n "$PKGHANDLER"; then
8271  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8272else
8273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8274for as_dir in $PATH
8275do
8276  IFS=$as_save_IFS
8277  test -z "$as_dir" && as_dir=.
8278    for ac_exec_ext in '' $ac_executable_extensions; do
8279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8280    ac_cv_prog_PKGHANDLER="$ac_prog"
8281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8282    break 2
8283  fi
8284done
8285  done
8286IFS=$as_save_IFS
8287
8288fi
8289fi
8290PKGHANDLER=$ac_cv_prog_PKGHANDLER
8291if test -n "$PKGHANDLER"; then
8292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8293$as_echo "$PKGHANDLER" >&6; }
8294else
8295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8296$as_echo "no" >&6; }
8297fi
8298
8299
8300  test -n "$PKGHANDLER" && break
8301done
8302
8303
8304
8305# Setup tools that requires more complex handling, or that is not needed by the configure script.
8306
8307
8308  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8309  if test "x$MAKE" != x; then
8310    # User has supplied a make, test it.
8311    if test ! -f "$MAKE"; then
8312      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8313    fi
8314
8315  MAKE_CANDIDATE=""$MAKE""
8316  DESCRIPTION="user supplied MAKE=$MAKE"
8317  if test "x$MAKE_CANDIDATE" != x; then
8318    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8319$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8320    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8321    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8322    if test "x$IS_GNU_MAKE" = x; then
8323      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8324$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8325    else
8326      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8327      if test "x$IS_MODERN_MAKE" = x; then
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8329$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8330      else
8331        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8332          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333            MAKE_EXPECTED_ENV='cygwin'
8334          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8335            MAKE_EXPECTED_ENV='msys'
8336          else
8337            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8338          fi
8339          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8340          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8341        else
8342          # Not relevant for non-Windows
8343          IS_MAKE_CORRECT_ENV=true
8344        fi
8345        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8346          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8347$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8348        else
8349          FOUND_MAKE=$MAKE_CANDIDATE
8350
8351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8352
8353  # First separate the path from the arguments. This will split at the first
8354  # space.
8355  complete="$FOUND_MAKE"
8356  path="${complete%% *}"
8357  tmp="$complete EOL"
8358  arguments="${tmp#* }"
8359
8360  # Input might be given as Windows format, start by converting to
8361  # unix format.
8362  new_path=`$CYGPATH -u "$path"`
8363
8364  # Now try to locate executable using which
8365  new_path=`$WHICH "$new_path" 2> /dev/null`
8366  # bat and cmd files are not always considered executable in cygwin causing which
8367  # to not find them
8368  if test "x$new_path" = x \
8369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8371    new_path=`$CYGPATH -u "$path"`
8372  fi
8373  if test "x$new_path" = x; then
8374    # Oops. Which didn't find the executable.
8375    # The splitting of arguments from the executable at a space might have been incorrect,
8376    # since paths with space are more likely in Windows. Give it another try with the whole
8377    # argument.
8378    path="$complete"
8379    arguments="EOL"
8380    new_path=`$CYGPATH -u "$path"`
8381    new_path=`$WHICH "$new_path" 2> /dev/null`
8382    # bat and cmd files are not always considered executable in cygwin causing which
8383    # to not find them
8384    if test "x$new_path" = x \
8385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8387      new_path=`$CYGPATH -u "$path"`
8388    fi
8389    if test "x$new_path" = x; then
8390      # It's still not found. Now this is an unrecoverable error.
8391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8393      has_space=`$ECHO "$complete" | $GREP " "`
8394      if test "x$has_space" != x; then
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8397      fi
8398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8399    fi
8400  fi
8401
8402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8405  # "foo.exe" is OK but "foo" is an error.
8406  #
8407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8408  # It is also a way to make sure we got the proper file name for the real test later on.
8409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8410  if test "x$test_shortpath" = x; then
8411    # Short path failed, file does not exist as specified.
8412    # Try adding .exe or .cmd
8413    if test -f "${new_path}.exe"; then
8414      input_to_shortpath="${new_path}.exe"
8415    elif test -f "${new_path}.cmd"; then
8416      input_to_shortpath="${new_path}.cmd"
8417    else
8418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8422      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8423    fi
8424  else
8425    input_to_shortpath="$new_path"
8426  fi
8427
8428  # Call helper function which possibly converts this using DOS-style short mode.
8429  # If so, the updated path is stored in $new_path.
8430  new_path="$input_to_shortpath"
8431
8432  input_path="$input_to_shortpath"
8433  # Check if we need to convert this using DOS-style short mode. If the path
8434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8435  # take no chances and rewrite it.
8436  # Note: m4 eats our [], so we need to use [ and ] instead.
8437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8438  if test "x$has_forbidden_chars" != x; then
8439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8443      # Going to short mode and back again did indeed matter. Since short mode is
8444      # case insensitive, let's make it lowercase to improve readability.
8445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8446      # Now convert it back to Unix-stile (cygpath)
8447      input_path=`$CYGPATH -u "$shortmode_path"`
8448      new_path="$input_path"
8449    fi
8450  fi
8451
8452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8453  if test "x$test_cygdrive_prefix" = x; then
8454    # As a simple fix, exclude /usr/bin since it's not a real path.
8455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8457      # a path prefixed by /cygdrive for fixpath to work.
8458      new_path="$CYGWIN_ROOT_PATH$input_path"
8459    fi
8460  fi
8461
8462  # remove trailing .exe if any
8463  new_path="${new_path/%.exe/}"
8464
8465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8466
8467  # First separate the path from the arguments. This will split at the first
8468  # space.
8469  complete="$FOUND_MAKE"
8470  path="${complete%% *}"
8471  tmp="$complete EOL"
8472  arguments="${tmp#* }"
8473
8474  # Input might be given as Windows format, start by converting to
8475  # unix format.
8476  new_path="$path"
8477
8478  windows_path="$new_path"
8479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8480    unix_path=`$CYGPATH -u "$windows_path"`
8481    new_path="$unix_path"
8482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8484    new_path="$unix_path"
8485  fi
8486
8487
8488  # Now try to locate executable using which
8489  new_path=`$WHICH "$new_path" 2> /dev/null`
8490
8491  if test "x$new_path" = x; then
8492    # Oops. Which didn't find the executable.
8493    # The splitting of arguments from the executable at a space might have been incorrect,
8494    # since paths with space are more likely in Windows. Give it another try with the whole
8495    # argument.
8496    path="$complete"
8497    arguments="EOL"
8498    new_path="$path"
8499
8500  windows_path="$new_path"
8501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8502    unix_path=`$CYGPATH -u "$windows_path"`
8503    new_path="$unix_path"
8504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8506    new_path="$unix_path"
8507  fi
8508
8509
8510    new_path=`$WHICH "$new_path" 2> /dev/null`
8511
8512    if test "x$new_path" = x; then
8513      # It's still not found. Now this is an unrecoverable error.
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8515$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8516      has_space=`$ECHO "$complete" | $GREP " "`
8517      if test "x$has_space" != x; then
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8520      fi
8521      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8522    fi
8523  fi
8524
8525  # Now new_path has a complete unix path to the binary
8526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8527    # Keep paths in /bin as-is, but remove trailing .exe if any
8528    new_path="${new_path/%.exe/}"
8529    # Do not save /bin paths to all_fixpath_prefixes!
8530  else
8531    # Not in mixed or Windows style, start by that.
8532    new_path=`cmd //c echo $new_path`
8533
8534  input_path="$new_path"
8535  # Check if we need to convert this using DOS-style short mode. If the path
8536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8537  # take no chances and rewrite it.
8538  # Note: m4 eats our [], so we need to use [ and ] instead.
8539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8540  if test "x$has_forbidden_chars" != x; then
8541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8543  fi
8544
8545    # Output is in $new_path
8546
8547  windows_path="$new_path"
8548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8549    unix_path=`$CYGPATH -u "$windows_path"`
8550    new_path="$unix_path"
8551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8553    new_path="$unix_path"
8554  fi
8555
8556    # remove trailing .exe if any
8557    new_path="${new_path/%.exe/}"
8558
8559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8561  fi
8562
8563  else
8564    # We're on a posix platform. Hooray! :)
8565    # First separate the path from the arguments. This will split at the first
8566    # space.
8567    complete="$FOUND_MAKE"
8568    path="${complete%% *}"
8569    tmp="$complete EOL"
8570    arguments="${tmp#* }"
8571
8572    # Cannot rely on the command "which" here since it doesn't always work.
8573    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8574    if test -z "$is_absolute_path"; then
8575      # Path to executable is not absolute. Find it.
8576      IFS_save="$IFS"
8577      IFS=:
8578      for p in $PATH; do
8579        if test -f "$p/$path" && test -x "$p/$path"; then
8580          new_path="$p/$path"
8581          break
8582        fi
8583      done
8584      IFS="$IFS_save"
8585    else
8586      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8587$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8588      new_path="$path"
8589    fi
8590
8591    if test "x$new_path" = x; then
8592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8594      has_space=`$ECHO "$complete" | $GREP " "`
8595      if test "x$has_space" != x; then
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8598      fi
8599      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8600    fi
8601  fi
8602
8603  # Now join together the path and the arguments once again
8604  if test "x$arguments" != xEOL; then
8605    new_complete="$new_path ${arguments% *}"
8606  else
8607    new_complete="$new_path"
8608  fi
8609
8610  if test "x$complete" != "x$new_complete"; then
8611    FOUND_MAKE="$new_complete"
8612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8613$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8614  fi
8615
8616        fi
8617      fi
8618    fi
8619  fi
8620
8621    if test "x$FOUND_MAKE" = x; then
8622      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8623    fi
8624  else
8625    # Try our hardest to locate a correct version of GNU make
8626    for ac_prog in gmake
8627do
8628  # Extract the first word of "$ac_prog", so it can be a program name with args.
8629set dummy $ac_prog; ac_word=$2
8630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8631$as_echo_n "checking for $ac_word... " >&6; }
8632if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8633  $as_echo_n "(cached) " >&6
8634else
8635  case $CHECK_GMAKE in
8636  [\\/]* | ?:[\\/]*)
8637  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8638  ;;
8639  *)
8640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641for as_dir in $PATH
8642do
8643  IFS=$as_save_IFS
8644  test -z "$as_dir" && as_dir=.
8645    for ac_exec_ext in '' $ac_executable_extensions; do
8646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8647    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8649    break 2
8650  fi
8651done
8652  done
8653IFS=$as_save_IFS
8654
8655  ;;
8656esac
8657fi
8658CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8659if test -n "$CHECK_GMAKE"; then
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8661$as_echo "$CHECK_GMAKE" >&6; }
8662else
8663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8664$as_echo "no" >&6; }
8665fi
8666
8667
8668  test -n "$CHECK_GMAKE" && break
8669done
8670
8671
8672  MAKE_CANDIDATE=""$CHECK_GMAKE""
8673  DESCRIPTION="gmake in PATH"
8674  if test "x$MAKE_CANDIDATE" != x; then
8675    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8676$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8677    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8678    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8679    if test "x$IS_GNU_MAKE" = x; then
8680      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8681$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8682    else
8683      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8684      if test "x$IS_MODERN_MAKE" = x; then
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8686$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8687      else
8688        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8689          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690            MAKE_EXPECTED_ENV='cygwin'
8691          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8692            MAKE_EXPECTED_ENV='msys'
8693          else
8694            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8695          fi
8696          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8697          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8698        else
8699          # Not relevant for non-Windows
8700          IS_MAKE_CORRECT_ENV=true
8701        fi
8702        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8703          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8704$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8705        else
8706          FOUND_MAKE=$MAKE_CANDIDATE
8707
8708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8709
8710  # First separate the path from the arguments. This will split at the first
8711  # space.
8712  complete="$FOUND_MAKE"
8713  path="${complete%% *}"
8714  tmp="$complete EOL"
8715  arguments="${tmp#* }"
8716
8717  # Input might be given as Windows format, start by converting to
8718  # unix format.
8719  new_path=`$CYGPATH -u "$path"`
8720
8721  # Now try to locate executable using which
8722  new_path=`$WHICH "$new_path" 2> /dev/null`
8723  # bat and cmd files are not always considered executable in cygwin causing which
8724  # to not find them
8725  if test "x$new_path" = x \
8726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8728    new_path=`$CYGPATH -u "$path"`
8729  fi
8730  if test "x$new_path" = x; then
8731    # Oops. Which didn't find the executable.
8732    # The splitting of arguments from the executable at a space might have been incorrect,
8733    # since paths with space are more likely in Windows. Give it another try with the whole
8734    # argument.
8735    path="$complete"
8736    arguments="EOL"
8737    new_path=`$CYGPATH -u "$path"`
8738    new_path=`$WHICH "$new_path" 2> /dev/null`
8739    # bat and cmd files are not always considered executable in cygwin causing which
8740    # to not find them
8741    if test "x$new_path" = x \
8742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8744      new_path=`$CYGPATH -u "$path"`
8745    fi
8746    if test "x$new_path" = x; then
8747      # It's still not found. Now this is an unrecoverable error.
8748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8750      has_space=`$ECHO "$complete" | $GREP " "`
8751      if test "x$has_space" != x; then
8752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8754      fi
8755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8756    fi
8757  fi
8758
8759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8762  # "foo.exe" is OK but "foo" is an error.
8763  #
8764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8765  # It is also a way to make sure we got the proper file name for the real test later on.
8766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8767  if test "x$test_shortpath" = x; then
8768    # Short path failed, file does not exist as specified.
8769    # Try adding .exe or .cmd
8770    if test -f "${new_path}.exe"; then
8771      input_to_shortpath="${new_path}.exe"
8772    elif test -f "${new_path}.cmd"; then
8773      input_to_shortpath="${new_path}.cmd"
8774    else
8775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8776$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8780    fi
8781  else
8782    input_to_shortpath="$new_path"
8783  fi
8784
8785  # Call helper function which possibly converts this using DOS-style short mode.
8786  # If so, the updated path is stored in $new_path.
8787  new_path="$input_to_shortpath"
8788
8789  input_path="$input_to_shortpath"
8790  # Check if we need to convert this using DOS-style short mode. If the path
8791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8792  # take no chances and rewrite it.
8793  # Note: m4 eats our [], so we need to use [ and ] instead.
8794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8795  if test "x$has_forbidden_chars" != x; then
8796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8800      # Going to short mode and back again did indeed matter. Since short mode is
8801      # case insensitive, let's make it lowercase to improve readability.
8802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8803      # Now convert it back to Unix-stile (cygpath)
8804      input_path=`$CYGPATH -u "$shortmode_path"`
8805      new_path="$input_path"
8806    fi
8807  fi
8808
8809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8810  if test "x$test_cygdrive_prefix" = x; then
8811    # As a simple fix, exclude /usr/bin since it's not a real path.
8812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8814      # a path prefixed by /cygdrive for fixpath to work.
8815      new_path="$CYGWIN_ROOT_PATH$input_path"
8816    fi
8817  fi
8818
8819  # remove trailing .exe if any
8820  new_path="${new_path/%.exe/}"
8821
8822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8823
8824  # First separate the path from the arguments. This will split at the first
8825  # space.
8826  complete="$FOUND_MAKE"
8827  path="${complete%% *}"
8828  tmp="$complete EOL"
8829  arguments="${tmp#* }"
8830
8831  # Input might be given as Windows format, start by converting to
8832  # unix format.
8833  new_path="$path"
8834
8835  windows_path="$new_path"
8836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8837    unix_path=`$CYGPATH -u "$windows_path"`
8838    new_path="$unix_path"
8839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8841    new_path="$unix_path"
8842  fi
8843
8844
8845  # Now try to locate executable using which
8846  new_path=`$WHICH "$new_path" 2> /dev/null`
8847
8848  if test "x$new_path" = x; then
8849    # Oops. Which didn't find the executable.
8850    # The splitting of arguments from the executable at a space might have been incorrect,
8851    # since paths with space are more likely in Windows. Give it another try with the whole
8852    # argument.
8853    path="$complete"
8854    arguments="EOL"
8855    new_path="$path"
8856
8857  windows_path="$new_path"
8858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8859    unix_path=`$CYGPATH -u "$windows_path"`
8860    new_path="$unix_path"
8861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8863    new_path="$unix_path"
8864  fi
8865
8866
8867    new_path=`$WHICH "$new_path" 2> /dev/null`
8868
8869    if test "x$new_path" = x; then
8870      # It's still not found. Now this is an unrecoverable error.
8871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8872$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8873      has_space=`$ECHO "$complete" | $GREP " "`
8874      if test "x$has_space" != x; then
8875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8877      fi
8878      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8879    fi
8880  fi
8881
8882  # Now new_path has a complete unix path to the binary
8883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8884    # Keep paths in /bin as-is, but remove trailing .exe if any
8885    new_path="${new_path/%.exe/}"
8886    # Do not save /bin paths to all_fixpath_prefixes!
8887  else
8888    # Not in mixed or Windows style, start by that.
8889    new_path=`cmd //c echo $new_path`
8890
8891  input_path="$new_path"
8892  # Check if we need to convert this using DOS-style short mode. If the path
8893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8894  # take no chances and rewrite it.
8895  # Note: m4 eats our [], so we need to use [ and ] instead.
8896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8897  if test "x$has_forbidden_chars" != x; then
8898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8900  fi
8901
8902    # Output is in $new_path
8903
8904  windows_path="$new_path"
8905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8906    unix_path=`$CYGPATH -u "$windows_path"`
8907    new_path="$unix_path"
8908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8910    new_path="$unix_path"
8911  fi
8912
8913    # remove trailing .exe if any
8914    new_path="${new_path/%.exe/}"
8915
8916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8918  fi
8919
8920  else
8921    # We're on a posix platform. Hooray! :)
8922    # First separate the path from the arguments. This will split at the first
8923    # space.
8924    complete="$FOUND_MAKE"
8925    path="${complete%% *}"
8926    tmp="$complete EOL"
8927    arguments="${tmp#* }"
8928
8929    # Cannot rely on the command "which" here since it doesn't always work.
8930    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8931    if test -z "$is_absolute_path"; then
8932      # Path to executable is not absolute. Find it.
8933      IFS_save="$IFS"
8934      IFS=:
8935      for p in $PATH; do
8936        if test -f "$p/$path" && test -x "$p/$path"; then
8937          new_path="$p/$path"
8938          break
8939        fi
8940      done
8941      IFS="$IFS_save"
8942    else
8943      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8944$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8945      new_path="$path"
8946    fi
8947
8948    if test "x$new_path" = x; then
8949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8950$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8951      has_space=`$ECHO "$complete" | $GREP " "`
8952      if test "x$has_space" != x; then
8953        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8955      fi
8956      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8957    fi
8958  fi
8959
8960  # Now join together the path and the arguments once again
8961  if test "x$arguments" != xEOL; then
8962    new_complete="$new_path ${arguments% *}"
8963  else
8964    new_complete="$new_path"
8965  fi
8966
8967  if test "x$complete" != "x$new_complete"; then
8968    FOUND_MAKE="$new_complete"
8969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8970$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8971  fi
8972
8973        fi
8974      fi
8975    fi
8976  fi
8977
8978
8979    if test "x$FOUND_MAKE" = x; then
8980      for ac_prog in make
8981do
8982  # Extract the first word of "$ac_prog", so it can be a program name with args.
8983set dummy $ac_prog; ac_word=$2
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
8986if ${ac_cv_path_CHECK_MAKE+:} false; then :
8987  $as_echo_n "(cached) " >&6
8988else
8989  case $CHECK_MAKE in
8990  [\\/]* | ?:[\\/]*)
8991  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8992  ;;
8993  *)
8994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009  ;;
9010esac
9011fi
9012CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9013if test -n "$CHECK_MAKE"; then
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9015$as_echo "$CHECK_MAKE" >&6; }
9016else
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019fi
9020
9021
9022  test -n "$CHECK_MAKE" && break
9023done
9024
9025
9026  MAKE_CANDIDATE=""$CHECK_MAKE""
9027  DESCRIPTION="make in PATH"
9028  if test "x$MAKE_CANDIDATE" != x; then
9029    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9030$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9031    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9032    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9033    if test "x$IS_GNU_MAKE" = x; then
9034      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9035$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9036    else
9037      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9038      if test "x$IS_MODERN_MAKE" = x; then
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9040$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9041      else
9042        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9043          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044            MAKE_EXPECTED_ENV='cygwin'
9045          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9046            MAKE_EXPECTED_ENV='msys'
9047          else
9048            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9049          fi
9050          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9051          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9052        else
9053          # Not relevant for non-Windows
9054          IS_MAKE_CORRECT_ENV=true
9055        fi
9056        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9057          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9058$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9059        else
9060          FOUND_MAKE=$MAKE_CANDIDATE
9061
9062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9063
9064  # First separate the path from the arguments. This will split at the first
9065  # space.
9066  complete="$FOUND_MAKE"
9067  path="${complete%% *}"
9068  tmp="$complete EOL"
9069  arguments="${tmp#* }"
9070
9071  # Input might be given as Windows format, start by converting to
9072  # unix format.
9073  new_path=`$CYGPATH -u "$path"`
9074
9075  # Now try to locate executable using which
9076  new_path=`$WHICH "$new_path" 2> /dev/null`
9077  # bat and cmd files are not always considered executable in cygwin causing which
9078  # to not find them
9079  if test "x$new_path" = x \
9080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9082    new_path=`$CYGPATH -u "$path"`
9083  fi
9084  if test "x$new_path" = x; then
9085    # Oops. Which didn't find the executable.
9086    # The splitting of arguments from the executable at a space might have been incorrect,
9087    # since paths with space are more likely in Windows. Give it another try with the whole
9088    # argument.
9089    path="$complete"
9090    arguments="EOL"
9091    new_path=`$CYGPATH -u "$path"`
9092    new_path=`$WHICH "$new_path" 2> /dev/null`
9093    # bat and cmd files are not always considered executable in cygwin causing which
9094    # to not find them
9095    if test "x$new_path" = x \
9096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9098      new_path=`$CYGPATH -u "$path"`
9099    fi
9100    if test "x$new_path" = x; then
9101      # It's still not found. Now this is an unrecoverable error.
9102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9104      has_space=`$ECHO "$complete" | $GREP " "`
9105      if test "x$has_space" != x; then
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9108      fi
9109      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9110    fi
9111  fi
9112
9113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9116  # "foo.exe" is OK but "foo" is an error.
9117  #
9118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9119  # It is also a way to make sure we got the proper file name for the real test later on.
9120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9121  if test "x$test_shortpath" = x; then
9122    # Short path failed, file does not exist as specified.
9123    # Try adding .exe or .cmd
9124    if test -f "${new_path}.exe"; then
9125      input_to_shortpath="${new_path}.exe"
9126    elif test -f "${new_path}.cmd"; then
9127      input_to_shortpath="${new_path}.cmd"
9128    else
9129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9130$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9133      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9134    fi
9135  else
9136    input_to_shortpath="$new_path"
9137  fi
9138
9139  # Call helper function which possibly converts this using DOS-style short mode.
9140  # If so, the updated path is stored in $new_path.
9141  new_path="$input_to_shortpath"
9142
9143  input_path="$input_to_shortpath"
9144  # Check if we need to convert this using DOS-style short mode. If the path
9145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9146  # take no chances and rewrite it.
9147  # Note: m4 eats our [], so we need to use [ and ] instead.
9148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9149  if test "x$has_forbidden_chars" != x; then
9150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9154      # Going to short mode and back again did indeed matter. Since short mode is
9155      # case insensitive, let's make it lowercase to improve readability.
9156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9157      # Now convert it back to Unix-stile (cygpath)
9158      input_path=`$CYGPATH -u "$shortmode_path"`
9159      new_path="$input_path"
9160    fi
9161  fi
9162
9163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9164  if test "x$test_cygdrive_prefix" = x; then
9165    # As a simple fix, exclude /usr/bin since it's not a real path.
9166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9168      # a path prefixed by /cygdrive for fixpath to work.
9169      new_path="$CYGWIN_ROOT_PATH$input_path"
9170    fi
9171  fi
9172
9173  # remove trailing .exe if any
9174  new_path="${new_path/%.exe/}"
9175
9176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9177
9178  # First separate the path from the arguments. This will split at the first
9179  # space.
9180  complete="$FOUND_MAKE"
9181  path="${complete%% *}"
9182  tmp="$complete EOL"
9183  arguments="${tmp#* }"
9184
9185  # Input might be given as Windows format, start by converting to
9186  # unix format.
9187  new_path="$path"
9188
9189  windows_path="$new_path"
9190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9191    unix_path=`$CYGPATH -u "$windows_path"`
9192    new_path="$unix_path"
9193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9195    new_path="$unix_path"
9196  fi
9197
9198
9199  # Now try to locate executable using which
9200  new_path=`$WHICH "$new_path" 2> /dev/null`
9201
9202  if test "x$new_path" = x; then
9203    # Oops. Which didn't find the executable.
9204    # The splitting of arguments from the executable at a space might have been incorrect,
9205    # since paths with space are more likely in Windows. Give it another try with the whole
9206    # argument.
9207    path="$complete"
9208    arguments="EOL"
9209    new_path="$path"
9210
9211  windows_path="$new_path"
9212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9213    unix_path=`$CYGPATH -u "$windows_path"`
9214    new_path="$unix_path"
9215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9217    new_path="$unix_path"
9218  fi
9219
9220
9221    new_path=`$WHICH "$new_path" 2> /dev/null`
9222
9223    if test "x$new_path" = x; then
9224      # It's still not found. Now this is an unrecoverable error.
9225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9227      has_space=`$ECHO "$complete" | $GREP " "`
9228      if test "x$has_space" != x; then
9229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9231      fi
9232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9233    fi
9234  fi
9235
9236  # Now new_path has a complete unix path to the binary
9237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9238    # Keep paths in /bin as-is, but remove trailing .exe if any
9239    new_path="${new_path/%.exe/}"
9240    # Do not save /bin paths to all_fixpath_prefixes!
9241  else
9242    # Not in mixed or Windows style, start by that.
9243    new_path=`cmd //c echo $new_path`
9244
9245  input_path="$new_path"
9246  # Check if we need to convert this using DOS-style short mode. If the path
9247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9248  # take no chances and rewrite it.
9249  # Note: m4 eats our [], so we need to use [ and ] instead.
9250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9251  if test "x$has_forbidden_chars" != x; then
9252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9254  fi
9255
9256    # Output is in $new_path
9257
9258  windows_path="$new_path"
9259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9260    unix_path=`$CYGPATH -u "$windows_path"`
9261    new_path="$unix_path"
9262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9264    new_path="$unix_path"
9265  fi
9266
9267    # remove trailing .exe if any
9268    new_path="${new_path/%.exe/}"
9269
9270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9272  fi
9273
9274  else
9275    # We're on a posix platform. Hooray! :)
9276    # First separate the path from the arguments. This will split at the first
9277    # space.
9278    complete="$FOUND_MAKE"
9279    path="${complete%% *}"
9280    tmp="$complete EOL"
9281    arguments="${tmp#* }"
9282
9283    # Cannot rely on the command "which" here since it doesn't always work.
9284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9285    if test -z "$is_absolute_path"; then
9286      # Path to executable is not absolute. Find it.
9287      IFS_save="$IFS"
9288      IFS=:
9289      for p in $PATH; do
9290        if test -f "$p/$path" && test -x "$p/$path"; then
9291          new_path="$p/$path"
9292          break
9293        fi
9294      done
9295      IFS="$IFS_save"
9296    else
9297      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9298$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9299      new_path="$path"
9300    fi
9301
9302    if test "x$new_path" = x; then
9303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9304$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9305      has_space=`$ECHO "$complete" | $GREP " "`
9306      if test "x$has_space" != x; then
9307        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9309      fi
9310      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9311    fi
9312  fi
9313
9314  # Now join together the path and the arguments once again
9315  if test "x$arguments" != xEOL; then
9316    new_complete="$new_path ${arguments% *}"
9317  else
9318    new_complete="$new_path"
9319  fi
9320
9321  if test "x$complete" != "x$new_complete"; then
9322    FOUND_MAKE="$new_complete"
9323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9324$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9325  fi
9326
9327        fi
9328      fi
9329    fi
9330  fi
9331
9332    fi
9333
9334    if test "x$FOUND_MAKE" = x; then
9335      if test "x$TOOLS_DIR" != x; then
9336        # We have a tools-dir, check that as well before giving up.
9337        OLD_PATH=$PATH
9338        PATH=$TOOLS_DIR:$PATH
9339        for ac_prog in gmake
9340do
9341  # Extract the first word of "$ac_prog", so it can be a program name with args.
9342set dummy $ac_prog; ac_word=$2
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344$as_echo_n "checking for $ac_word... " >&6; }
9345if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9346  $as_echo_n "(cached) " >&6
9347else
9348  case $CHECK_TOOLSDIR_GMAKE in
9349  [\\/]* | ?:[\\/]*)
9350  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9351  ;;
9352  *)
9353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354for as_dir in $PATH
9355do
9356  IFS=$as_save_IFS
9357  test -z "$as_dir" && as_dir=.
9358    for ac_exec_ext in '' $ac_executable_extensions; do
9359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9362    break 2
9363  fi
9364done
9365  done
9366IFS=$as_save_IFS
9367
9368  ;;
9369esac
9370fi
9371CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9372if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9374$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9375else
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
9378fi
9379
9380
9381  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9382done
9383
9384
9385  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9386  DESCRIPTION="gmake in tools-dir"
9387  if test "x$MAKE_CANDIDATE" != x; then
9388    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9389$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9390    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9391    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9392    if test "x$IS_GNU_MAKE" = x; then
9393      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9394$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9395    else
9396      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9397      if test "x$IS_MODERN_MAKE" = x; then
9398        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9399$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9400      else
9401        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9402          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403            MAKE_EXPECTED_ENV='cygwin'
9404          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9405            MAKE_EXPECTED_ENV='msys'
9406          else
9407            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9408          fi
9409          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9410          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9411        else
9412          # Not relevant for non-Windows
9413          IS_MAKE_CORRECT_ENV=true
9414        fi
9415        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9417$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9418        else
9419          FOUND_MAKE=$MAKE_CANDIDATE
9420
9421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9422
9423  # First separate the path from the arguments. This will split at the first
9424  # space.
9425  complete="$FOUND_MAKE"
9426  path="${complete%% *}"
9427  tmp="$complete EOL"
9428  arguments="${tmp#* }"
9429
9430  # Input might be given as Windows format, start by converting to
9431  # unix format.
9432  new_path=`$CYGPATH -u "$path"`
9433
9434  # Now try to locate executable using which
9435  new_path=`$WHICH "$new_path" 2> /dev/null`
9436  # bat and cmd files are not always considered executable in cygwin causing which
9437  # to not find them
9438  if test "x$new_path" = x \
9439      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9440      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9441    new_path=`$CYGPATH -u "$path"`
9442  fi
9443  if test "x$new_path" = x; then
9444    # Oops. Which didn't find the executable.
9445    # The splitting of arguments from the executable at a space might have been incorrect,
9446    # since paths with space are more likely in Windows. Give it another try with the whole
9447    # argument.
9448    path="$complete"
9449    arguments="EOL"
9450    new_path=`$CYGPATH -u "$path"`
9451    new_path=`$WHICH "$new_path" 2> /dev/null`
9452    # bat and cmd files are not always considered executable in cygwin causing which
9453    # to not find them
9454    if test "x$new_path" = x \
9455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9457      new_path=`$CYGPATH -u "$path"`
9458    fi
9459    if test "x$new_path" = x; then
9460      # It's still not found. Now this is an unrecoverable error.
9461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9463      has_space=`$ECHO "$complete" | $GREP " "`
9464      if test "x$has_space" != x; then
9465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9467      fi
9468      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9469    fi
9470  fi
9471
9472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9475  # "foo.exe" is OK but "foo" is an error.
9476  #
9477  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9478  # It is also a way to make sure we got the proper file name for the real test later on.
9479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9480  if test "x$test_shortpath" = x; then
9481    # Short path failed, file does not exist as specified.
9482    # Try adding .exe or .cmd
9483    if test -f "${new_path}.exe"; then
9484      input_to_shortpath="${new_path}.exe"
9485    elif test -f "${new_path}.cmd"; then
9486      input_to_shortpath="${new_path}.cmd"
9487    else
9488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9490      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9491$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9492      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9493    fi
9494  else
9495    input_to_shortpath="$new_path"
9496  fi
9497
9498  # Call helper function which possibly converts this using DOS-style short mode.
9499  # If so, the updated path is stored in $new_path.
9500  new_path="$input_to_shortpath"
9501
9502  input_path="$input_to_shortpath"
9503  # Check if we need to convert this using DOS-style short mode. If the path
9504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9505  # take no chances and rewrite it.
9506  # Note: m4 eats our [], so we need to use [ and ] instead.
9507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9508  if test "x$has_forbidden_chars" != x; then
9509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9513      # Going to short mode and back again did indeed matter. Since short mode is
9514      # case insensitive, let's make it lowercase to improve readability.
9515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9516      # Now convert it back to Unix-stile (cygpath)
9517      input_path=`$CYGPATH -u "$shortmode_path"`
9518      new_path="$input_path"
9519    fi
9520  fi
9521
9522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9523  if test "x$test_cygdrive_prefix" = x; then
9524    # As a simple fix, exclude /usr/bin since it's not a real path.
9525    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9527      # a path prefixed by /cygdrive for fixpath to work.
9528      new_path="$CYGWIN_ROOT_PATH$input_path"
9529    fi
9530  fi
9531
9532  # remove trailing .exe if any
9533  new_path="${new_path/%.exe/}"
9534
9535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9536
9537  # First separate the path from the arguments. This will split at the first
9538  # space.
9539  complete="$FOUND_MAKE"
9540  path="${complete%% *}"
9541  tmp="$complete EOL"
9542  arguments="${tmp#* }"
9543
9544  # Input might be given as Windows format, start by converting to
9545  # unix format.
9546  new_path="$path"
9547
9548  windows_path="$new_path"
9549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9550    unix_path=`$CYGPATH -u "$windows_path"`
9551    new_path="$unix_path"
9552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9554    new_path="$unix_path"
9555  fi
9556
9557
9558  # Now try to locate executable using which
9559  new_path=`$WHICH "$new_path" 2> /dev/null`
9560
9561  if test "x$new_path" = x; then
9562    # Oops. Which didn't find the executable.
9563    # The splitting of arguments from the executable at a space might have been incorrect,
9564    # since paths with space are more likely in Windows. Give it another try with the whole
9565    # argument.
9566    path="$complete"
9567    arguments="EOL"
9568    new_path="$path"
9569
9570  windows_path="$new_path"
9571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9572    unix_path=`$CYGPATH -u "$windows_path"`
9573    new_path="$unix_path"
9574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9576    new_path="$unix_path"
9577  fi
9578
9579
9580    new_path=`$WHICH "$new_path" 2> /dev/null`
9581
9582    if test "x$new_path" = x; then
9583      # It's still not found. Now this is an unrecoverable error.
9584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9585$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9586      has_space=`$ECHO "$complete" | $GREP " "`
9587      if test "x$has_space" != x; then
9588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9590      fi
9591      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9592    fi
9593  fi
9594
9595  # Now new_path has a complete unix path to the binary
9596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9597    # Keep paths in /bin as-is, but remove trailing .exe if any
9598    new_path="${new_path/%.exe/}"
9599    # Do not save /bin paths to all_fixpath_prefixes!
9600  else
9601    # Not in mixed or Windows style, start by that.
9602    new_path=`cmd //c echo $new_path`
9603
9604  input_path="$new_path"
9605  # Check if we need to convert this using DOS-style short mode. If the path
9606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9607  # take no chances and rewrite it.
9608  # Note: m4 eats our [], so we need to use [ and ] instead.
9609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9610  if test "x$has_forbidden_chars" != x; then
9611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9613  fi
9614
9615    # Output is in $new_path
9616
9617  windows_path="$new_path"
9618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9619    unix_path=`$CYGPATH -u "$windows_path"`
9620    new_path="$unix_path"
9621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9623    new_path="$unix_path"
9624  fi
9625
9626    # remove trailing .exe if any
9627    new_path="${new_path/%.exe/}"
9628
9629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9631  fi
9632
9633  else
9634    # We're on a posix platform. Hooray! :)
9635    # First separate the path from the arguments. This will split at the first
9636    # space.
9637    complete="$FOUND_MAKE"
9638    path="${complete%% *}"
9639    tmp="$complete EOL"
9640    arguments="${tmp#* }"
9641
9642    # Cannot rely on the command "which" here since it doesn't always work.
9643    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9644    if test -z "$is_absolute_path"; then
9645      # Path to executable is not absolute. Find it.
9646      IFS_save="$IFS"
9647      IFS=:
9648      for p in $PATH; do
9649        if test -f "$p/$path" && test -x "$p/$path"; then
9650          new_path="$p/$path"
9651          break
9652        fi
9653      done
9654      IFS="$IFS_save"
9655    else
9656      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9657$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9658      new_path="$path"
9659    fi
9660
9661    if test "x$new_path" = x; then
9662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9664      has_space=`$ECHO "$complete" | $GREP " "`
9665      if test "x$has_space" != x; then
9666        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9668      fi
9669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9670    fi
9671  fi
9672
9673  # Now join together the path and the arguments once again
9674  if test "x$arguments" != xEOL; then
9675    new_complete="$new_path ${arguments% *}"
9676  else
9677    new_complete="$new_path"
9678  fi
9679
9680  if test "x$complete" != "x$new_complete"; then
9681    FOUND_MAKE="$new_complete"
9682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9683$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9684  fi
9685
9686        fi
9687      fi
9688    fi
9689  fi
9690
9691        if test "x$FOUND_MAKE" = x; then
9692          for ac_prog in make
9693do
9694  # Extract the first word of "$ac_prog", so it can be a program name with args.
9695set dummy $ac_prog; ac_word=$2
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9697$as_echo_n "checking for $ac_word... " >&6; }
9698if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9699  $as_echo_n "(cached) " >&6
9700else
9701  case $CHECK_TOOLSDIR_MAKE in
9702  [\\/]* | ?:[\\/]*)
9703  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9704  ;;
9705  *)
9706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707for as_dir in $PATH
9708do
9709  IFS=$as_save_IFS
9710  test -z "$as_dir" && as_dir=.
9711    for ac_exec_ext in '' $ac_executable_extensions; do
9712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9713    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9715    break 2
9716  fi
9717done
9718  done
9719IFS=$as_save_IFS
9720
9721  ;;
9722esac
9723fi
9724CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9725if test -n "$CHECK_TOOLSDIR_MAKE"; then
9726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9727$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9728else
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9730$as_echo "no" >&6; }
9731fi
9732
9733
9734  test -n "$CHECK_TOOLSDIR_MAKE" && break
9735done
9736
9737
9738  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9739  DESCRIPTION="make in tools-dir"
9740  if test "x$MAKE_CANDIDATE" != x; then
9741    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9742$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9743    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9744    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9745    if test "x$IS_GNU_MAKE" = x; then
9746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9747$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9748    else
9749      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9750      if test "x$IS_MODERN_MAKE" = x; then
9751        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9752$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9753      else
9754        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9755          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756            MAKE_EXPECTED_ENV='cygwin'
9757          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9758            MAKE_EXPECTED_ENV='msys'
9759          else
9760            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9761          fi
9762          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9763          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9764        else
9765          # Not relevant for non-Windows
9766          IS_MAKE_CORRECT_ENV=true
9767        fi
9768        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9769          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9770$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9771        else
9772          FOUND_MAKE=$MAKE_CANDIDATE
9773
9774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9775
9776  # First separate the path from the arguments. This will split at the first
9777  # space.
9778  complete="$FOUND_MAKE"
9779  path="${complete%% *}"
9780  tmp="$complete EOL"
9781  arguments="${tmp#* }"
9782
9783  # Input might be given as Windows format, start by converting to
9784  # unix format.
9785  new_path=`$CYGPATH -u "$path"`
9786
9787  # Now try to locate executable using which
9788  new_path=`$WHICH "$new_path" 2> /dev/null`
9789  # bat and cmd files are not always considered executable in cygwin causing which
9790  # to not find them
9791  if test "x$new_path" = x \
9792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9794    new_path=`$CYGPATH -u "$path"`
9795  fi
9796  if test "x$new_path" = x; then
9797    # Oops. Which didn't find the executable.
9798    # The splitting of arguments from the executable at a space might have been incorrect,
9799    # since paths with space are more likely in Windows. Give it another try with the whole
9800    # argument.
9801    path="$complete"
9802    arguments="EOL"
9803    new_path=`$CYGPATH -u "$path"`
9804    new_path=`$WHICH "$new_path" 2> /dev/null`
9805    # bat and cmd files are not always considered executable in cygwin causing which
9806    # to not find them
9807    if test "x$new_path" = x \
9808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9810      new_path=`$CYGPATH -u "$path"`
9811    fi
9812    if test "x$new_path" = x; then
9813      # It's still not found. Now this is an unrecoverable error.
9814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9816      has_space=`$ECHO "$complete" | $GREP " "`
9817      if test "x$has_space" != x; then
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9820      fi
9821      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9822    fi
9823  fi
9824
9825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9828  # "foo.exe" is OK but "foo" is an error.
9829  #
9830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9831  # It is also a way to make sure we got the proper file name for the real test later on.
9832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9833  if test "x$test_shortpath" = x; then
9834    # Short path failed, file does not exist as specified.
9835    # Try adding .exe or .cmd
9836    if test -f "${new_path}.exe"; then
9837      input_to_shortpath="${new_path}.exe"
9838    elif test -f "${new_path}.cmd"; then
9839      input_to_shortpath="${new_path}.cmd"
9840    else
9841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9845      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9846    fi
9847  else
9848    input_to_shortpath="$new_path"
9849  fi
9850
9851  # Call helper function which possibly converts this using DOS-style short mode.
9852  # If so, the updated path is stored in $new_path.
9853  new_path="$input_to_shortpath"
9854
9855  input_path="$input_to_shortpath"
9856  # Check if we need to convert this using DOS-style short mode. If the path
9857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9858  # take no chances and rewrite it.
9859  # Note: m4 eats our [], so we need to use [ and ] instead.
9860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9861  if test "x$has_forbidden_chars" != x; then
9862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9866      # Going to short mode and back again did indeed matter. Since short mode is
9867      # case insensitive, let's make it lowercase to improve readability.
9868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9869      # Now convert it back to Unix-stile (cygpath)
9870      input_path=`$CYGPATH -u "$shortmode_path"`
9871      new_path="$input_path"
9872    fi
9873  fi
9874
9875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9876  if test "x$test_cygdrive_prefix" = x; then
9877    # As a simple fix, exclude /usr/bin since it's not a real path.
9878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9880      # a path prefixed by /cygdrive for fixpath to work.
9881      new_path="$CYGWIN_ROOT_PATH$input_path"
9882    fi
9883  fi
9884
9885  # remove trailing .exe if any
9886  new_path="${new_path/%.exe/}"
9887
9888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9889
9890  # First separate the path from the arguments. This will split at the first
9891  # space.
9892  complete="$FOUND_MAKE"
9893  path="${complete%% *}"
9894  tmp="$complete EOL"
9895  arguments="${tmp#* }"
9896
9897  # Input might be given as Windows format, start by converting to
9898  # unix format.
9899  new_path="$path"
9900
9901  windows_path="$new_path"
9902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9903    unix_path=`$CYGPATH -u "$windows_path"`
9904    new_path="$unix_path"
9905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9907    new_path="$unix_path"
9908  fi
9909
9910
9911  # Now try to locate executable using which
9912  new_path=`$WHICH "$new_path" 2> /dev/null`
9913
9914  if test "x$new_path" = x; then
9915    # Oops. Which didn't find the executable.
9916    # The splitting of arguments from the executable at a space might have been incorrect,
9917    # since paths with space are more likely in Windows. Give it another try with the whole
9918    # argument.
9919    path="$complete"
9920    arguments="EOL"
9921    new_path="$path"
9922
9923  windows_path="$new_path"
9924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9925    unix_path=`$CYGPATH -u "$windows_path"`
9926    new_path="$unix_path"
9927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9929    new_path="$unix_path"
9930  fi
9931
9932
9933    new_path=`$WHICH "$new_path" 2> /dev/null`
9934
9935    if test "x$new_path" = x; then
9936      # It's still not found. Now this is an unrecoverable error.
9937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9938$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9939      has_space=`$ECHO "$complete" | $GREP " "`
9940      if test "x$has_space" != x; then
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9943      fi
9944      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9945    fi
9946  fi
9947
9948  # Now new_path has a complete unix path to the binary
9949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9950    # Keep paths in /bin as-is, but remove trailing .exe if any
9951    new_path="${new_path/%.exe/}"
9952    # Do not save /bin paths to all_fixpath_prefixes!
9953  else
9954    # Not in mixed or Windows style, start by that.
9955    new_path=`cmd //c echo $new_path`
9956
9957  input_path="$new_path"
9958  # Check if we need to convert this using DOS-style short mode. If the path
9959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9960  # take no chances and rewrite it.
9961  # Note: m4 eats our [], so we need to use [ and ] instead.
9962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9963  if test "x$has_forbidden_chars" != x; then
9964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9966  fi
9967
9968    # Output is in $new_path
9969
9970  windows_path="$new_path"
9971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9972    unix_path=`$CYGPATH -u "$windows_path"`
9973    new_path="$unix_path"
9974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9976    new_path="$unix_path"
9977  fi
9978
9979    # remove trailing .exe if any
9980    new_path="${new_path/%.exe/}"
9981
9982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9984  fi
9985
9986  else
9987    # We're on a posix platform. Hooray! :)
9988    # First separate the path from the arguments. This will split at the first
9989    # space.
9990    complete="$FOUND_MAKE"
9991    path="${complete%% *}"
9992    tmp="$complete EOL"
9993    arguments="${tmp#* }"
9994
9995    # Cannot rely on the command "which" here since it doesn't always work.
9996    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9997    if test -z "$is_absolute_path"; then
9998      # Path to executable is not absolute. Find it.
9999      IFS_save="$IFS"
10000      IFS=:
10001      for p in $PATH; do
10002        if test -f "$p/$path" && test -x "$p/$path"; then
10003          new_path="$p/$path"
10004          break
10005        fi
10006      done
10007      IFS="$IFS_save"
10008    else
10009      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10010$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10011      new_path="$path"
10012    fi
10013
10014    if test "x$new_path" = x; then
10015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10016$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10017      has_space=`$ECHO "$complete" | $GREP " "`
10018      if test "x$has_space" != x; then
10019        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10021      fi
10022      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10023    fi
10024  fi
10025
10026  # Now join together the path and the arguments once again
10027  if test "x$arguments" != xEOL; then
10028    new_complete="$new_path ${arguments% *}"
10029  else
10030    new_complete="$new_path"
10031  fi
10032
10033  if test "x$complete" != "x$new_complete"; then
10034    FOUND_MAKE="$new_complete"
10035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10036$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10037  fi
10038
10039        fi
10040      fi
10041    fi
10042  fi
10043
10044        fi
10045        PATH=$OLD_PATH
10046      fi
10047    fi
10048
10049    if test "x$FOUND_MAKE" = x; then
10050      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
10051    fi
10052  fi
10053
10054  MAKE=$FOUND_MAKE
10055
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10057$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10058
10059
10060
10061  # Test if find supports -delete
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10063$as_echo_n "checking if find supports -delete... " >&6; }
10064  FIND_DELETE="-delete"
10065
10066  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10067
10068  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10069
10070  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10071  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10072    # No, it does not.
10073    rm $DELETEDIR/TestIfFindSupportsDelete
10074    FIND_DELETE="-exec rm \{\} \+"
10075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
10077  else
10078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10079$as_echo "yes" >&6; }
10080  fi
10081  rmdir $DELETEDIR
10082
10083
10084
10085  # These tools might not be installed by default,
10086  # need hint on how to install them.
10087
10088  for ac_prog in unzip
10089do
10090  # Extract the first word of "$ac_prog", so it can be a program name with args.
10091set dummy $ac_prog; ac_word=$2
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10093$as_echo_n "checking for $ac_word... " >&6; }
10094if ${ac_cv_path_UNZIP+:} false; then :
10095  $as_echo_n "(cached) " >&6
10096else
10097  case $UNZIP in
10098  [\\/]* | ?:[\\/]*)
10099  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10100  ;;
10101  *)
10102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10103for as_dir in $PATH
10104do
10105  IFS=$as_save_IFS
10106  test -z "$as_dir" && as_dir=.
10107    for ac_exec_ext in '' $ac_executable_extensions; do
10108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10109    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10111    break 2
10112  fi
10113done
10114  done
10115IFS=$as_save_IFS
10116
10117  ;;
10118esac
10119fi
10120UNZIP=$ac_cv_path_UNZIP
10121if test -n "$UNZIP"; then
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10123$as_echo "$UNZIP" >&6; }
10124else
10125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126$as_echo "no" >&6; }
10127fi
10128
10129
10130  test -n "$UNZIP" && break
10131done
10132
10133
10134  if test "x$UNZIP" = x; then
10135    if test "xunzip" = x; then
10136      PROG_NAME=unzip
10137    else
10138      PROG_NAME=unzip
10139    fi
10140    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10141$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10142    as_fn_error $? "Cannot continue" "$LINENO" 5
10143  fi
10144
10145
10146
10147  for ac_prog in zip
10148do
10149  # Extract the first word of "$ac_prog", so it can be a program name with args.
10150set dummy $ac_prog; ac_word=$2
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152$as_echo_n "checking for $ac_word... " >&6; }
10153if ${ac_cv_path_ZIP+:} false; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $ZIP in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10159  ;;
10160  *)
10161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162for as_dir in $PATH
10163do
10164  IFS=$as_save_IFS
10165  test -z "$as_dir" && as_dir=.
10166    for ac_exec_ext in '' $ac_executable_extensions; do
10167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10168    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170    break 2
10171  fi
10172done
10173  done
10174IFS=$as_save_IFS
10175
10176  ;;
10177esac
10178fi
10179ZIP=$ac_cv_path_ZIP
10180if test -n "$ZIP"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10182$as_echo "$ZIP" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189  test -n "$ZIP" && break
10190done
10191
10192
10193  if test "x$ZIP" = x; then
10194    if test "xzip" = x; then
10195      PROG_NAME=zip
10196    else
10197      PROG_NAME=zip
10198    fi
10199    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10200$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10201    as_fn_error $? "Cannot continue" "$LINENO" 5
10202  fi
10203
10204
10205
10206  # Non-required basic tools
10207
10208  # Extract the first word of "ldd", so it can be a program name with args.
10209set dummy ldd; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if ${ac_cv_path_LDD+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $LDD in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238LDD=$ac_cv_path_LDD
10239if test -n "$LDD"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10241$as_echo "$LDD" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248  if test "x$LDD" = "x"; then
10249    # List shared lib dependencies is used for
10250    # debug output and checking for forbidden dependencies.
10251    # We can build without it.
10252    LDD="true"
10253  fi
10254  # Extract the first word of "otool", so it can be a program name with args.
10255set dummy otool; ac_word=$2
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10257$as_echo_n "checking for $ac_word... " >&6; }
10258if ${ac_cv_path_OTOOL+:} false; then :
10259  $as_echo_n "(cached) " >&6
10260else
10261  case $OTOOL in
10262  [\\/]* | ?:[\\/]*)
10263  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10264  ;;
10265  *)
10266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267for as_dir in $PATH
10268do
10269  IFS=$as_save_IFS
10270  test -z "$as_dir" && as_dir=.
10271    for ac_exec_ext in '' $ac_executable_extensions; do
10272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10273    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10275    break 2
10276  fi
10277done
10278  done
10279IFS=$as_save_IFS
10280
10281  ;;
10282esac
10283fi
10284OTOOL=$ac_cv_path_OTOOL
10285if test -n "$OTOOL"; then
10286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10287$as_echo "$OTOOL" >&6; }
10288else
10289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
10291fi
10292
10293
10294  if test "x$OTOOL" = "x"; then
10295    OTOOL="true"
10296  fi
10297  for ac_prog in readelf greadelf
10298do
10299  # Extract the first word of "$ac_prog", so it can be a program name with args.
10300set dummy $ac_prog; ac_word=$2
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10302$as_echo_n "checking for $ac_word... " >&6; }
10303if ${ac_cv_path_READELF+:} false; then :
10304  $as_echo_n "(cached) " >&6
10305else
10306  case $READELF in
10307  [\\/]* | ?:[\\/]*)
10308  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10309  ;;
10310  *)
10311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314  IFS=$as_save_IFS
10315  test -z "$as_dir" && as_dir=.
10316    for ac_exec_ext in '' $ac_executable_extensions; do
10317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10318    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10320    break 2
10321  fi
10322done
10323  done
10324IFS=$as_save_IFS
10325
10326  ;;
10327esac
10328fi
10329READELF=$ac_cv_path_READELF
10330if test -n "$READELF"; then
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10332$as_echo "$READELF" >&6; }
10333else
10334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336fi
10337
10338
10339  test -n "$READELF" && break
10340done
10341
10342  # Extract the first word of "hg", so it can be a program name with args.
10343set dummy hg; ac_word=$2
10344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10345$as_echo_n "checking for $ac_word... " >&6; }
10346if ${ac_cv_path_HG+:} false; then :
10347  $as_echo_n "(cached) " >&6
10348else
10349  case $HG in
10350  [\\/]* | ?:[\\/]*)
10351  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10352  ;;
10353  *)
10354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10355for as_dir in $PATH
10356do
10357  IFS=$as_save_IFS
10358  test -z "$as_dir" && as_dir=.
10359    for ac_exec_ext in '' $ac_executable_extensions; do
10360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10361    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10363    break 2
10364  fi
10365done
10366  done
10367IFS=$as_save_IFS
10368
10369  ;;
10370esac
10371fi
10372HG=$ac_cv_path_HG
10373if test -n "$HG"; then
10374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10375$as_echo "$HG" >&6; }
10376else
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10378$as_echo "no" >&6; }
10379fi
10380
10381
10382  # Extract the first word of "stat", so it can be a program name with args.
10383set dummy stat; ac_word=$2
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10385$as_echo_n "checking for $ac_word... " >&6; }
10386if ${ac_cv_path_STAT+:} false; then :
10387  $as_echo_n "(cached) " >&6
10388else
10389  case $STAT in
10390  [\\/]* | ?:[\\/]*)
10391  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10392  ;;
10393  *)
10394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10395for as_dir in $PATH
10396do
10397  IFS=$as_save_IFS
10398  test -z "$as_dir" && as_dir=.
10399    for ac_exec_ext in '' $ac_executable_extensions; do
10400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10401    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10403    break 2
10404  fi
10405done
10406  done
10407IFS=$as_save_IFS
10408
10409  ;;
10410esac
10411fi
10412STAT=$ac_cv_path_STAT
10413if test -n "$STAT"; then
10414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10415$as_echo "$STAT" >&6; }
10416else
10417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419fi
10420
10421
10422  # Extract the first word of "time", so it can be a program name with args.
10423set dummy time; ac_word=$2
10424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425$as_echo_n "checking for $ac_word... " >&6; }
10426if ${ac_cv_path_TIME+:} false; then :
10427  $as_echo_n "(cached) " >&6
10428else
10429  case $TIME in
10430  [\\/]* | ?:[\\/]*)
10431  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10432  ;;
10433  *)
10434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437  IFS=$as_save_IFS
10438  test -z "$as_dir" && as_dir=.
10439    for ac_exec_ext in '' $ac_executable_extensions; do
10440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443    break 2
10444  fi
10445done
10446  done
10447IFS=$as_save_IFS
10448
10449  ;;
10450esac
10451fi
10452TIME=$ac_cv_path_TIME
10453if test -n "$TIME"; then
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10455$as_echo "$TIME" >&6; }
10456else
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
10459fi
10460
10461
10462  # Check if it's GNU time
10463  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10464  if test "x$IS_GNU_TIME" != x; then
10465    IS_GNU_TIME=yes
10466  else
10467    IS_GNU_TIME=no
10468  fi
10469
10470
10471  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10472
10473  for ac_prog in comm
10474do
10475  # Extract the first word of "$ac_prog", so it can be a program name with args.
10476set dummy $ac_prog; ac_word=$2
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10478$as_echo_n "checking for $ac_word... " >&6; }
10479if ${ac_cv_path_COMM+:} false; then :
10480  $as_echo_n "(cached) " >&6
10481else
10482  case $COMM in
10483  [\\/]* | ?:[\\/]*)
10484  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10485  ;;
10486  *)
10487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10488for as_dir in $PATH
10489do
10490  IFS=$as_save_IFS
10491  test -z "$as_dir" && as_dir=.
10492    for ac_exec_ext in '' $ac_executable_extensions; do
10493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10494    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10496    break 2
10497  fi
10498done
10499  done
10500IFS=$as_save_IFS
10501
10502  ;;
10503esac
10504fi
10505COMM=$ac_cv_path_COMM
10506if test -n "$COMM"; then
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10508$as_echo "$COMM" >&6; }
10509else
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511$as_echo "no" >&6; }
10512fi
10513
10514
10515  test -n "$COMM" && break
10516done
10517
10518
10519  if test "x$COMM" = x; then
10520    if test "xcomm" = x; then
10521      PROG_NAME=comm
10522    else
10523      PROG_NAME=comm
10524    fi
10525    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10526$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10527    as_fn_error $? "Cannot continue" "$LINENO" 5
10528  fi
10529
10530
10531  fi
10532
10533  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10534
10535  for ac_prog in dsymutil
10536do
10537  # Extract the first word of "$ac_prog", so it can be a program name with args.
10538set dummy $ac_prog; ac_word=$2
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10540$as_echo_n "checking for $ac_word... " >&6; }
10541if ${ac_cv_path_DSYMUTIL+:} false; then :
10542  $as_echo_n "(cached) " >&6
10543else
10544  case $DSYMUTIL in
10545  [\\/]* | ?:[\\/]*)
10546  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10547  ;;
10548  *)
10549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10550for as_dir in $PATH
10551do
10552  IFS=$as_save_IFS
10553  test -z "$as_dir" && as_dir=.
10554    for ac_exec_ext in '' $ac_executable_extensions; do
10555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10556    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10558    break 2
10559  fi
10560done
10561  done
10562IFS=$as_save_IFS
10563
10564  ;;
10565esac
10566fi
10567DSYMUTIL=$ac_cv_path_DSYMUTIL
10568if test -n "$DSYMUTIL"; then
10569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10570$as_echo "$DSYMUTIL" >&6; }
10571else
10572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10573$as_echo "no" >&6; }
10574fi
10575
10576
10577  test -n "$DSYMUTIL" && break
10578done
10579
10580
10581  if test "x$DSYMUTIL" = x; then
10582    if test "xdsymutil" = x; then
10583      PROG_NAME=dsymutil
10584    else
10585      PROG_NAME=dsymutil
10586    fi
10587    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10589    as_fn_error $? "Cannot continue" "$LINENO" 5
10590  fi
10591
10592
10593
10594  for ac_prog in xattr
10595do
10596  # Extract the first word of "$ac_prog", so it can be a program name with args.
10597set dummy $ac_prog; ac_word=$2
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10599$as_echo_n "checking for $ac_word... " >&6; }
10600if ${ac_cv_path_XATTR+:} false; then :
10601  $as_echo_n "(cached) " >&6
10602else
10603  case $XATTR in
10604  [\\/]* | ?:[\\/]*)
10605  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10606  ;;
10607  *)
10608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10609for as_dir in $PATH
10610do
10611  IFS=$as_save_IFS
10612  test -z "$as_dir" && as_dir=.
10613    for ac_exec_ext in '' $ac_executable_extensions; do
10614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10615    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10617    break 2
10618  fi
10619done
10620  done
10621IFS=$as_save_IFS
10622
10623  ;;
10624esac
10625fi
10626XATTR=$ac_cv_path_XATTR
10627if test -n "$XATTR"; then
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10629$as_echo "$XATTR" >&6; }
10630else
10631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
10633fi
10634
10635
10636  test -n "$XATTR" && break
10637done
10638
10639
10640  if test "x$XATTR" = x; then
10641    if test "xxattr" = x; then
10642      PROG_NAME=xattr
10643    else
10644      PROG_NAME=xattr
10645    fi
10646    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10648    as_fn_error $? "Cannot continue" "$LINENO" 5
10649  fi
10650
10651
10652    # Extract the first word of "codesign", so it can be a program name with args.
10653set dummy codesign; ac_word=$2
10654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10655$as_echo_n "checking for $ac_word... " >&6; }
10656if ${ac_cv_path_CODESIGN+:} false; then :
10657  $as_echo_n "(cached) " >&6
10658else
10659  case $CODESIGN in
10660  [\\/]* | ?:[\\/]*)
10661  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10662  ;;
10663  *)
10664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10665for as_dir in $PATH
10666do
10667  IFS=$as_save_IFS
10668  test -z "$as_dir" && as_dir=.
10669    for ac_exec_ext in '' $ac_executable_extensions; do
10670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10671    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10673    break 2
10674  fi
10675done
10676  done
10677IFS=$as_save_IFS
10678
10679  ;;
10680esac
10681fi
10682CODESIGN=$ac_cv_path_CODESIGN
10683if test -n "$CODESIGN"; then
10684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10685$as_echo "$CODESIGN" >&6; }
10686else
10687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688$as_echo "no" >&6; }
10689fi
10690
10691
10692    if test "x$CODESIGN" != "x"; then
10693      # Verify that the openjdk_codesign certificate is present
10694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10695$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10696      rm -f codesign-testfile
10697      touch codesign-testfile
10698      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10699      rm -f codesign-testfile
10700      if test "x$CODESIGN" = x; then
10701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702$as_echo "no" >&6; }
10703      else
10704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10705$as_echo "yes" >&6; }
10706      fi
10707    fi
10708  fi
10709
10710
10711# Check if pkg-config is available.
10712
10713
10714if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10715	if test -n "$ac_tool_prefix"; then
10716  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10717set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10719$as_echo_n "checking for $ac_word... " >&6; }
10720if ${ac_cv_path_PKG_CONFIG+:} false; then :
10721  $as_echo_n "(cached) " >&6
10722else
10723  case $PKG_CONFIG in
10724  [\\/]* | ?:[\\/]*)
10725  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10726  ;;
10727  *)
10728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10729for as_dir in $PATH
10730do
10731  IFS=$as_save_IFS
10732  test -z "$as_dir" && as_dir=.
10733    for ac_exec_ext in '' $ac_executable_extensions; do
10734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10735    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10737    break 2
10738  fi
10739done
10740  done
10741IFS=$as_save_IFS
10742
10743  ;;
10744esac
10745fi
10746PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10747if test -n "$PKG_CONFIG"; then
10748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10749$as_echo "$PKG_CONFIG" >&6; }
10750else
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
10753fi
10754
10755
10756fi
10757if test -z "$ac_cv_path_PKG_CONFIG"; then
10758  ac_pt_PKG_CONFIG=$PKG_CONFIG
10759  # Extract the first word of "pkg-config", so it can be a program name with args.
10760set dummy pkg-config; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $ac_pt_PKG_CONFIG in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10790if test -n "$ac_pt_PKG_CONFIG"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10792$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798  if test "x$ac_pt_PKG_CONFIG" = x; then
10799    PKG_CONFIG=""
10800  else
10801    case $cross_compiling:$ac_tool_warned in
10802yes:)
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10805ac_tool_warned=yes ;;
10806esac
10807    PKG_CONFIG=$ac_pt_PKG_CONFIG
10808  fi
10809else
10810  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10811fi
10812
10813fi
10814if test -n "$PKG_CONFIG"; then
10815	_pkg_min_version=0.9.0
10816	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10817$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10818	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10819		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10820$as_echo "yes" >&6; }
10821	else
10822		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10823$as_echo "no" >&6; }
10824		PKG_CONFIG=""
10825	fi
10826
10827fi
10828
10829# After basic tools have been setup, we can check build os specific details.
10830
10831  ###############################################################################
10832
10833  # Note that this is the build platform OS version!
10834
10835  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10836  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10837  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10838  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10839
10840
10841
10842
10843
10844# Setup builddeps, for automatic downloading of tools we need.
10845# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10846# boot-jdk setup, but we need to have basic tools setup first.
10847
10848
10849# Check whether --with-builddeps-conf was given.
10850if test "${with_builddeps_conf+set}" = set; then :
10851  withval=$with_builddeps_conf;
10852fi
10853
10854
10855
10856# Check whether --with-builddeps-server was given.
10857if test "${with_builddeps_server+set}" = set; then :
10858  withval=$with_builddeps_server;
10859fi
10860
10861
10862
10863# Check whether --with-builddeps-dir was given.
10864if test "${with_builddeps_dir+set}" = set; then :
10865  withval=$with_builddeps_dir;
10866else
10867  with_builddeps_dir=/localhome/builddeps
10868fi
10869
10870
10871
10872# Check whether --with-builddeps-group was given.
10873if test "${with_builddeps_group+set}" = set; then :
10874  withval=$with_builddeps_group;
10875fi
10876
10877
10878
10879
10880  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10881    if test "x$with_builddeps_conf" != x; then
10882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10883$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10884      builddepsfile=$with_builddeps_conf
10885      if test -s $builddepsfile; then
10886        . $builddepsfile
10887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10888$as_echo "loaded!" >&6; }
10889      else
10890        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10891      fi
10892    else
10893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10894$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10895      builddepsfile=`mktemp`
10896      touch $builddepsfile
10897      # Put all found confs into a single file.
10898      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10899      # Source the file to acquire the variables
10900      if test -s $builddepsfile; then
10901        . $builddepsfile
10902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10903$as_echo "found at least one!" >&6; }
10904      else
10905        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10906      fi
10907    fi
10908    # Create build and target names that use _ instead of "-" and ".".
10909    # This is necessary to use them in variable names.
10910    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10911    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10912    # Extract rewrite information for build and target
10913    eval rewritten_build=\${REWRITE_${build_var}}
10914    if test "x$rewritten_build" = x; then
10915      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10916      echo Build stays the same $rewritten_build
10917    else
10918      echo Rewriting build for builddeps into $rewritten_build
10919    fi
10920    eval rewritten_target=\${REWRITE_${target_var}}
10921    if test "x$rewritten_target" = x; then
10922      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10923      echo Target stays the same $rewritten_target
10924    else
10925      echo Rewriting target for builddeps into $rewritten_target
10926    fi
10927    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10928    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10929  fi
10930  for ac_prog in 7z unzip
10931do
10932  # Extract the first word of "$ac_prog", so it can be a program name with args.
10933set dummy $ac_prog; ac_word=$2
10934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10935$as_echo_n "checking for $ac_word... " >&6; }
10936if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10937  $as_echo_n "(cached) " >&6
10938else
10939  if test -n "$BDEPS_UNZIP"; then
10940  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10941else
10942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10943for as_dir in $PATH
10944do
10945  IFS=$as_save_IFS
10946  test -z "$as_dir" && as_dir=.
10947    for ac_exec_ext in '' $ac_executable_extensions; do
10948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10949    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10951    break 2
10952  fi
10953done
10954  done
10955IFS=$as_save_IFS
10956
10957fi
10958fi
10959BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10960if test -n "$BDEPS_UNZIP"; then
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10962$as_echo "$BDEPS_UNZIP" >&6; }
10963else
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966fi
10967
10968
10969  test -n "$BDEPS_UNZIP" && break
10970done
10971
10972  if test "x$BDEPS_UNZIP" = x7z; then
10973    BDEPS_UNZIP="7z x"
10974  fi
10975
10976  for ac_prog in wget lftp ftp
10977do
10978  # Extract the first word of "$ac_prog", so it can be a program name with args.
10979set dummy $ac_prog; ac_word=$2
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10981$as_echo_n "checking for $ac_word... " >&6; }
10982if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10983  $as_echo_n "(cached) " >&6
10984else
10985  if test -n "$BDEPS_FTP"; then
10986  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10987else
10988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10989for as_dir in $PATH
10990do
10991  IFS=$as_save_IFS
10992  test -z "$as_dir" && as_dir=.
10993    for ac_exec_ext in '' $ac_executable_extensions; do
10994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10995    ac_cv_prog_BDEPS_FTP="$ac_prog"
10996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10997    break 2
10998  fi
10999done
11000  done
11001IFS=$as_save_IFS
11002
11003fi
11004fi
11005BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11006if test -n "$BDEPS_FTP"; then
11007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11008$as_echo "$BDEPS_FTP" >&6; }
11009else
11010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11011$as_echo "no" >&6; }
11012fi
11013
11014
11015  test -n "$BDEPS_FTP" && break
11016done
11017
11018
11019
11020###############################################################################
11021#
11022# Determine OpenJDK variants, options and version numbers.
11023#
11024###############################################################################
11025
11026# We need build & target for this.
11027
11028
11029  ###############################################################################
11030  #
11031  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11032  # We always build headless support.
11033  #
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11035$as_echo_n "checking headful support... " >&6; }
11036  # Check whether --enable-headful was given.
11037if test "${enable_headful+set}" = set; then :
11038  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11039else
11040  SUPPORT_HEADFUL=yes
11041fi
11042
11043
11044  SUPPORT_HEADLESS=yes
11045  BUILD_HEADLESS="BUILD_HEADLESS:=true"
11046
11047  if test "x$SUPPORT_HEADFUL" = xyes; then
11048    # We are building both headful and headless.
11049    headful_msg="include support for both headful and headless"
11050  fi
11051
11052  if test "x$SUPPORT_HEADFUL" = xno; then
11053    # Thus we are building headless only.
11054    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11055    headful_msg="headless only"
11056  fi
11057
11058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11059$as_echo "$headful_msg" >&6; }
11060
11061
11062
11063
11064
11065  # Control wether Hotspot runs Queens test after build.
11066  # Check whether --enable-hotspot-test-in-build was given.
11067if test "${enable_hotspot_test_in_build+set}" = set; then :
11068  enableval=$enable_hotspot_test_in_build;
11069else
11070  enable_hotspot_test_in_build=no
11071fi
11072
11073  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11074    TEST_IN_BUILD=true
11075  else
11076    TEST_IN_BUILD=false
11077  fi
11078
11079
11080  ###############################################################################
11081  #
11082  # Choose cacerts source file
11083  #
11084
11085# Check whether --with-cacerts-file was given.
11086if test "${with_cacerts_file+set}" = set; then :
11087  withval=$with_cacerts_file;
11088fi
11089
11090  if test "x$with_cacerts_file" != x; then
11091    CACERTS_FILE=$with_cacerts_file
11092  else
11093    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11094  fi
11095
11096
11097  ###############################################################################
11098  #
11099  # Enable or disable unlimited crypto
11100  #
11101  # Check whether --enable-unlimited-crypto was given.
11102if test "${enable_unlimited_crypto+set}" = set; then :
11103  enableval=$enable_unlimited_crypto;
11104else
11105  enable_unlimited_crypto=no
11106fi
11107
11108  if test "x$enable_unlimited_crypto" = "xyes"; then
11109    UNLIMITED_CRYPTO=true
11110  else
11111    UNLIMITED_CRYPTO=false
11112  fi
11113
11114
11115  ###############################################################################
11116  #
11117  # Enable or disable the elliptic curve crypto implementation
11118  #
11119
11120
11121  ###############################################################################
11122  #
11123  # Compress jars
11124  #
11125  COMPRESS_JARS=false
11126
11127
11128
11129
11130  # Source the version numbers
11131  . $AUTOCONF_DIR/version-numbers
11132
11133  # Get the settings from parameters
11134
11135# Check whether --with-milestone was given.
11136if test "${with_milestone+set}" = set; then :
11137  withval=$with_milestone;
11138fi
11139
11140  if test "x$with_milestone" = xyes; then
11141    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11142  elif test "x$with_milestone" != x; then
11143    MILESTONE="$with_milestone"
11144  fi
11145  if test "x$MILESTONE" = x; then
11146    MILESTONE=internal
11147  fi
11148
11149
11150# Check whether --with-update-version was given.
11151if test "${with_update_version+set}" = set; then :
11152  withval=$with_update_version;
11153fi
11154
11155  if test "x$with_update_version" = xyes; then
11156    as_fn_error $? "Update version must have a value" "$LINENO" 5
11157  elif test "x$with_update_version" != x; then
11158    JDK_UPDATE_VERSION="$with_update_version"
11159    # On macosx 10.7, it's not possible to set --with-update-version=0X due
11160    # to a bug in expr (which reduces it to just X). To work around this, we
11161    # always add a 0 to one digit update versions.
11162    if test "${#JDK_UPDATE_VERSION}" = "1"; then
11163      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11164    fi
11165  fi
11166
11167
11168# Check whether --with-user-release-suffix was given.
11169if test "${with_user_release_suffix+set}" = set; then :
11170  withval=$with_user_release_suffix;
11171fi
11172
11173  if test "x$with_user_release_suffix" = xyes; then
11174    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11175  elif test "x$with_user_release_suffix" != x; then
11176    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11177  fi
11178
11179
11180# Check whether --with-build-number was given.
11181if test "${with_build_number+set}" = set; then :
11182  withval=$with_build_number;
11183fi
11184
11185  if test "x$with_build_number" = xyes; then
11186    as_fn_error $? "Build number must have a value" "$LINENO" 5
11187  elif test "x$with_build_number" != x; then
11188    JDK_BUILD_NUMBER="$with_build_number"
11189  fi
11190  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11191  if test "x$JDK_BUILD_NUMBER" = x; then
11192    JDK_BUILD_NUMBER=b00
11193    if test "x$USER_RELEASE_SUFFIX" = x; then
11194      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11195      # Avoid [:alnum:] since it depends on the locale.
11196      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11197      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11198    fi
11199  fi
11200
11201  # Now set the JDK version, milestone, build number etc.
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217  COPYRIGHT_YEAR=`date +'%Y'`
11218
11219
11220  if test "x$JDK_UPDATE_VERSION" != x; then
11221    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11222  else
11223    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11224  fi
11225
11226
11227  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11228
11229
11230
11231###############################################################################
11232#
11233# Setup BootJDK, used to bootstrap the build.
11234#
11235###############################################################################
11236
11237
11238  BOOT_JDK_FOUND=no
11239
11240# Check whether --with-boot-jdk was given.
11241if test "${with_boot_jdk+set}" = set; then :
11242  withval=$with_boot_jdk;
11243fi
11244
11245
11246  # We look for the Boot JDK through various means, going from more certain to
11247  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11248  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11249  # must check if this is indeed valid; otherwise we'll continue looking.
11250
11251  # Test: Is bootjdk explicitely set by command line arguments?
11252
11253  if test "x$BOOT_JDK_FOUND" = xno; then
11254    # Now execute the test
11255
11256  if test "x$with_boot_jdk" != x; then
11257    BOOT_JDK=$with_boot_jdk
11258    BOOT_JDK_FOUND=maybe
11259    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11260$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11261  fi
11262
11263
11264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11266      # Do we have a bin/java?
11267      if test ! -x "$BOOT_JDK/bin/java"; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11270        BOOT_JDK_FOUND=no
11271      else
11272        # Do we have a bin/javac?
11273        if test ! -x "$BOOT_JDK/bin/javac"; then
11274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11278          BOOT_JDK_FOUND=no
11279        else
11280          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11281          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11284            BOOT_JDK_FOUND=no
11285          else
11286            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11287            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11288
11289            # Extra M4 quote needed to protect [] in grep expression.
11290            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11291            if test "x$FOUND_VERSION_78" = x; then
11292              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11294              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11295$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11296              BOOT_JDK_FOUND=no
11297            else
11298              # We're done! :-)
11299              BOOT_JDK_FOUND=yes
11300
11301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11302
11303  # Input might be given as Windows format, start by converting to
11304  # unix format.
11305  path="$BOOT_JDK"
11306  new_path=`$CYGPATH -u "$path"`
11307
11308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11311  # "foo.exe" is OK but "foo" is an error.
11312  #
11313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11314  # It is also a way to make sure we got the proper file name for the real test later on.
11315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11316  if test "x$test_shortpath" = x; then
11317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11319    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11320  fi
11321
11322  # Call helper function which possibly converts this using DOS-style short mode.
11323  # If so, the updated path is stored in $new_path.
11324
11325  input_path="$new_path"
11326  # Check if we need to convert this using DOS-style short mode. If the path
11327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11328  # take no chances and rewrite it.
11329  # Note: m4 eats our [], so we need to use [ and ] instead.
11330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11331  if test "x$has_forbidden_chars" != x; then
11332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11336      # Going to short mode and back again did indeed matter. Since short mode is
11337      # case insensitive, let's make it lowercase to improve readability.
11338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11339      # Now convert it back to Unix-stile (cygpath)
11340      input_path=`$CYGPATH -u "$shortmode_path"`
11341      new_path="$input_path"
11342    fi
11343  fi
11344
11345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11346  if test "x$test_cygdrive_prefix" = x; then
11347    # As a simple fix, exclude /usr/bin since it's not a real path.
11348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11350      # a path prefixed by /cygdrive for fixpath to work.
11351      new_path="$CYGWIN_ROOT_PATH$input_path"
11352    fi
11353  fi
11354
11355
11356  if test "x$path" != "x$new_path"; then
11357    BOOT_JDK="$new_path"
11358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11360  fi
11361
11362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11363
11364  path="$BOOT_JDK"
11365  has_colon=`$ECHO $path | $GREP ^.:`
11366  new_path="$path"
11367  if test "x$has_colon" = x; then
11368    # Not in mixed or Windows style, start by that.
11369    new_path=`cmd //c echo $path`
11370  fi
11371
11372
11373  input_path="$new_path"
11374  # Check if we need to convert this using DOS-style short mode. If the path
11375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11376  # take no chances and rewrite it.
11377  # Note: m4 eats our [], so we need to use [ and ] instead.
11378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11379  if test "x$has_forbidden_chars" != x; then
11380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11382  fi
11383
11384
11385  windows_path="$new_path"
11386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11387    unix_path=`$CYGPATH -u "$windows_path"`
11388    new_path="$unix_path"
11389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11391    new_path="$unix_path"
11392  fi
11393
11394  if test "x$path" != "x$new_path"; then
11395    BOOT_JDK="$new_path"
11396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11398  fi
11399
11400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11402
11403  else
11404    # We're on a posix platform. Hooray! :)
11405    path="$BOOT_JDK"
11406    has_space=`$ECHO "$path" | $GREP " "`
11407    if test "x$has_space" != x; then
11408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11410      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11411    fi
11412
11413    # Use eval to expand a potential ~
11414    eval path="$path"
11415    if test ! -f "$path" && test ! -d "$path"; then
11416      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11417    fi
11418
11419    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11420  fi
11421
11422              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11423$as_echo_n "checking for Boot JDK... " >&6; }
11424              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11425$as_echo "$BOOT_JDK" >&6; }
11426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11427$as_echo_n "checking Boot JDK version... " >&6; }
11428              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11429              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11430$as_echo "$BOOT_JDK_VERSION" >&6; }
11431            fi # end check jdk version
11432          fi # end check rt.jar
11433        fi # end check javac
11434      fi # end check java
11435    fi # end check boot jdk found
11436  fi
11437
11438  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11439    # Having specified an argument which is incorrect will produce an instant failure;
11440    # we should not go on looking
11441    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11442  fi
11443
11444  # Test: Is bootjdk available from builddeps?
11445
11446  if test "x$BOOT_JDK_FOUND" = xno; then
11447    # Now execute the test
11448
11449
11450
11451  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11452    # Source the builddeps file again, to make sure it uses the latest variables!
11453    . $builddepsfile
11454    # Look for a target and build machine specific resource!
11455    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11456    if test "x$resource" = x; then
11457      # Ok, lets instead look for a target specific resource
11458      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11459    fi
11460    if test "x$resource" = x; then
11461      # Ok, lets instead look for a build specific resource
11462      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11463    fi
11464    if test "x$resource" = x; then
11465      # Ok, lets instead look for a generic resource
11466      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11467      resource=${builddep_bootjdk}
11468    fi
11469    if test "x$resource" != x; then
11470      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11471$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11472      # If the resource in the builddeps.conf file is an existing directory,
11473      # for example /java/linux/cups
11474      if test -d ${resource}; then
11475        depdir=${resource}
11476      else
11477
11478  # bootjdk is for example mymodule
11479  # $resource is for example libs/general/libmymod_1_2_3.zip
11480  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11481  # $with_builddeps_dir is for example /localhome/builddeps
11482  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11483  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11484  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11485  filename=`basename $resource`
11486  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11487  filebase=${filename%%.*}
11488  extension=${filename#*.}
11489  installdir=$with_builddeps_dir/$filebase
11490  if test ! -f $installdir/$filename.unpacked; then
11491    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11492$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11493    if test ! -d $installdir; then
11494      mkdir -p $installdir
11495    fi
11496    if test ! -d $installdir; then
11497      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11498    fi
11499    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11500    touch $tmpfile
11501    if test ! -f $tmpfile; then
11502      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11503    fi
11504
11505  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11506  # $tmpfile is the local file name for the downloaded file.
11507  VALID_TOOL=no
11508  if test "x$BDEPS_FTP" = xwget; then
11509    VALID_TOOL=yes
11510    wget -O $tmpfile $with_builddeps_server/$resource
11511  fi
11512  if test "x$BDEPS_FTP" = xlftp; then
11513    VALID_TOOL=yes
11514    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11515  fi
11516  if test "x$BDEPS_FTP" = xftp; then
11517    VALID_TOOL=yes
11518    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11519    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11520    FTPUSERPWD=${FTPSERVER%%@*}
11521    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11522      FTPUSER=${userpwd%%:*}
11523      FTPPWD=${userpwd#*@}
11524      FTPSERVER=${FTPSERVER#*@}
11525    else
11526      FTPUSER=ftp
11527      FTPPWD=ftp
11528    fi
11529    # the "pass" command does not work on some
11530    # ftp clients (read ftp.exe) but if it works,
11531    # passive mode is better!
11532    ( \
11533        echo "user $FTPUSER $FTPPWD"        ; \
11534        echo "pass"                         ; \
11535        echo "bin"                          ; \
11536        echo "get $FTPPATH $tmpfile"              ; \
11537    ) | ftp -in $FTPSERVER
11538  fi
11539  if test "x$VALID_TOOL" != xyes; then
11540    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11541  fi
11542
11543    mv $tmpfile $installdir/$filename
11544    if test ! -s $installdir/$filename; then
11545      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11546    fi
11547    case "$extension" in
11548      zip)  echo "Unzipping $installdir/$filename..."
11549        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11550        ;;
11551      tar.gz) echo "Untaring $installdir/$filename..."
11552        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11553        ;;
11554      tgz) echo "Untaring $installdir/$filename..."
11555        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11556        ;;
11557      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11558        ;;
11559    esac
11560  fi
11561  if test -f $installdir/$filename.unpacked; then
11562    depdir=$installdir
11563  fi
11564
11565      fi
11566      # Source the builddeps file again, because in the previous command, the depdir
11567      # was updated to point at the current build dependency install directory.
11568      . $builddepsfile
11569      # Now extract variables from the builddeps.conf files.
11570      theroot=${builddep_bootjdk_ROOT}
11571      thecflags=${builddep_bootjdk_CFLAGS}
11572      thelibs=${builddep_bootjdk_LIBS}
11573      if test "x$depdir" = x; then
11574        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11575      fi
11576      BOOT_JDK=$depdir
11577      if test "x$theroot" != x; then
11578        BOOT_JDK="$theroot"
11579      fi
11580      if test "x$thecflags" != x; then
11581        BOOT_JDK_CFLAGS="$thecflags"
11582      fi
11583      if test "x$thelibs" != x; then
11584        BOOT_JDK_LIBS="$thelibs"
11585      fi
11586      BOOT_JDK_FOUND=maybe
11587      else BOOT_JDK_FOUND=no
11588
11589    fi
11590    else BOOT_JDK_FOUND=no
11591
11592  fi
11593
11594
11595
11596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11598      # Do we have a bin/java?
11599      if test ! -x "$BOOT_JDK/bin/java"; then
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11602        BOOT_JDK_FOUND=no
11603      else
11604        # Do we have a bin/javac?
11605        if test ! -x "$BOOT_JDK/bin/javac"; then
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11610          BOOT_JDK_FOUND=no
11611        else
11612          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11613          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11614            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11616            BOOT_JDK_FOUND=no
11617          else
11618            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11619            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11620
11621            # Extra M4 quote needed to protect [] in grep expression.
11622            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11623            if test "x$FOUND_VERSION_78" = x; then
11624              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11626              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11627$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11628              BOOT_JDK_FOUND=no
11629            else
11630              # We're done! :-)
11631              BOOT_JDK_FOUND=yes
11632
11633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11634
11635  # Input might be given as Windows format, start by converting to
11636  # unix format.
11637  path="$BOOT_JDK"
11638  new_path=`$CYGPATH -u "$path"`
11639
11640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11643  # "foo.exe" is OK but "foo" is an error.
11644  #
11645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11646  # It is also a way to make sure we got the proper file name for the real test later on.
11647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11648  if test "x$test_shortpath" = x; then
11649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11651    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11652  fi
11653
11654  # Call helper function which possibly converts this using DOS-style short mode.
11655  # If so, the updated path is stored in $new_path.
11656
11657  input_path="$new_path"
11658  # Check if we need to convert this using DOS-style short mode. If the path
11659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11660  # take no chances and rewrite it.
11661  # Note: m4 eats our [], so we need to use [ and ] instead.
11662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11663  if test "x$has_forbidden_chars" != x; then
11664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11668      # Going to short mode and back again did indeed matter. Since short mode is
11669      # case insensitive, let's make it lowercase to improve readability.
11670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11671      # Now convert it back to Unix-stile (cygpath)
11672      input_path=`$CYGPATH -u "$shortmode_path"`
11673      new_path="$input_path"
11674    fi
11675  fi
11676
11677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11678  if test "x$test_cygdrive_prefix" = x; then
11679    # As a simple fix, exclude /usr/bin since it's not a real path.
11680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11682      # a path prefixed by /cygdrive for fixpath to work.
11683      new_path="$CYGWIN_ROOT_PATH$input_path"
11684    fi
11685  fi
11686
11687
11688  if test "x$path" != "x$new_path"; then
11689    BOOT_JDK="$new_path"
11690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11692  fi
11693
11694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11695
11696  path="$BOOT_JDK"
11697  has_colon=`$ECHO $path | $GREP ^.:`
11698  new_path="$path"
11699  if test "x$has_colon" = x; then
11700    # Not in mixed or Windows style, start by that.
11701    new_path=`cmd //c echo $path`
11702  fi
11703
11704
11705  input_path="$new_path"
11706  # Check if we need to convert this using DOS-style short mode. If the path
11707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11708  # take no chances and rewrite it.
11709  # Note: m4 eats our [], so we need to use [ and ] instead.
11710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11711  if test "x$has_forbidden_chars" != x; then
11712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11714  fi
11715
11716
11717  windows_path="$new_path"
11718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11719    unix_path=`$CYGPATH -u "$windows_path"`
11720    new_path="$unix_path"
11721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11723    new_path="$unix_path"
11724  fi
11725
11726  if test "x$path" != "x$new_path"; then
11727    BOOT_JDK="$new_path"
11728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11730  fi
11731
11732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11734
11735  else
11736    # We're on a posix platform. Hooray! :)
11737    path="$BOOT_JDK"
11738    has_space=`$ECHO "$path" | $GREP " "`
11739    if test "x$has_space" != x; then
11740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11741$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11742      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11743    fi
11744
11745    # Use eval to expand a potential ~
11746    eval path="$path"
11747    if test ! -f "$path" && test ! -d "$path"; then
11748      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11749    fi
11750
11751    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11752  fi
11753
11754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11755$as_echo_n "checking for Boot JDK... " >&6; }
11756              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11757$as_echo "$BOOT_JDK" >&6; }
11758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11759$as_echo_n "checking Boot JDK version... " >&6; }
11760              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11761              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11762$as_echo "$BOOT_JDK_VERSION" >&6; }
11763            fi # end check jdk version
11764          fi # end check rt.jar
11765        fi # end check javac
11766      fi # end check java
11767    fi # end check boot jdk found
11768  fi
11769
11770
11771  # Test: Is $JAVA_HOME set?
11772
11773  if test "x$BOOT_JDK_FOUND" = xno; then
11774    # Now execute the test
11775
11776  if test "x$JAVA_HOME" != x; then
11777    JAVA_HOME_PROCESSED="$JAVA_HOME"
11778
11779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11780
11781  # Input might be given as Windows format, start by converting to
11782  # unix format.
11783  path="$JAVA_HOME_PROCESSED"
11784  new_path=`$CYGPATH -u "$path"`
11785
11786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11789  # "foo.exe" is OK but "foo" is an error.
11790  #
11791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11792  # It is also a way to make sure we got the proper file name for the real test later on.
11793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11794  if test "x$test_shortpath" = x; then
11795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11796$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11797    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11798  fi
11799
11800  # Call helper function which possibly converts this using DOS-style short mode.
11801  # If so, the updated path is stored in $new_path.
11802
11803  input_path="$new_path"
11804  # Check if we need to convert this using DOS-style short mode. If the path
11805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11806  # take no chances and rewrite it.
11807  # Note: m4 eats our [], so we need to use [ and ] instead.
11808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11809  if test "x$has_forbidden_chars" != x; then
11810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11814      # Going to short mode and back again did indeed matter. Since short mode is
11815      # case insensitive, let's make it lowercase to improve readability.
11816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11817      # Now convert it back to Unix-stile (cygpath)
11818      input_path=`$CYGPATH -u "$shortmode_path"`
11819      new_path="$input_path"
11820    fi
11821  fi
11822
11823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11824  if test "x$test_cygdrive_prefix" = x; then
11825    # As a simple fix, exclude /usr/bin since it's not a real path.
11826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11828      # a path prefixed by /cygdrive for fixpath to work.
11829      new_path="$CYGWIN_ROOT_PATH$input_path"
11830    fi
11831  fi
11832
11833
11834  if test "x$path" != "x$new_path"; then
11835    JAVA_HOME_PROCESSED="$new_path"
11836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11837$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11838  fi
11839
11840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11841
11842  path="$JAVA_HOME_PROCESSED"
11843  has_colon=`$ECHO $path | $GREP ^.:`
11844  new_path="$path"
11845  if test "x$has_colon" = x; then
11846    # Not in mixed or Windows style, start by that.
11847    new_path=`cmd //c echo $path`
11848  fi
11849
11850
11851  input_path="$new_path"
11852  # Check if we need to convert this using DOS-style short mode. If the path
11853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854  # take no chances and rewrite it.
11855  # Note: m4 eats our [], so we need to use [ and ] instead.
11856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11857  if test "x$has_forbidden_chars" != x; then
11858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11860  fi
11861
11862
11863  windows_path="$new_path"
11864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11865    unix_path=`$CYGPATH -u "$windows_path"`
11866    new_path="$unix_path"
11867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11869    new_path="$unix_path"
11870  fi
11871
11872  if test "x$path" != "x$new_path"; then
11873    JAVA_HOME_PROCESSED="$new_path"
11874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11875$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11876  fi
11877
11878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11880
11881  else
11882    # We're on a posix platform. Hooray! :)
11883    path="$JAVA_HOME_PROCESSED"
11884    has_space=`$ECHO "$path" | $GREP " "`
11885    if test "x$has_space" != x; then
11886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11887$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11888      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11889    fi
11890
11891    # Use eval to expand a potential ~
11892    eval path="$path"
11893    if test ! -f "$path" && test ! -d "$path"; then
11894      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11895    fi
11896
11897    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11898  fi
11899
11900    if test ! -d "$JAVA_HOME_PROCESSED"; then
11901      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11902$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11903    else
11904      # Aha, the user has set a JAVA_HOME
11905      # let us use that as the Boot JDK.
11906      BOOT_JDK="$JAVA_HOME_PROCESSED"
11907      BOOT_JDK_FOUND=maybe
11908      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11909$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11910    fi
11911  fi
11912
11913
11914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11916      # Do we have a bin/java?
11917      if test ! -x "$BOOT_JDK/bin/java"; then
11918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11920        BOOT_JDK_FOUND=no
11921      else
11922        # Do we have a bin/javac?
11923        if test ! -x "$BOOT_JDK/bin/javac"; then
11924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11928          BOOT_JDK_FOUND=no
11929        else
11930          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11931          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11932            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11934            BOOT_JDK_FOUND=no
11935          else
11936            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11938
11939            # Extra M4 quote needed to protect [] in grep expression.
11940            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11941            if test "x$FOUND_VERSION_78" = x; then
11942              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11944              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11945$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11946              BOOT_JDK_FOUND=no
11947            else
11948              # We're done! :-)
11949              BOOT_JDK_FOUND=yes
11950
11951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11952
11953  # Input might be given as Windows format, start by converting to
11954  # unix format.
11955  path="$BOOT_JDK"
11956  new_path=`$CYGPATH -u "$path"`
11957
11958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11961  # "foo.exe" is OK but "foo" is an error.
11962  #
11963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11964  # It is also a way to make sure we got the proper file name for the real test later on.
11965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11966  if test "x$test_shortpath" = x; then
11967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11969    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11970  fi
11971
11972  # Call helper function which possibly converts this using DOS-style short mode.
11973  # If so, the updated path is stored in $new_path.
11974
11975  input_path="$new_path"
11976  # Check if we need to convert this using DOS-style short mode. If the path
11977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11978  # take no chances and rewrite it.
11979  # Note: m4 eats our [], so we need to use [ and ] instead.
11980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11981  if test "x$has_forbidden_chars" != x; then
11982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11986      # Going to short mode and back again did indeed matter. Since short mode is
11987      # case insensitive, let's make it lowercase to improve readability.
11988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11989      # Now convert it back to Unix-stile (cygpath)
11990      input_path=`$CYGPATH -u "$shortmode_path"`
11991      new_path="$input_path"
11992    fi
11993  fi
11994
11995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11996  if test "x$test_cygdrive_prefix" = x; then
11997    # As a simple fix, exclude /usr/bin since it's not a real path.
11998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12000      # a path prefixed by /cygdrive for fixpath to work.
12001      new_path="$CYGWIN_ROOT_PATH$input_path"
12002    fi
12003  fi
12004
12005
12006  if test "x$path" != "x$new_path"; then
12007    BOOT_JDK="$new_path"
12008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12010  fi
12011
12012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12013
12014  path="$BOOT_JDK"
12015  has_colon=`$ECHO $path | $GREP ^.:`
12016  new_path="$path"
12017  if test "x$has_colon" = x; then
12018    # Not in mixed or Windows style, start by that.
12019    new_path=`cmd //c echo $path`
12020  fi
12021
12022
12023  input_path="$new_path"
12024  # Check if we need to convert this using DOS-style short mode. If the path
12025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12026  # take no chances and rewrite it.
12027  # Note: m4 eats our [], so we need to use [ and ] instead.
12028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12029  if test "x$has_forbidden_chars" != x; then
12030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12032  fi
12033
12034
12035  windows_path="$new_path"
12036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12037    unix_path=`$CYGPATH -u "$windows_path"`
12038    new_path="$unix_path"
12039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12041    new_path="$unix_path"
12042  fi
12043
12044  if test "x$path" != "x$new_path"; then
12045    BOOT_JDK="$new_path"
12046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12048  fi
12049
12050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12052
12053  else
12054    # We're on a posix platform. Hooray! :)
12055    path="$BOOT_JDK"
12056    has_space=`$ECHO "$path" | $GREP " "`
12057    if test "x$has_space" != x; then
12058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12061    fi
12062
12063    # Use eval to expand a potential ~
12064    eval path="$path"
12065    if test ! -f "$path" && test ! -d "$path"; then
12066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12067    fi
12068
12069    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12070  fi
12071
12072              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12073$as_echo_n "checking for Boot JDK... " >&6; }
12074              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12075$as_echo "$BOOT_JDK" >&6; }
12076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12077$as_echo_n "checking Boot JDK version... " >&6; }
12078              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12080$as_echo "$BOOT_JDK_VERSION" >&6; }
12081            fi # end check jdk version
12082          fi # end check rt.jar
12083        fi # end check javac
12084      fi # end check java
12085    fi # end check boot jdk found
12086  fi
12087
12088
12089  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12090
12091  if test "x$BOOT_JDK_FOUND" = xno; then
12092    # Now execute the test
12093
12094  if test -x /usr/libexec/java_home; then
12095    BOOT_JDK=`/usr/libexec/java_home`
12096    BOOT_JDK_FOUND=maybe
12097    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12098$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12099  fi
12100
12101
12102    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12103    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12104      # Do we have a bin/java?
12105      if test ! -x "$BOOT_JDK/bin/java"; then
12106        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12108        BOOT_JDK_FOUND=no
12109      else
12110        # Do we have a bin/javac?
12111        if test ! -x "$BOOT_JDK/bin/javac"; then
12112          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12114          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12115$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12116          BOOT_JDK_FOUND=no
12117        else
12118          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12119          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12120            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12122            BOOT_JDK_FOUND=no
12123          else
12124            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12126
12127            # Extra M4 quote needed to protect [] in grep expression.
12128            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12129            if test "x$FOUND_VERSION_78" = x; then
12130              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12132              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12133$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12134              BOOT_JDK_FOUND=no
12135            else
12136              # We're done! :-)
12137              BOOT_JDK_FOUND=yes
12138
12139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12140
12141  # Input might be given as Windows format, start by converting to
12142  # unix format.
12143  path="$BOOT_JDK"
12144  new_path=`$CYGPATH -u "$path"`
12145
12146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12149  # "foo.exe" is OK but "foo" is an error.
12150  #
12151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12152  # It is also a way to make sure we got the proper file name for the real test later on.
12153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12154  if test "x$test_shortpath" = x; then
12155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12158  fi
12159
12160  # Call helper function which possibly converts this using DOS-style short mode.
12161  # If so, the updated path is stored in $new_path.
12162
12163  input_path="$new_path"
12164  # Check if we need to convert this using DOS-style short mode. If the path
12165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12166  # take no chances and rewrite it.
12167  # Note: m4 eats our [], so we need to use [ and ] instead.
12168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12169  if test "x$has_forbidden_chars" != x; then
12170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12174      # Going to short mode and back again did indeed matter. Since short mode is
12175      # case insensitive, let's make it lowercase to improve readability.
12176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12177      # Now convert it back to Unix-stile (cygpath)
12178      input_path=`$CYGPATH -u "$shortmode_path"`
12179      new_path="$input_path"
12180    fi
12181  fi
12182
12183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12184  if test "x$test_cygdrive_prefix" = x; then
12185    # As a simple fix, exclude /usr/bin since it's not a real path.
12186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12188      # a path prefixed by /cygdrive for fixpath to work.
12189      new_path="$CYGWIN_ROOT_PATH$input_path"
12190    fi
12191  fi
12192
12193
12194  if test "x$path" != "x$new_path"; then
12195    BOOT_JDK="$new_path"
12196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12198  fi
12199
12200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12201
12202  path="$BOOT_JDK"
12203  has_colon=`$ECHO $path | $GREP ^.:`
12204  new_path="$path"
12205  if test "x$has_colon" = x; then
12206    # Not in mixed or Windows style, start by that.
12207    new_path=`cmd //c echo $path`
12208  fi
12209
12210
12211  input_path="$new_path"
12212  # Check if we need to convert this using DOS-style short mode. If the path
12213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12214  # take no chances and rewrite it.
12215  # Note: m4 eats our [], so we need to use [ and ] instead.
12216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12217  if test "x$has_forbidden_chars" != x; then
12218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12220  fi
12221
12222
12223  windows_path="$new_path"
12224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12225    unix_path=`$CYGPATH -u "$windows_path"`
12226    new_path="$unix_path"
12227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12229    new_path="$unix_path"
12230  fi
12231
12232  if test "x$path" != "x$new_path"; then
12233    BOOT_JDK="$new_path"
12234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12236  fi
12237
12238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12240
12241  else
12242    # We're on a posix platform. Hooray! :)
12243    path="$BOOT_JDK"
12244    has_space=`$ECHO "$path" | $GREP " "`
12245    if test "x$has_space" != x; then
12246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12248      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12249    fi
12250
12251    # Use eval to expand a potential ~
12252    eval path="$path"
12253    if test ! -f "$path" && test ! -d "$path"; then
12254      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12255    fi
12256
12257    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12258  fi
12259
12260              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12261$as_echo_n "checking for Boot JDK... " >&6; }
12262              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12263$as_echo "$BOOT_JDK" >&6; }
12264              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12265$as_echo_n "checking Boot JDK version... " >&6; }
12266              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12267              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12268$as_echo "$BOOT_JDK_VERSION" >&6; }
12269            fi # end check jdk version
12270          fi # end check rt.jar
12271        fi # end check javac
12272      fi # end check java
12273    fi # end check boot jdk found
12274  fi
12275
12276
12277  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12278
12279  if test "x$BOOT_JDK_FOUND" = xno; then
12280    # Now execute the test
12281
12282  # Extract the first word of "javac", so it can be a program name with args.
12283set dummy javac; ac_word=$2
12284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12285$as_echo_n "checking for $ac_word... " >&6; }
12286if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12287  $as_echo_n "(cached) " >&6
12288else
12289  case $JAVAC_CHECK in
12290  [\\/]* | ?:[\\/]*)
12291  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12292  ;;
12293  *)
12294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12295for as_dir in $PATH
12296do
12297  IFS=$as_save_IFS
12298  test -z "$as_dir" && as_dir=.
12299    for ac_exec_ext in '' $ac_executable_extensions; do
12300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12301    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12303    break 2
12304  fi
12305done
12306  done
12307IFS=$as_save_IFS
12308
12309  ;;
12310esac
12311fi
12312JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12313if test -n "$JAVAC_CHECK"; then
12314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12315$as_echo "$JAVAC_CHECK" >&6; }
12316else
12317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12318$as_echo "no" >&6; }
12319fi
12320
12321
12322  # Extract the first word of "java", so it can be a program name with args.
12323set dummy java; ac_word=$2
12324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12325$as_echo_n "checking for $ac_word... " >&6; }
12326if ${ac_cv_path_JAVA_CHECK+:} false; then :
12327  $as_echo_n "(cached) " >&6
12328else
12329  case $JAVA_CHECK in
12330  [\\/]* | ?:[\\/]*)
12331  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12332  ;;
12333  *)
12334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12335for as_dir in $PATH
12336do
12337  IFS=$as_save_IFS
12338  test -z "$as_dir" && as_dir=.
12339    for ac_exec_ext in '' $ac_executable_extensions; do
12340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12341    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12343    break 2
12344  fi
12345done
12346  done
12347IFS=$as_save_IFS
12348
12349  ;;
12350esac
12351fi
12352JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12353if test -n "$JAVA_CHECK"; then
12354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12355$as_echo "$JAVA_CHECK" >&6; }
12356else
12357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12358$as_echo "no" >&6; }
12359fi
12360
12361
12362  BINARY="$JAVAC_CHECK"
12363  if test "x$JAVAC_CHECK" = x; then
12364    BINARY="$JAVA_CHECK"
12365  fi
12366  if test "x$BINARY" != x; then
12367    # So there is a java(c) binary, it might be part of a JDK.
12368    # Lets find the JDK/JRE directory by following symbolic links.
12369    # Linux/GNU systems often have links from /usr/bin/java to
12370    # /etc/alternatives/java to the real JDK binary.
12371
12372  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12373    # Follow a chain of symbolic links. Use readlink
12374    # where it exists, else fall back to horribly
12375    # complicated shell code.
12376    if test "x$READLINK_TESTED" != yes; then
12377      # On MacOSX there is a readlink tool with a different
12378      # purpose than the GNU readlink tool. Check the found readlink.
12379      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12380      if test "x$ISGNU" = x; then
12381        # A readlink that we do not know how to use.
12382        # Are there other non-GNU readlinks out there?
12383        READLINK_TESTED=yes
12384        READLINK=
12385      fi
12386    fi
12387
12388    if test "x$READLINK" != x; then
12389      BINARY=`$READLINK -f $BINARY`
12390    else
12391      # Save the current directory for restoring afterwards
12392      STARTDIR=$PWD
12393      COUNTER=0
12394      sym_link_dir=`$DIRNAME $BINARY`
12395      sym_link_file=`$BASENAME $BINARY`
12396      cd $sym_link_dir
12397      # Use -P flag to resolve symlinks in directories.
12398      cd `$THEPWDCMD -P`
12399      sym_link_dir=`$THEPWDCMD -P`
12400      # Resolve file symlinks
12401      while test $COUNTER -lt 20; do
12402        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12403        if test "x$ISLINK" == x; then
12404          # This is not a symbolic link! We are done!
12405          break
12406        fi
12407        # Again resolve directory symlinks since the target of the just found
12408        # link could be in a different directory
12409        cd `$DIRNAME $ISLINK`
12410        sym_link_dir=`$THEPWDCMD -P`
12411        sym_link_file=`$BASENAME $ISLINK`
12412        let COUNTER=COUNTER+1
12413      done
12414      cd $STARTDIR
12415      BINARY=$sym_link_dir/$sym_link_file
12416    fi
12417  fi
12418
12419    BOOT_JDK=`dirname "$BINARY"`
12420    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12421    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12422      # Looks like we found ourselves an JDK
12423      BOOT_JDK_FOUND=maybe
12424      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12425$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12426    fi
12427  fi
12428
12429
12430    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12431    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12432      # Do we have a bin/java?
12433      if test ! -x "$BOOT_JDK/bin/java"; then
12434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12436        BOOT_JDK_FOUND=no
12437      else
12438        # Do we have a bin/javac?
12439        if test ! -x "$BOOT_JDK/bin/javac"; then
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12442          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12443$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12444          BOOT_JDK_FOUND=no
12445        else
12446          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12447          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12448            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12450            BOOT_JDK_FOUND=no
12451          else
12452            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12453            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12454
12455            # Extra M4 quote needed to protect [] in grep expression.
12456            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12457            if test "x$FOUND_VERSION_78" = x; then
12458              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12460              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12461$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12462              BOOT_JDK_FOUND=no
12463            else
12464              # We're done! :-)
12465              BOOT_JDK_FOUND=yes
12466
12467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12468
12469  # Input might be given as Windows format, start by converting to
12470  # unix format.
12471  path="$BOOT_JDK"
12472  new_path=`$CYGPATH -u "$path"`
12473
12474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12477  # "foo.exe" is OK but "foo" is an error.
12478  #
12479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12480  # It is also a way to make sure we got the proper file name for the real test later on.
12481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12482  if test "x$test_shortpath" = x; then
12483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12485    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12486  fi
12487
12488  # Call helper function which possibly converts this using DOS-style short mode.
12489  # If so, the updated path is stored in $new_path.
12490
12491  input_path="$new_path"
12492  # Check if we need to convert this using DOS-style short mode. If the path
12493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12494  # take no chances and rewrite it.
12495  # Note: m4 eats our [], so we need to use [ and ] instead.
12496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12497  if test "x$has_forbidden_chars" != x; then
12498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12502      # Going to short mode and back again did indeed matter. Since short mode is
12503      # case insensitive, let's make it lowercase to improve readability.
12504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12505      # Now convert it back to Unix-stile (cygpath)
12506      input_path=`$CYGPATH -u "$shortmode_path"`
12507      new_path="$input_path"
12508    fi
12509  fi
12510
12511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12512  if test "x$test_cygdrive_prefix" = x; then
12513    # As a simple fix, exclude /usr/bin since it's not a real path.
12514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12516      # a path prefixed by /cygdrive for fixpath to work.
12517      new_path="$CYGWIN_ROOT_PATH$input_path"
12518    fi
12519  fi
12520
12521
12522  if test "x$path" != "x$new_path"; then
12523    BOOT_JDK="$new_path"
12524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12526  fi
12527
12528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12529
12530  path="$BOOT_JDK"
12531  has_colon=`$ECHO $path | $GREP ^.:`
12532  new_path="$path"
12533  if test "x$has_colon" = x; then
12534    # Not in mixed or Windows style, start by that.
12535    new_path=`cmd //c echo $path`
12536  fi
12537
12538
12539  input_path="$new_path"
12540  # Check if we need to convert this using DOS-style short mode. If the path
12541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12542  # take no chances and rewrite it.
12543  # Note: m4 eats our [], so we need to use [ and ] instead.
12544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12545  if test "x$has_forbidden_chars" != x; then
12546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12548  fi
12549
12550
12551  windows_path="$new_path"
12552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12553    unix_path=`$CYGPATH -u "$windows_path"`
12554    new_path="$unix_path"
12555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12557    new_path="$unix_path"
12558  fi
12559
12560  if test "x$path" != "x$new_path"; then
12561    BOOT_JDK="$new_path"
12562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12564  fi
12565
12566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12568
12569  else
12570    # We're on a posix platform. Hooray! :)
12571    path="$BOOT_JDK"
12572    has_space=`$ECHO "$path" | $GREP " "`
12573    if test "x$has_space" != x; then
12574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12576      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12577    fi
12578
12579    # Use eval to expand a potential ~
12580    eval path="$path"
12581    if test ! -f "$path" && test ! -d "$path"; then
12582      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12583    fi
12584
12585    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12586  fi
12587
12588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12589$as_echo_n "checking for Boot JDK... " >&6; }
12590              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12591$as_echo "$BOOT_JDK" >&6; }
12592              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12593$as_echo_n "checking Boot JDK version... " >&6; }
12594              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12595              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12596$as_echo "$BOOT_JDK_VERSION" >&6; }
12597            fi # end check jdk version
12598          fi # end check rt.jar
12599        fi # end check javac
12600      fi # end check java
12601    fi # end check boot jdk found
12602  fi
12603
12604
12605  # Test: Is there a JDK installed in default, well-known locations?
12606
12607  if test "x$BOOT_JDK_FOUND" = xno; then
12608    # Now execute the test
12609
12610  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12611
12612  if test "x$BOOT_JDK_FOUND" = xno; then
12613    # Now execute the test
12614
12615  if test "x$ProgramW6432" != x; then
12616    VIRTUAL_DIR="$ProgramW6432/Java"
12617
12618  windows_path="$VIRTUAL_DIR"
12619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12620    unix_path=`$CYGPATH -u "$windows_path"`
12621    VIRTUAL_DIR="$unix_path"
12622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12624    VIRTUAL_DIR="$unix_path"
12625  fi
12626
12627
12628  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12629  BOOT_JDK_SUFFIX=""
12630  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12631  if test "x$ALL_JDKS_FOUND" != x; then
12632    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12633
12634  if test "x$BOOT_JDK_FOUND" = xno; then
12635    # Now execute the test
12636
12637        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12638        if test -d "$BOOT_JDK"; then
12639          BOOT_JDK_FOUND=maybe
12640          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12641$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12642        fi
12643
12644
12645    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12646    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12647      # Do we have a bin/java?
12648      if test ! -x "$BOOT_JDK/bin/java"; then
12649        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12651        BOOT_JDK_FOUND=no
12652      else
12653        # Do we have a bin/javac?
12654        if test ! -x "$BOOT_JDK/bin/javac"; then
12655          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12657          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12658$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12659          BOOT_JDK_FOUND=no
12660        else
12661          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12662          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12665            BOOT_JDK_FOUND=no
12666          else
12667            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12669
12670            # Extra M4 quote needed to protect [] in grep expression.
12671            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12672            if test "x$FOUND_VERSION_78" = x; then
12673              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12675              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12676$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12677              BOOT_JDK_FOUND=no
12678            else
12679              # We're done! :-)
12680              BOOT_JDK_FOUND=yes
12681
12682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12683
12684  # Input might be given as Windows format, start by converting to
12685  # unix format.
12686  path="$BOOT_JDK"
12687  new_path=`$CYGPATH -u "$path"`
12688
12689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12692  # "foo.exe" is OK but "foo" is an error.
12693  #
12694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12695  # It is also a way to make sure we got the proper file name for the real test later on.
12696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12697  if test "x$test_shortpath" = x; then
12698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12701  fi
12702
12703  # Call helper function which possibly converts this using DOS-style short mode.
12704  # If so, the updated path is stored in $new_path.
12705
12706  input_path="$new_path"
12707  # Check if we need to convert this using DOS-style short mode. If the path
12708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12709  # take no chances and rewrite it.
12710  # Note: m4 eats our [], so we need to use [ and ] instead.
12711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12712  if test "x$has_forbidden_chars" != x; then
12713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12717      # Going to short mode and back again did indeed matter. Since short mode is
12718      # case insensitive, let's make it lowercase to improve readability.
12719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12720      # Now convert it back to Unix-stile (cygpath)
12721      input_path=`$CYGPATH -u "$shortmode_path"`
12722      new_path="$input_path"
12723    fi
12724  fi
12725
12726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12727  if test "x$test_cygdrive_prefix" = x; then
12728    # As a simple fix, exclude /usr/bin since it's not a real path.
12729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12731      # a path prefixed by /cygdrive for fixpath to work.
12732      new_path="$CYGWIN_ROOT_PATH$input_path"
12733    fi
12734  fi
12735
12736
12737  if test "x$path" != "x$new_path"; then
12738    BOOT_JDK="$new_path"
12739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12741  fi
12742
12743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12744
12745  path="$BOOT_JDK"
12746  has_colon=`$ECHO $path | $GREP ^.:`
12747  new_path="$path"
12748  if test "x$has_colon" = x; then
12749    # Not in mixed or Windows style, start by that.
12750    new_path=`cmd //c echo $path`
12751  fi
12752
12753
12754  input_path="$new_path"
12755  # Check if we need to convert this using DOS-style short mode. If the path
12756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12757  # take no chances and rewrite it.
12758  # Note: m4 eats our [], so we need to use [ and ] instead.
12759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12760  if test "x$has_forbidden_chars" != x; then
12761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12763  fi
12764
12765
12766  windows_path="$new_path"
12767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12768    unix_path=`$CYGPATH -u "$windows_path"`
12769    new_path="$unix_path"
12770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12772    new_path="$unix_path"
12773  fi
12774
12775  if test "x$path" != "x$new_path"; then
12776    BOOT_JDK="$new_path"
12777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12779  fi
12780
12781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12783
12784  else
12785    # We're on a posix platform. Hooray! :)
12786    path="$BOOT_JDK"
12787    has_space=`$ECHO "$path" | $GREP " "`
12788    if test "x$has_space" != x; then
12789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12791      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12792    fi
12793
12794    # Use eval to expand a potential ~
12795    eval path="$path"
12796    if test ! -f "$path" && test ! -d "$path"; then
12797      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12798    fi
12799
12800    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12801  fi
12802
12803              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12804$as_echo_n "checking for Boot JDK... " >&6; }
12805              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12806$as_echo "$BOOT_JDK" >&6; }
12807              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12808$as_echo_n "checking Boot JDK version... " >&6; }
12809              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12810              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12811$as_echo "$BOOT_JDK_VERSION" >&6; }
12812            fi # end check jdk version
12813          fi # end check rt.jar
12814        fi # end check javac
12815      fi # end check java
12816    fi # end check boot jdk found
12817  fi
12818
12819    done
12820  fi
12821
12822  fi
12823
12824
12825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12827      # Do we have a bin/java?
12828      if test ! -x "$BOOT_JDK/bin/java"; then
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12831        BOOT_JDK_FOUND=no
12832      else
12833        # Do we have a bin/javac?
12834        if test ! -x "$BOOT_JDK/bin/javac"; then
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12839          BOOT_JDK_FOUND=no
12840        else
12841          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12842          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12843            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12845            BOOT_JDK_FOUND=no
12846          else
12847            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12849
12850            # Extra M4 quote needed to protect [] in grep expression.
12851            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12852            if test "x$FOUND_VERSION_78" = x; then
12853              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12855              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12856$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12857              BOOT_JDK_FOUND=no
12858            else
12859              # We're done! :-)
12860              BOOT_JDK_FOUND=yes
12861
12862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12863
12864  # Input might be given as Windows format, start by converting to
12865  # unix format.
12866  path="$BOOT_JDK"
12867  new_path=`$CYGPATH -u "$path"`
12868
12869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12872  # "foo.exe" is OK but "foo" is an error.
12873  #
12874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12875  # It is also a way to make sure we got the proper file name for the real test later on.
12876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12877  if test "x$test_shortpath" = x; then
12878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12880    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12881  fi
12882
12883  # Call helper function which possibly converts this using DOS-style short mode.
12884  # If so, the updated path is stored in $new_path.
12885
12886  input_path="$new_path"
12887  # Check if we need to convert this using DOS-style short mode. If the path
12888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12889  # take no chances and rewrite it.
12890  # Note: m4 eats our [], so we need to use [ and ] instead.
12891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12892  if test "x$has_forbidden_chars" != x; then
12893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12897      # Going to short mode and back again did indeed matter. Since short mode is
12898      # case insensitive, let's make it lowercase to improve readability.
12899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12900      # Now convert it back to Unix-stile (cygpath)
12901      input_path=`$CYGPATH -u "$shortmode_path"`
12902      new_path="$input_path"
12903    fi
12904  fi
12905
12906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12907  if test "x$test_cygdrive_prefix" = x; then
12908    # As a simple fix, exclude /usr/bin since it's not a real path.
12909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12911      # a path prefixed by /cygdrive for fixpath to work.
12912      new_path="$CYGWIN_ROOT_PATH$input_path"
12913    fi
12914  fi
12915
12916
12917  if test "x$path" != "x$new_path"; then
12918    BOOT_JDK="$new_path"
12919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12921  fi
12922
12923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12924
12925  path="$BOOT_JDK"
12926  has_colon=`$ECHO $path | $GREP ^.:`
12927  new_path="$path"
12928  if test "x$has_colon" = x; then
12929    # Not in mixed or Windows style, start by that.
12930    new_path=`cmd //c echo $path`
12931  fi
12932
12933
12934  input_path="$new_path"
12935  # Check if we need to convert this using DOS-style short mode. If the path
12936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12937  # take no chances and rewrite it.
12938  # Note: m4 eats our [], so we need to use [ and ] instead.
12939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12940  if test "x$has_forbidden_chars" != x; then
12941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12943  fi
12944
12945
12946  windows_path="$new_path"
12947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12948    unix_path=`$CYGPATH -u "$windows_path"`
12949    new_path="$unix_path"
12950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12952    new_path="$unix_path"
12953  fi
12954
12955  if test "x$path" != "x$new_path"; then
12956    BOOT_JDK="$new_path"
12957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12959  fi
12960
12961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12963
12964  else
12965    # We're on a posix platform. Hooray! :)
12966    path="$BOOT_JDK"
12967    has_space=`$ECHO "$path" | $GREP " "`
12968    if test "x$has_space" != x; then
12969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12971      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12972    fi
12973
12974    # Use eval to expand a potential ~
12975    eval path="$path"
12976    if test ! -f "$path" && test ! -d "$path"; then
12977      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12978    fi
12979
12980    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12981  fi
12982
12983              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12984$as_echo_n "checking for Boot JDK... " >&6; }
12985              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12986$as_echo "$BOOT_JDK" >&6; }
12987              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12988$as_echo_n "checking Boot JDK version... " >&6; }
12989              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12990              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12991$as_echo "$BOOT_JDK_VERSION" >&6; }
12992            fi # end check jdk version
12993          fi # end check rt.jar
12994        fi # end check javac
12995      fi # end check java
12996    fi # end check boot jdk found
12997  fi
12998
12999
13000  if test "x$BOOT_JDK_FOUND" = xno; then
13001    # Now execute the test
13002
13003  if test "x$PROGRAMW6432" != x; then
13004    VIRTUAL_DIR="$PROGRAMW6432/Java"
13005
13006  windows_path="$VIRTUAL_DIR"
13007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13008    unix_path=`$CYGPATH -u "$windows_path"`
13009    VIRTUAL_DIR="$unix_path"
13010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13012    VIRTUAL_DIR="$unix_path"
13013  fi
13014
13015
13016  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13017  BOOT_JDK_SUFFIX=""
13018  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13019  if test "x$ALL_JDKS_FOUND" != x; then
13020    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13021
13022  if test "x$BOOT_JDK_FOUND" = xno; then
13023    # Now execute the test
13024
13025        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13026        if test -d "$BOOT_JDK"; then
13027          BOOT_JDK_FOUND=maybe
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13029$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13030        fi
13031
13032
13033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13035      # Do we have a bin/java?
13036      if test ! -x "$BOOT_JDK/bin/java"; then
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13039        BOOT_JDK_FOUND=no
13040      else
13041        # Do we have a bin/javac?
13042        if test ! -x "$BOOT_JDK/bin/javac"; then
13043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13047          BOOT_JDK_FOUND=no
13048        else
13049          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13050          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13051            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13053            BOOT_JDK_FOUND=no
13054          else
13055            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13056            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13057
13058            # Extra M4 quote needed to protect [] in grep expression.
13059            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13060            if test "x$FOUND_VERSION_78" = x; then
13061              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13063              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13064$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13065              BOOT_JDK_FOUND=no
13066            else
13067              # We're done! :-)
13068              BOOT_JDK_FOUND=yes
13069
13070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13071
13072  # Input might be given as Windows format, start by converting to
13073  # unix format.
13074  path="$BOOT_JDK"
13075  new_path=`$CYGPATH -u "$path"`
13076
13077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13080  # "foo.exe" is OK but "foo" is an error.
13081  #
13082  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13083  # It is also a way to make sure we got the proper file name for the real test later on.
13084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13085  if test "x$test_shortpath" = x; then
13086    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13088    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13089  fi
13090
13091  # Call helper function which possibly converts this using DOS-style short mode.
13092  # If so, the updated path is stored in $new_path.
13093
13094  input_path="$new_path"
13095  # Check if we need to convert this using DOS-style short mode. If the path
13096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13097  # take no chances and rewrite it.
13098  # Note: m4 eats our [], so we need to use [ and ] instead.
13099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13100  if test "x$has_forbidden_chars" != x; then
13101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13105      # Going to short mode and back again did indeed matter. Since short mode is
13106      # case insensitive, let's make it lowercase to improve readability.
13107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13108      # Now convert it back to Unix-stile (cygpath)
13109      input_path=`$CYGPATH -u "$shortmode_path"`
13110      new_path="$input_path"
13111    fi
13112  fi
13113
13114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13115  if test "x$test_cygdrive_prefix" = x; then
13116    # As a simple fix, exclude /usr/bin since it's not a real path.
13117    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13119      # a path prefixed by /cygdrive for fixpath to work.
13120      new_path="$CYGWIN_ROOT_PATH$input_path"
13121    fi
13122  fi
13123
13124
13125  if test "x$path" != "x$new_path"; then
13126    BOOT_JDK="$new_path"
13127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13129  fi
13130
13131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13132
13133  path="$BOOT_JDK"
13134  has_colon=`$ECHO $path | $GREP ^.:`
13135  new_path="$path"
13136  if test "x$has_colon" = x; then
13137    # Not in mixed or Windows style, start by that.
13138    new_path=`cmd //c echo $path`
13139  fi
13140
13141
13142  input_path="$new_path"
13143  # Check if we need to convert this using DOS-style short mode. If the path
13144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13145  # take no chances and rewrite it.
13146  # Note: m4 eats our [], so we need to use [ and ] instead.
13147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13148  if test "x$has_forbidden_chars" != x; then
13149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13151  fi
13152
13153
13154  windows_path="$new_path"
13155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13156    unix_path=`$CYGPATH -u "$windows_path"`
13157    new_path="$unix_path"
13158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13160    new_path="$unix_path"
13161  fi
13162
13163  if test "x$path" != "x$new_path"; then
13164    BOOT_JDK="$new_path"
13165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13167  fi
13168
13169  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13170  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13171
13172  else
13173    # We're on a posix platform. Hooray! :)
13174    path="$BOOT_JDK"
13175    has_space=`$ECHO "$path" | $GREP " "`
13176    if test "x$has_space" != x; then
13177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13179      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13180    fi
13181
13182    # Use eval to expand a potential ~
13183    eval path="$path"
13184    if test ! -f "$path" && test ! -d "$path"; then
13185      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13186    fi
13187
13188    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13189  fi
13190
13191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13192$as_echo_n "checking for Boot JDK... " >&6; }
13193              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13194$as_echo "$BOOT_JDK" >&6; }
13195              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13196$as_echo_n "checking Boot JDK version... " >&6; }
13197              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13199$as_echo "$BOOT_JDK_VERSION" >&6; }
13200            fi # end check jdk version
13201          fi # end check rt.jar
13202        fi # end check javac
13203      fi # end check java
13204    fi # end check boot jdk found
13205  fi
13206
13207    done
13208  fi
13209
13210  fi
13211
13212
13213    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13214    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13215      # Do we have a bin/java?
13216      if test ! -x "$BOOT_JDK/bin/java"; then
13217        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13219        BOOT_JDK_FOUND=no
13220      else
13221        # Do we have a bin/javac?
13222        if test ! -x "$BOOT_JDK/bin/javac"; then
13223          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13225          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13226$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13227          BOOT_JDK_FOUND=no
13228        else
13229          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13230          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13231            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13233            BOOT_JDK_FOUND=no
13234          else
13235            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13237
13238            # Extra M4 quote needed to protect [] in grep expression.
13239            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13240            if test "x$FOUND_VERSION_78" = x; then
13241              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13243              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13244$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13245              BOOT_JDK_FOUND=no
13246            else
13247              # We're done! :-)
13248              BOOT_JDK_FOUND=yes
13249
13250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13251
13252  # Input might be given as Windows format, start by converting to
13253  # unix format.
13254  path="$BOOT_JDK"
13255  new_path=`$CYGPATH -u "$path"`
13256
13257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13260  # "foo.exe" is OK but "foo" is an error.
13261  #
13262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13263  # It is also a way to make sure we got the proper file name for the real test later on.
13264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13265  if test "x$test_shortpath" = x; then
13266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13268    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13269  fi
13270
13271  # Call helper function which possibly converts this using DOS-style short mode.
13272  # If so, the updated path is stored in $new_path.
13273
13274  input_path="$new_path"
13275  # Check if we need to convert this using DOS-style short mode. If the path
13276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13277  # take no chances and rewrite it.
13278  # Note: m4 eats our [], so we need to use [ and ] instead.
13279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13280  if test "x$has_forbidden_chars" != x; then
13281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13285      # Going to short mode and back again did indeed matter. Since short mode is
13286      # case insensitive, let's make it lowercase to improve readability.
13287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13288      # Now convert it back to Unix-stile (cygpath)
13289      input_path=`$CYGPATH -u "$shortmode_path"`
13290      new_path="$input_path"
13291    fi
13292  fi
13293
13294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13295  if test "x$test_cygdrive_prefix" = x; then
13296    # As a simple fix, exclude /usr/bin since it's not a real path.
13297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13299      # a path prefixed by /cygdrive for fixpath to work.
13300      new_path="$CYGWIN_ROOT_PATH$input_path"
13301    fi
13302  fi
13303
13304
13305  if test "x$path" != "x$new_path"; then
13306    BOOT_JDK="$new_path"
13307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13309  fi
13310
13311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13312
13313  path="$BOOT_JDK"
13314  has_colon=`$ECHO $path | $GREP ^.:`
13315  new_path="$path"
13316  if test "x$has_colon" = x; then
13317    # Not in mixed or Windows style, start by that.
13318    new_path=`cmd //c echo $path`
13319  fi
13320
13321
13322  input_path="$new_path"
13323  # Check if we need to convert this using DOS-style short mode. If the path
13324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13325  # take no chances and rewrite it.
13326  # Note: m4 eats our [], so we need to use [ and ] instead.
13327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13328  if test "x$has_forbidden_chars" != x; then
13329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13331  fi
13332
13333
13334  windows_path="$new_path"
13335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13336    unix_path=`$CYGPATH -u "$windows_path"`
13337    new_path="$unix_path"
13338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13340    new_path="$unix_path"
13341  fi
13342
13343  if test "x$path" != "x$new_path"; then
13344    BOOT_JDK="$new_path"
13345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13347  fi
13348
13349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13351
13352  else
13353    # We're on a posix platform. Hooray! :)
13354    path="$BOOT_JDK"
13355    has_space=`$ECHO "$path" | $GREP " "`
13356    if test "x$has_space" != x; then
13357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13359      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13360    fi
13361
13362    # Use eval to expand a potential ~
13363    eval path="$path"
13364    if test ! -f "$path" && test ! -d "$path"; then
13365      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13366    fi
13367
13368    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13369  fi
13370
13371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13372$as_echo_n "checking for Boot JDK... " >&6; }
13373              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13374$as_echo "$BOOT_JDK" >&6; }
13375              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13376$as_echo_n "checking Boot JDK version... " >&6; }
13377              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13379$as_echo "$BOOT_JDK_VERSION" >&6; }
13380            fi # end check jdk version
13381          fi # end check rt.jar
13382        fi # end check javac
13383      fi # end check java
13384    fi # end check boot jdk found
13385  fi
13386
13387
13388  if test "x$BOOT_JDK_FOUND" = xno; then
13389    # Now execute the test
13390
13391  if test "x$PROGRAMFILES" != x; then
13392    VIRTUAL_DIR="$PROGRAMFILES/Java"
13393
13394  windows_path="$VIRTUAL_DIR"
13395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13396    unix_path=`$CYGPATH -u "$windows_path"`
13397    VIRTUAL_DIR="$unix_path"
13398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13400    VIRTUAL_DIR="$unix_path"
13401  fi
13402
13403
13404  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13405  BOOT_JDK_SUFFIX=""
13406  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13407  if test "x$ALL_JDKS_FOUND" != x; then
13408    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13409
13410  if test "x$BOOT_JDK_FOUND" = xno; then
13411    # Now execute the test
13412
13413        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13414        if test -d "$BOOT_JDK"; then
13415          BOOT_JDK_FOUND=maybe
13416          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13417$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13418        fi
13419
13420
13421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13423      # Do we have a bin/java?
13424      if test ! -x "$BOOT_JDK/bin/java"; then
13425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13427        BOOT_JDK_FOUND=no
13428      else
13429        # Do we have a bin/javac?
13430        if test ! -x "$BOOT_JDK/bin/javac"; then
13431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13435          BOOT_JDK_FOUND=no
13436        else
13437          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13438          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13441            BOOT_JDK_FOUND=no
13442          else
13443            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13445
13446            # Extra M4 quote needed to protect [] in grep expression.
13447            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13448            if test "x$FOUND_VERSION_78" = x; then
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13451              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13452$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13453              BOOT_JDK_FOUND=no
13454            else
13455              # We're done! :-)
13456              BOOT_JDK_FOUND=yes
13457
13458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13459
13460  # Input might be given as Windows format, start by converting to
13461  # unix format.
13462  path="$BOOT_JDK"
13463  new_path=`$CYGPATH -u "$path"`
13464
13465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13468  # "foo.exe" is OK but "foo" is an error.
13469  #
13470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13471  # It is also a way to make sure we got the proper file name for the real test later on.
13472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13473  if test "x$test_shortpath" = x; then
13474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13477  fi
13478
13479  # Call helper function which possibly converts this using DOS-style short mode.
13480  # If so, the updated path is stored in $new_path.
13481
13482  input_path="$new_path"
13483  # Check if we need to convert this using DOS-style short mode. If the path
13484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13485  # take no chances and rewrite it.
13486  # Note: m4 eats our [], so we need to use [ and ] instead.
13487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13488  if test "x$has_forbidden_chars" != x; then
13489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13493      # Going to short mode and back again did indeed matter. Since short mode is
13494      # case insensitive, let's make it lowercase to improve readability.
13495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13496      # Now convert it back to Unix-stile (cygpath)
13497      input_path=`$CYGPATH -u "$shortmode_path"`
13498      new_path="$input_path"
13499    fi
13500  fi
13501
13502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13503  if test "x$test_cygdrive_prefix" = x; then
13504    # As a simple fix, exclude /usr/bin since it's not a real path.
13505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13507      # a path prefixed by /cygdrive for fixpath to work.
13508      new_path="$CYGWIN_ROOT_PATH$input_path"
13509    fi
13510  fi
13511
13512
13513  if test "x$path" != "x$new_path"; then
13514    BOOT_JDK="$new_path"
13515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13517  fi
13518
13519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13520
13521  path="$BOOT_JDK"
13522  has_colon=`$ECHO $path | $GREP ^.:`
13523  new_path="$path"
13524  if test "x$has_colon" = x; then
13525    # Not in mixed or Windows style, start by that.
13526    new_path=`cmd //c echo $path`
13527  fi
13528
13529
13530  input_path="$new_path"
13531  # Check if we need to convert this using DOS-style short mode. If the path
13532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13533  # take no chances and rewrite it.
13534  # Note: m4 eats our [], so we need to use [ and ] instead.
13535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13536  if test "x$has_forbidden_chars" != x; then
13537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13539  fi
13540
13541
13542  windows_path="$new_path"
13543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13544    unix_path=`$CYGPATH -u "$windows_path"`
13545    new_path="$unix_path"
13546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13548    new_path="$unix_path"
13549  fi
13550
13551  if test "x$path" != "x$new_path"; then
13552    BOOT_JDK="$new_path"
13553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13555  fi
13556
13557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13559
13560  else
13561    # We're on a posix platform. Hooray! :)
13562    path="$BOOT_JDK"
13563    has_space=`$ECHO "$path" | $GREP " "`
13564    if test "x$has_space" != x; then
13565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13567      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13568    fi
13569
13570    # Use eval to expand a potential ~
13571    eval path="$path"
13572    if test ! -f "$path" && test ! -d "$path"; then
13573      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13574    fi
13575
13576    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13577  fi
13578
13579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13580$as_echo_n "checking for Boot JDK... " >&6; }
13581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13582$as_echo "$BOOT_JDK" >&6; }
13583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13584$as_echo_n "checking Boot JDK version... " >&6; }
13585              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13587$as_echo "$BOOT_JDK_VERSION" >&6; }
13588            fi # end check jdk version
13589          fi # end check rt.jar
13590        fi # end check javac
13591      fi # end check java
13592    fi # end check boot jdk found
13593  fi
13594
13595    done
13596  fi
13597
13598  fi
13599
13600
13601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13603      # Do we have a bin/java?
13604      if test ! -x "$BOOT_JDK/bin/java"; then
13605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13607        BOOT_JDK_FOUND=no
13608      else
13609        # Do we have a bin/javac?
13610        if test ! -x "$BOOT_JDK/bin/javac"; then
13611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13615          BOOT_JDK_FOUND=no
13616        else
13617          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13618          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13619            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13621            BOOT_JDK_FOUND=no
13622          else
13623            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13624            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13625
13626            # Extra M4 quote needed to protect [] in grep expression.
13627            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13628            if test "x$FOUND_VERSION_78" = x; then
13629              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13631              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13632$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13633              BOOT_JDK_FOUND=no
13634            else
13635              # We're done! :-)
13636              BOOT_JDK_FOUND=yes
13637
13638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13639
13640  # Input might be given as Windows format, start by converting to
13641  # unix format.
13642  path="$BOOT_JDK"
13643  new_path=`$CYGPATH -u "$path"`
13644
13645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13648  # "foo.exe" is OK but "foo" is an error.
13649  #
13650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13651  # It is also a way to make sure we got the proper file name for the real test later on.
13652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13653  if test "x$test_shortpath" = x; then
13654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13656    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13657  fi
13658
13659  # Call helper function which possibly converts this using DOS-style short mode.
13660  # If so, the updated path is stored in $new_path.
13661
13662  input_path="$new_path"
13663  # Check if we need to convert this using DOS-style short mode. If the path
13664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13665  # take no chances and rewrite it.
13666  # Note: m4 eats our [], so we need to use [ and ] instead.
13667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13668  if test "x$has_forbidden_chars" != x; then
13669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13673      # Going to short mode and back again did indeed matter. Since short mode is
13674      # case insensitive, let's make it lowercase to improve readability.
13675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13676      # Now convert it back to Unix-stile (cygpath)
13677      input_path=`$CYGPATH -u "$shortmode_path"`
13678      new_path="$input_path"
13679    fi
13680  fi
13681
13682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13683  if test "x$test_cygdrive_prefix" = x; then
13684    # As a simple fix, exclude /usr/bin since it's not a real path.
13685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13687      # a path prefixed by /cygdrive for fixpath to work.
13688      new_path="$CYGWIN_ROOT_PATH$input_path"
13689    fi
13690  fi
13691
13692
13693  if test "x$path" != "x$new_path"; then
13694    BOOT_JDK="$new_path"
13695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13697  fi
13698
13699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13700
13701  path="$BOOT_JDK"
13702  has_colon=`$ECHO $path | $GREP ^.:`
13703  new_path="$path"
13704  if test "x$has_colon" = x; then
13705    # Not in mixed or Windows style, start by that.
13706    new_path=`cmd //c echo $path`
13707  fi
13708
13709
13710  input_path="$new_path"
13711  # Check if we need to convert this using DOS-style short mode. If the path
13712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13713  # take no chances and rewrite it.
13714  # Note: m4 eats our [], so we need to use [ and ] instead.
13715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13716  if test "x$has_forbidden_chars" != x; then
13717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13719  fi
13720
13721
13722  windows_path="$new_path"
13723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13724    unix_path=`$CYGPATH -u "$windows_path"`
13725    new_path="$unix_path"
13726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13728    new_path="$unix_path"
13729  fi
13730
13731  if test "x$path" != "x$new_path"; then
13732    BOOT_JDK="$new_path"
13733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13735  fi
13736
13737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13739
13740  else
13741    # We're on a posix platform. Hooray! :)
13742    path="$BOOT_JDK"
13743    has_space=`$ECHO "$path" | $GREP " "`
13744    if test "x$has_space" != x; then
13745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13747      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13748    fi
13749
13750    # Use eval to expand a potential ~
13751    eval path="$path"
13752    if test ! -f "$path" && test ! -d "$path"; then
13753      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13754    fi
13755
13756    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13757  fi
13758
13759              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13760$as_echo_n "checking for Boot JDK... " >&6; }
13761              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13762$as_echo "$BOOT_JDK" >&6; }
13763              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13764$as_echo_n "checking Boot JDK version... " >&6; }
13765              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13766              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13767$as_echo "$BOOT_JDK_VERSION" >&6; }
13768            fi # end check jdk version
13769          fi # end check rt.jar
13770        fi # end check javac
13771      fi # end check java
13772    fi # end check boot jdk found
13773  fi
13774
13775
13776  if test "x$BOOT_JDK_FOUND" = xno; then
13777    # Now execute the test
13778
13779  if test "x$ProgramFiles" != x; then
13780    VIRTUAL_DIR="$ProgramFiles/Java"
13781
13782  windows_path="$VIRTUAL_DIR"
13783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13784    unix_path=`$CYGPATH -u "$windows_path"`
13785    VIRTUAL_DIR="$unix_path"
13786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13788    VIRTUAL_DIR="$unix_path"
13789  fi
13790
13791
13792  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13793  BOOT_JDK_SUFFIX=""
13794  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13795  if test "x$ALL_JDKS_FOUND" != x; then
13796    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13797
13798  if test "x$BOOT_JDK_FOUND" = xno; then
13799    # Now execute the test
13800
13801        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13802        if test -d "$BOOT_JDK"; then
13803          BOOT_JDK_FOUND=maybe
13804          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13805$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13806        fi
13807
13808
13809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13811      # Do we have a bin/java?
13812      if test ! -x "$BOOT_JDK/bin/java"; then
13813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13815        BOOT_JDK_FOUND=no
13816      else
13817        # Do we have a bin/javac?
13818        if test ! -x "$BOOT_JDK/bin/javac"; then
13819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13823          BOOT_JDK_FOUND=no
13824        else
13825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13829            BOOT_JDK_FOUND=no
13830          else
13831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13833
13834            # Extra M4 quote needed to protect [] in grep expression.
13835            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13836            if test "x$FOUND_VERSION_78" = x; then
13837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13840$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13841              BOOT_JDK_FOUND=no
13842            else
13843              # We're done! :-)
13844              BOOT_JDK_FOUND=yes
13845
13846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13847
13848  # Input might be given as Windows format, start by converting to
13849  # unix format.
13850  path="$BOOT_JDK"
13851  new_path=`$CYGPATH -u "$path"`
13852
13853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13856  # "foo.exe" is OK but "foo" is an error.
13857  #
13858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13859  # It is also a way to make sure we got the proper file name for the real test later on.
13860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13861  if test "x$test_shortpath" = x; then
13862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13865  fi
13866
13867  # Call helper function which possibly converts this using DOS-style short mode.
13868  # If so, the updated path is stored in $new_path.
13869
13870  input_path="$new_path"
13871  # Check if we need to convert this using DOS-style short mode. If the path
13872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13873  # take no chances and rewrite it.
13874  # Note: m4 eats our [], so we need to use [ and ] instead.
13875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13876  if test "x$has_forbidden_chars" != x; then
13877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13881      # Going to short mode and back again did indeed matter. Since short mode is
13882      # case insensitive, let's make it lowercase to improve readability.
13883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13884      # Now convert it back to Unix-stile (cygpath)
13885      input_path=`$CYGPATH -u "$shortmode_path"`
13886      new_path="$input_path"
13887    fi
13888  fi
13889
13890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13891  if test "x$test_cygdrive_prefix" = x; then
13892    # As a simple fix, exclude /usr/bin since it's not a real path.
13893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13895      # a path prefixed by /cygdrive for fixpath to work.
13896      new_path="$CYGWIN_ROOT_PATH$input_path"
13897    fi
13898  fi
13899
13900
13901  if test "x$path" != "x$new_path"; then
13902    BOOT_JDK="$new_path"
13903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13905  fi
13906
13907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13908
13909  path="$BOOT_JDK"
13910  has_colon=`$ECHO $path | $GREP ^.:`
13911  new_path="$path"
13912  if test "x$has_colon" = x; then
13913    # Not in mixed or Windows style, start by that.
13914    new_path=`cmd //c echo $path`
13915  fi
13916
13917
13918  input_path="$new_path"
13919  # Check if we need to convert this using DOS-style short mode. If the path
13920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13921  # take no chances and rewrite it.
13922  # Note: m4 eats our [], so we need to use [ and ] instead.
13923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13924  if test "x$has_forbidden_chars" != x; then
13925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13927  fi
13928
13929
13930  windows_path="$new_path"
13931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13932    unix_path=`$CYGPATH -u "$windows_path"`
13933    new_path="$unix_path"
13934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13936    new_path="$unix_path"
13937  fi
13938
13939  if test "x$path" != "x$new_path"; then
13940    BOOT_JDK="$new_path"
13941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13943  fi
13944
13945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13947
13948  else
13949    # We're on a posix platform. Hooray! :)
13950    path="$BOOT_JDK"
13951    has_space=`$ECHO "$path" | $GREP " "`
13952    if test "x$has_space" != x; then
13953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13955      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13956    fi
13957
13958    # Use eval to expand a potential ~
13959    eval path="$path"
13960    if test ! -f "$path" && test ! -d "$path"; then
13961      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13962    fi
13963
13964    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13965  fi
13966
13967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13968$as_echo_n "checking for Boot JDK... " >&6; }
13969              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13970$as_echo "$BOOT_JDK" >&6; }
13971              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13972$as_echo_n "checking Boot JDK version... " >&6; }
13973              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13975$as_echo "$BOOT_JDK_VERSION" >&6; }
13976            fi # end check jdk version
13977          fi # end check rt.jar
13978        fi # end check javac
13979      fi # end check java
13980    fi # end check boot jdk found
13981  fi
13982
13983    done
13984  fi
13985
13986  fi
13987
13988
13989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13991      # Do we have a bin/java?
13992      if test ! -x "$BOOT_JDK/bin/java"; then
13993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13995        BOOT_JDK_FOUND=no
13996      else
13997        # Do we have a bin/javac?
13998        if test ! -x "$BOOT_JDK/bin/javac"; then
13999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14003          BOOT_JDK_FOUND=no
14004        else
14005          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14006          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14009            BOOT_JDK_FOUND=no
14010          else
14011            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14012            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14013
14014            # Extra M4 quote needed to protect [] in grep expression.
14015            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14016            if test "x$FOUND_VERSION_78" = x; then
14017              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14019              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14020$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14021              BOOT_JDK_FOUND=no
14022            else
14023              # We're done! :-)
14024              BOOT_JDK_FOUND=yes
14025
14026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14027
14028  # Input might be given as Windows format, start by converting to
14029  # unix format.
14030  path="$BOOT_JDK"
14031  new_path=`$CYGPATH -u "$path"`
14032
14033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14036  # "foo.exe" is OK but "foo" is an error.
14037  #
14038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14039  # It is also a way to make sure we got the proper file name for the real test later on.
14040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14041  if test "x$test_shortpath" = x; then
14042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14043$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14044    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14045  fi
14046
14047  # Call helper function which possibly converts this using DOS-style short mode.
14048  # If so, the updated path is stored in $new_path.
14049
14050  input_path="$new_path"
14051  # Check if we need to convert this using DOS-style short mode. If the path
14052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14053  # take no chances and rewrite it.
14054  # Note: m4 eats our [], so we need to use [ and ] instead.
14055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14056  if test "x$has_forbidden_chars" != x; then
14057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14061      # Going to short mode and back again did indeed matter. Since short mode is
14062      # case insensitive, let's make it lowercase to improve readability.
14063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14064      # Now convert it back to Unix-stile (cygpath)
14065      input_path=`$CYGPATH -u "$shortmode_path"`
14066      new_path="$input_path"
14067    fi
14068  fi
14069
14070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14071  if test "x$test_cygdrive_prefix" = x; then
14072    # As a simple fix, exclude /usr/bin since it's not a real path.
14073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14075      # a path prefixed by /cygdrive for fixpath to work.
14076      new_path="$CYGWIN_ROOT_PATH$input_path"
14077    fi
14078  fi
14079
14080
14081  if test "x$path" != "x$new_path"; then
14082    BOOT_JDK="$new_path"
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14084$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14085  fi
14086
14087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14088
14089  path="$BOOT_JDK"
14090  has_colon=`$ECHO $path | $GREP ^.:`
14091  new_path="$path"
14092  if test "x$has_colon" = x; then
14093    # Not in mixed or Windows style, start by that.
14094    new_path=`cmd //c echo $path`
14095  fi
14096
14097
14098  input_path="$new_path"
14099  # Check if we need to convert this using DOS-style short mode. If the path
14100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14101  # take no chances and rewrite it.
14102  # Note: m4 eats our [], so we need to use [ and ] instead.
14103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14104  if test "x$has_forbidden_chars" != x; then
14105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14107  fi
14108
14109
14110  windows_path="$new_path"
14111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14112    unix_path=`$CYGPATH -u "$windows_path"`
14113    new_path="$unix_path"
14114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14116    new_path="$unix_path"
14117  fi
14118
14119  if test "x$path" != "x$new_path"; then
14120    BOOT_JDK="$new_path"
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14123  fi
14124
14125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14127
14128  else
14129    # We're on a posix platform. Hooray! :)
14130    path="$BOOT_JDK"
14131    has_space=`$ECHO "$path" | $GREP " "`
14132    if test "x$has_space" != x; then
14133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14134$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14136    fi
14137
14138    # Use eval to expand a potential ~
14139    eval path="$path"
14140    if test ! -f "$path" && test ! -d "$path"; then
14141      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14142    fi
14143
14144    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14145  fi
14146
14147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14148$as_echo_n "checking for Boot JDK... " >&6; }
14149              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14150$as_echo "$BOOT_JDK" >&6; }
14151              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14152$as_echo_n "checking Boot JDK version... " >&6; }
14153              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14154              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14155$as_echo "$BOOT_JDK_VERSION" >&6; }
14156            fi # end check jdk version
14157          fi # end check rt.jar
14158        fi # end check javac
14159      fi # end check java
14160    fi # end check boot jdk found
14161  fi
14162
14163
14164  if test "x$BOOT_JDK_FOUND" = xno; then
14165    # Now execute the test
14166
14167  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14168  BOOT_JDK_SUFFIX=""
14169  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14170  if test "x$ALL_JDKS_FOUND" != x; then
14171    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14172
14173  if test "x$BOOT_JDK_FOUND" = xno; then
14174    # Now execute the test
14175
14176        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14177        if test -d "$BOOT_JDK"; then
14178          BOOT_JDK_FOUND=maybe
14179          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14180$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14181        fi
14182
14183
14184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14186      # Do we have a bin/java?
14187      if test ! -x "$BOOT_JDK/bin/java"; then
14188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14190        BOOT_JDK_FOUND=no
14191      else
14192        # Do we have a bin/javac?
14193        if test ! -x "$BOOT_JDK/bin/javac"; then
14194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14198          BOOT_JDK_FOUND=no
14199        else
14200          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14201          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14204            BOOT_JDK_FOUND=no
14205          else
14206            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14208
14209            # Extra M4 quote needed to protect [] in grep expression.
14210            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14211            if test "x$FOUND_VERSION_78" = x; then
14212              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14214              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14215$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14216              BOOT_JDK_FOUND=no
14217            else
14218              # We're done! :-)
14219              BOOT_JDK_FOUND=yes
14220
14221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14222
14223  # Input might be given as Windows format, start by converting to
14224  # unix format.
14225  path="$BOOT_JDK"
14226  new_path=`$CYGPATH -u "$path"`
14227
14228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14231  # "foo.exe" is OK but "foo" is an error.
14232  #
14233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14234  # It is also a way to make sure we got the proper file name for the real test later on.
14235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14236  if test "x$test_shortpath" = x; then
14237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14239    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14240  fi
14241
14242  # Call helper function which possibly converts this using DOS-style short mode.
14243  # If so, the updated path is stored in $new_path.
14244
14245  input_path="$new_path"
14246  # Check if we need to convert this using DOS-style short mode. If the path
14247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14248  # take no chances and rewrite it.
14249  # Note: m4 eats our [], so we need to use [ and ] instead.
14250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14251  if test "x$has_forbidden_chars" != x; then
14252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14256      # Going to short mode and back again did indeed matter. Since short mode is
14257      # case insensitive, let's make it lowercase to improve readability.
14258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14259      # Now convert it back to Unix-stile (cygpath)
14260      input_path=`$CYGPATH -u "$shortmode_path"`
14261      new_path="$input_path"
14262    fi
14263  fi
14264
14265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14266  if test "x$test_cygdrive_prefix" = x; then
14267    # As a simple fix, exclude /usr/bin since it's not a real path.
14268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14270      # a path prefixed by /cygdrive for fixpath to work.
14271      new_path="$CYGWIN_ROOT_PATH$input_path"
14272    fi
14273  fi
14274
14275
14276  if test "x$path" != "x$new_path"; then
14277    BOOT_JDK="$new_path"
14278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14280  fi
14281
14282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14283
14284  path="$BOOT_JDK"
14285  has_colon=`$ECHO $path | $GREP ^.:`
14286  new_path="$path"
14287  if test "x$has_colon" = x; then
14288    # Not in mixed or Windows style, start by that.
14289    new_path=`cmd //c echo $path`
14290  fi
14291
14292
14293  input_path="$new_path"
14294  # Check if we need to convert this using DOS-style short mode. If the path
14295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14296  # take no chances and rewrite it.
14297  # Note: m4 eats our [], so we need to use [ and ] instead.
14298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14299  if test "x$has_forbidden_chars" != x; then
14300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14302  fi
14303
14304
14305  windows_path="$new_path"
14306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14307    unix_path=`$CYGPATH -u "$windows_path"`
14308    new_path="$unix_path"
14309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14311    new_path="$unix_path"
14312  fi
14313
14314  if test "x$path" != "x$new_path"; then
14315    BOOT_JDK="$new_path"
14316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14318  fi
14319
14320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14322
14323  else
14324    # We're on a posix platform. Hooray! :)
14325    path="$BOOT_JDK"
14326    has_space=`$ECHO "$path" | $GREP " "`
14327    if test "x$has_space" != x; then
14328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14330      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14331    fi
14332
14333    # Use eval to expand a potential ~
14334    eval path="$path"
14335    if test ! -f "$path" && test ! -d "$path"; then
14336      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14337    fi
14338
14339    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14340  fi
14341
14342              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14343$as_echo_n "checking for Boot JDK... " >&6; }
14344              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14345$as_echo "$BOOT_JDK" >&6; }
14346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14347$as_echo_n "checking Boot JDK version... " >&6; }
14348              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14349              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14350$as_echo "$BOOT_JDK_VERSION" >&6; }
14351            fi # end check jdk version
14352          fi # end check rt.jar
14353        fi # end check javac
14354      fi # end check java
14355    fi # end check boot jdk found
14356  fi
14357
14358    done
14359  fi
14360
14361
14362    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14363    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14364      # Do we have a bin/java?
14365      if test ! -x "$BOOT_JDK/bin/java"; then
14366        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14368        BOOT_JDK_FOUND=no
14369      else
14370        # Do we have a bin/javac?
14371        if test ! -x "$BOOT_JDK/bin/javac"; then
14372          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14374          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14375$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14376          BOOT_JDK_FOUND=no
14377        else
14378          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14379          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14380            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14382            BOOT_JDK_FOUND=no
14383          else
14384            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14385            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14386
14387            # Extra M4 quote needed to protect [] in grep expression.
14388            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14389            if test "x$FOUND_VERSION_78" = x; then
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14392              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14393$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14394              BOOT_JDK_FOUND=no
14395            else
14396              # We're done! :-)
14397              BOOT_JDK_FOUND=yes
14398
14399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14400
14401  # Input might be given as Windows format, start by converting to
14402  # unix format.
14403  path="$BOOT_JDK"
14404  new_path=`$CYGPATH -u "$path"`
14405
14406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14409  # "foo.exe" is OK but "foo" is an error.
14410  #
14411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14412  # It is also a way to make sure we got the proper file name for the real test later on.
14413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14414  if test "x$test_shortpath" = x; then
14415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14417    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14418  fi
14419
14420  # Call helper function which possibly converts this using DOS-style short mode.
14421  # If so, the updated path is stored in $new_path.
14422
14423  input_path="$new_path"
14424  # Check if we need to convert this using DOS-style short mode. If the path
14425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14426  # take no chances and rewrite it.
14427  # Note: m4 eats our [], so we need to use [ and ] instead.
14428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14429  if test "x$has_forbidden_chars" != x; then
14430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14434      # Going to short mode and back again did indeed matter. Since short mode is
14435      # case insensitive, let's make it lowercase to improve readability.
14436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14437      # Now convert it back to Unix-stile (cygpath)
14438      input_path=`$CYGPATH -u "$shortmode_path"`
14439      new_path="$input_path"
14440    fi
14441  fi
14442
14443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14444  if test "x$test_cygdrive_prefix" = x; then
14445    # As a simple fix, exclude /usr/bin since it's not a real path.
14446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14448      # a path prefixed by /cygdrive for fixpath to work.
14449      new_path="$CYGWIN_ROOT_PATH$input_path"
14450    fi
14451  fi
14452
14453
14454  if test "x$path" != "x$new_path"; then
14455    BOOT_JDK="$new_path"
14456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14458  fi
14459
14460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14461
14462  path="$BOOT_JDK"
14463  has_colon=`$ECHO $path | $GREP ^.:`
14464  new_path="$path"
14465  if test "x$has_colon" = x; then
14466    # Not in mixed or Windows style, start by that.
14467    new_path=`cmd //c echo $path`
14468  fi
14469
14470
14471  input_path="$new_path"
14472  # Check if we need to convert this using DOS-style short mode. If the path
14473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14474  # take no chances and rewrite it.
14475  # Note: m4 eats our [], so we need to use [ and ] instead.
14476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14477  if test "x$has_forbidden_chars" != x; then
14478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14480  fi
14481
14482
14483  windows_path="$new_path"
14484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14485    unix_path=`$CYGPATH -u "$windows_path"`
14486    new_path="$unix_path"
14487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14489    new_path="$unix_path"
14490  fi
14491
14492  if test "x$path" != "x$new_path"; then
14493    BOOT_JDK="$new_path"
14494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14496  fi
14497
14498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14500
14501  else
14502    # We're on a posix platform. Hooray! :)
14503    path="$BOOT_JDK"
14504    has_space=`$ECHO "$path" | $GREP " "`
14505    if test "x$has_space" != x; then
14506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14507$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14508      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14509    fi
14510
14511    # Use eval to expand a potential ~
14512    eval path="$path"
14513    if test ! -f "$path" && test ! -d "$path"; then
14514      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14515    fi
14516
14517    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14518  fi
14519
14520              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14521$as_echo_n "checking for Boot JDK... " >&6; }
14522              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14523$as_echo "$BOOT_JDK" >&6; }
14524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14525$as_echo_n "checking Boot JDK version... " >&6; }
14526              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14527              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14528$as_echo "$BOOT_JDK_VERSION" >&6; }
14529            fi # end check jdk version
14530          fi # end check rt.jar
14531        fi # end check javac
14532      fi # end check java
14533    fi # end check boot jdk found
14534  fi
14535
14536  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14537
14538  if test "x$BOOT_JDK_FOUND" = xno; then
14539    # Now execute the test
14540
14541  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14542  BOOT_JDK_SUFFIX="/Contents/Home"
14543  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14544  if test "x$ALL_JDKS_FOUND" != x; then
14545    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14546
14547  if test "x$BOOT_JDK_FOUND" = xno; then
14548    # Now execute the test
14549
14550        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14551        if test -d "$BOOT_JDK"; then
14552          BOOT_JDK_FOUND=maybe
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14554$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14555        fi
14556
14557
14558    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14559    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14560      # Do we have a bin/java?
14561      if test ! -x "$BOOT_JDK/bin/java"; then
14562        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14564        BOOT_JDK_FOUND=no
14565      else
14566        # Do we have a bin/javac?
14567        if test ! -x "$BOOT_JDK/bin/javac"; then
14568          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14570          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14571$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14572          BOOT_JDK_FOUND=no
14573        else
14574          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14575          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14576            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14578            BOOT_JDK_FOUND=no
14579          else
14580            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14581            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14582
14583            # Extra M4 quote needed to protect [] in grep expression.
14584            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14585            if test "x$FOUND_VERSION_78" = x; then
14586              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14588              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14589$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14590              BOOT_JDK_FOUND=no
14591            else
14592              # We're done! :-)
14593              BOOT_JDK_FOUND=yes
14594
14595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14596
14597  # Input might be given as Windows format, start by converting to
14598  # unix format.
14599  path="$BOOT_JDK"
14600  new_path=`$CYGPATH -u "$path"`
14601
14602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14605  # "foo.exe" is OK but "foo" is an error.
14606  #
14607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14608  # It is also a way to make sure we got the proper file name for the real test later on.
14609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14610  if test "x$test_shortpath" = x; then
14611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14613    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14614  fi
14615
14616  # Call helper function which possibly converts this using DOS-style short mode.
14617  # If so, the updated path is stored in $new_path.
14618
14619  input_path="$new_path"
14620  # Check if we need to convert this using DOS-style short mode. If the path
14621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14622  # take no chances and rewrite it.
14623  # Note: m4 eats our [], so we need to use [ and ] instead.
14624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14625  if test "x$has_forbidden_chars" != x; then
14626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14630      # Going to short mode and back again did indeed matter. Since short mode is
14631      # case insensitive, let's make it lowercase to improve readability.
14632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14633      # Now convert it back to Unix-stile (cygpath)
14634      input_path=`$CYGPATH -u "$shortmode_path"`
14635      new_path="$input_path"
14636    fi
14637  fi
14638
14639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14640  if test "x$test_cygdrive_prefix" = x; then
14641    # As a simple fix, exclude /usr/bin since it's not a real path.
14642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14644      # a path prefixed by /cygdrive for fixpath to work.
14645      new_path="$CYGWIN_ROOT_PATH$input_path"
14646    fi
14647  fi
14648
14649
14650  if test "x$path" != "x$new_path"; then
14651    BOOT_JDK="$new_path"
14652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14654  fi
14655
14656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14657
14658  path="$BOOT_JDK"
14659  has_colon=`$ECHO $path | $GREP ^.:`
14660  new_path="$path"
14661  if test "x$has_colon" = x; then
14662    # Not in mixed or Windows style, start by that.
14663    new_path=`cmd //c echo $path`
14664  fi
14665
14666
14667  input_path="$new_path"
14668  # Check if we need to convert this using DOS-style short mode. If the path
14669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14670  # take no chances and rewrite it.
14671  # Note: m4 eats our [], so we need to use [ and ] instead.
14672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14673  if test "x$has_forbidden_chars" != x; then
14674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14676  fi
14677
14678
14679  windows_path="$new_path"
14680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14681    unix_path=`$CYGPATH -u "$windows_path"`
14682    new_path="$unix_path"
14683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14685    new_path="$unix_path"
14686  fi
14687
14688  if test "x$path" != "x$new_path"; then
14689    BOOT_JDK="$new_path"
14690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14692  fi
14693
14694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14696
14697  else
14698    # We're on a posix platform. Hooray! :)
14699    path="$BOOT_JDK"
14700    has_space=`$ECHO "$path" | $GREP " "`
14701    if test "x$has_space" != x; then
14702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14704      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14705    fi
14706
14707    # Use eval to expand a potential ~
14708    eval path="$path"
14709    if test ! -f "$path" && test ! -d "$path"; then
14710      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14711    fi
14712
14713    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14714  fi
14715
14716              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14717$as_echo_n "checking for Boot JDK... " >&6; }
14718              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14719$as_echo "$BOOT_JDK" >&6; }
14720              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14721$as_echo_n "checking Boot JDK version... " >&6; }
14722              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14723              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14724$as_echo "$BOOT_JDK_VERSION" >&6; }
14725            fi # end check jdk version
14726          fi # end check rt.jar
14727        fi # end check javac
14728      fi # end check java
14729    fi # end check boot jdk found
14730  fi
14731
14732    done
14733  fi
14734
14735
14736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14738      # Do we have a bin/java?
14739      if test ! -x "$BOOT_JDK/bin/java"; then
14740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14742        BOOT_JDK_FOUND=no
14743      else
14744        # Do we have a bin/javac?
14745        if test ! -x "$BOOT_JDK/bin/javac"; then
14746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14750          BOOT_JDK_FOUND=no
14751        else
14752          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14753          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14754            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14756            BOOT_JDK_FOUND=no
14757          else
14758            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14760
14761            # Extra M4 quote needed to protect [] in grep expression.
14762            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14763            if test "x$FOUND_VERSION_78" = x; then
14764              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14766              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14767$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14768              BOOT_JDK_FOUND=no
14769            else
14770              # We're done! :-)
14771              BOOT_JDK_FOUND=yes
14772
14773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14774
14775  # Input might be given as Windows format, start by converting to
14776  # unix format.
14777  path="$BOOT_JDK"
14778  new_path=`$CYGPATH -u "$path"`
14779
14780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14783  # "foo.exe" is OK but "foo" is an error.
14784  #
14785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14786  # It is also a way to make sure we got the proper file name for the real test later on.
14787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14788  if test "x$test_shortpath" = x; then
14789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14792  fi
14793
14794  # Call helper function which possibly converts this using DOS-style short mode.
14795  # If so, the updated path is stored in $new_path.
14796
14797  input_path="$new_path"
14798  # Check if we need to convert this using DOS-style short mode. If the path
14799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14800  # take no chances and rewrite it.
14801  # Note: m4 eats our [], so we need to use [ and ] instead.
14802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14803  if test "x$has_forbidden_chars" != x; then
14804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14808      # Going to short mode and back again did indeed matter. Since short mode is
14809      # case insensitive, let's make it lowercase to improve readability.
14810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14811      # Now convert it back to Unix-stile (cygpath)
14812      input_path=`$CYGPATH -u "$shortmode_path"`
14813      new_path="$input_path"
14814    fi
14815  fi
14816
14817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14818  if test "x$test_cygdrive_prefix" = x; then
14819    # As a simple fix, exclude /usr/bin since it's not a real path.
14820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14822      # a path prefixed by /cygdrive for fixpath to work.
14823      new_path="$CYGWIN_ROOT_PATH$input_path"
14824    fi
14825  fi
14826
14827
14828  if test "x$path" != "x$new_path"; then
14829    BOOT_JDK="$new_path"
14830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14832  fi
14833
14834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14835
14836  path="$BOOT_JDK"
14837  has_colon=`$ECHO $path | $GREP ^.:`
14838  new_path="$path"
14839  if test "x$has_colon" = x; then
14840    # Not in mixed or Windows style, start by that.
14841    new_path=`cmd //c echo $path`
14842  fi
14843
14844
14845  input_path="$new_path"
14846  # Check if we need to convert this using DOS-style short mode. If the path
14847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14848  # take no chances and rewrite it.
14849  # Note: m4 eats our [], so we need to use [ and ] instead.
14850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14851  if test "x$has_forbidden_chars" != x; then
14852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14854  fi
14855
14856
14857  windows_path="$new_path"
14858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14859    unix_path=`$CYGPATH -u "$windows_path"`
14860    new_path="$unix_path"
14861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14863    new_path="$unix_path"
14864  fi
14865
14866  if test "x$path" != "x$new_path"; then
14867    BOOT_JDK="$new_path"
14868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14870  fi
14871
14872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14874
14875  else
14876    # We're on a posix platform. Hooray! :)
14877    path="$BOOT_JDK"
14878    has_space=`$ECHO "$path" | $GREP " "`
14879    if test "x$has_space" != x; then
14880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14882      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14883    fi
14884
14885    # Use eval to expand a potential ~
14886    eval path="$path"
14887    if test ! -f "$path" && test ! -d "$path"; then
14888      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14889    fi
14890
14891    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14892  fi
14893
14894              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14895$as_echo_n "checking for Boot JDK... " >&6; }
14896              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14897$as_echo "$BOOT_JDK" >&6; }
14898              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14899$as_echo_n "checking Boot JDK version... " >&6; }
14900              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14901              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14902$as_echo "$BOOT_JDK_VERSION" >&6; }
14903            fi # end check jdk version
14904          fi # end check rt.jar
14905        fi # end check javac
14906      fi # end check java
14907    fi # end check boot jdk found
14908  fi
14909
14910
14911  if test "x$BOOT_JDK_FOUND" = xno; then
14912    # Now execute the test
14913
14914  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14915  BOOT_JDK_SUFFIX="/Contents/Home"
14916  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14917  if test "x$ALL_JDKS_FOUND" != x; then
14918    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14919
14920  if test "x$BOOT_JDK_FOUND" = xno; then
14921    # Now execute the test
14922
14923        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14924        if test -d "$BOOT_JDK"; then
14925          BOOT_JDK_FOUND=maybe
14926          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14927$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14928        fi
14929
14930
14931    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14932    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14933      # Do we have a bin/java?
14934      if test ! -x "$BOOT_JDK/bin/java"; then
14935        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14937        BOOT_JDK_FOUND=no
14938      else
14939        # Do we have a bin/javac?
14940        if test ! -x "$BOOT_JDK/bin/javac"; then
14941          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14943          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14944$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14945          BOOT_JDK_FOUND=no
14946        else
14947          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14948          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14949            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14951            BOOT_JDK_FOUND=no
14952          else
14953            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14955
14956            # Extra M4 quote needed to protect [] in grep expression.
14957            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14958            if test "x$FOUND_VERSION_78" = x; then
14959              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14961              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14962$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14963              BOOT_JDK_FOUND=no
14964            else
14965              # We're done! :-)
14966              BOOT_JDK_FOUND=yes
14967
14968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14969
14970  # Input might be given as Windows format, start by converting to
14971  # unix format.
14972  path="$BOOT_JDK"
14973  new_path=`$CYGPATH -u "$path"`
14974
14975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14978  # "foo.exe" is OK but "foo" is an error.
14979  #
14980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14981  # It is also a way to make sure we got the proper file name for the real test later on.
14982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14983  if test "x$test_shortpath" = x; then
14984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14986    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14987  fi
14988
14989  # Call helper function which possibly converts this using DOS-style short mode.
14990  # If so, the updated path is stored in $new_path.
14991
14992  input_path="$new_path"
14993  # Check if we need to convert this using DOS-style short mode. If the path
14994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14995  # take no chances and rewrite it.
14996  # Note: m4 eats our [], so we need to use [ and ] instead.
14997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14998  if test "x$has_forbidden_chars" != x; then
14999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15003      # Going to short mode and back again did indeed matter. Since short mode is
15004      # case insensitive, let's make it lowercase to improve readability.
15005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15006      # Now convert it back to Unix-stile (cygpath)
15007      input_path=`$CYGPATH -u "$shortmode_path"`
15008      new_path="$input_path"
15009    fi
15010  fi
15011
15012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15013  if test "x$test_cygdrive_prefix" = x; then
15014    # As a simple fix, exclude /usr/bin since it's not a real path.
15015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15017      # a path prefixed by /cygdrive for fixpath to work.
15018      new_path="$CYGWIN_ROOT_PATH$input_path"
15019    fi
15020  fi
15021
15022
15023  if test "x$path" != "x$new_path"; then
15024    BOOT_JDK="$new_path"
15025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15026$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15027  fi
15028
15029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15030
15031  path="$BOOT_JDK"
15032  has_colon=`$ECHO $path | $GREP ^.:`
15033  new_path="$path"
15034  if test "x$has_colon" = x; then
15035    # Not in mixed or Windows style, start by that.
15036    new_path=`cmd //c echo $path`
15037  fi
15038
15039
15040  input_path="$new_path"
15041  # Check if we need to convert this using DOS-style short mode. If the path
15042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15043  # take no chances and rewrite it.
15044  # Note: m4 eats our [], so we need to use [ and ] instead.
15045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15046  if test "x$has_forbidden_chars" != x; then
15047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15049  fi
15050
15051
15052  windows_path="$new_path"
15053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15054    unix_path=`$CYGPATH -u "$windows_path"`
15055    new_path="$unix_path"
15056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15058    new_path="$unix_path"
15059  fi
15060
15061  if test "x$path" != "x$new_path"; then
15062    BOOT_JDK="$new_path"
15063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15065  fi
15066
15067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15069
15070  else
15071    # We're on a posix platform. Hooray! :)
15072    path="$BOOT_JDK"
15073    has_space=`$ECHO "$path" | $GREP " "`
15074    if test "x$has_space" != x; then
15075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15076$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15077      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15078    fi
15079
15080    # Use eval to expand a potential ~
15081    eval path="$path"
15082    if test ! -f "$path" && test ! -d "$path"; then
15083      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15084    fi
15085
15086    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15087  fi
15088
15089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15090$as_echo_n "checking for Boot JDK... " >&6; }
15091              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15092$as_echo "$BOOT_JDK" >&6; }
15093              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15094$as_echo_n "checking Boot JDK version... " >&6; }
15095              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15097$as_echo "$BOOT_JDK_VERSION" >&6; }
15098            fi # end check jdk version
15099          fi # end check rt.jar
15100        fi # end check javac
15101      fi # end check java
15102    fi # end check boot jdk found
15103  fi
15104
15105    done
15106  fi
15107
15108
15109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15111      # Do we have a bin/java?
15112      if test ! -x "$BOOT_JDK/bin/java"; then
15113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15115        BOOT_JDK_FOUND=no
15116      else
15117        # Do we have a bin/javac?
15118        if test ! -x "$BOOT_JDK/bin/javac"; then
15119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15123          BOOT_JDK_FOUND=no
15124        else
15125          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15126          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15127            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15129            BOOT_JDK_FOUND=no
15130          else
15131            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15132            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15133
15134            # Extra M4 quote needed to protect [] in grep expression.
15135            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15136            if test "x$FOUND_VERSION_78" = x; then
15137              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15139              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15140$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15141              BOOT_JDK_FOUND=no
15142            else
15143              # We're done! :-)
15144              BOOT_JDK_FOUND=yes
15145
15146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15147
15148  # Input might be given as Windows format, start by converting to
15149  # unix format.
15150  path="$BOOT_JDK"
15151  new_path=`$CYGPATH -u "$path"`
15152
15153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15156  # "foo.exe" is OK but "foo" is an error.
15157  #
15158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15159  # It is also a way to make sure we got the proper file name for the real test later on.
15160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15161  if test "x$test_shortpath" = x; then
15162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15164    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15165  fi
15166
15167  # Call helper function which possibly converts this using DOS-style short mode.
15168  # If so, the updated path is stored in $new_path.
15169
15170  input_path="$new_path"
15171  # Check if we need to convert this using DOS-style short mode. If the path
15172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15173  # take no chances and rewrite it.
15174  # Note: m4 eats our [], so we need to use [ and ] instead.
15175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15176  if test "x$has_forbidden_chars" != x; then
15177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15181      # Going to short mode and back again did indeed matter. Since short mode is
15182      # case insensitive, let's make it lowercase to improve readability.
15183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15184      # Now convert it back to Unix-stile (cygpath)
15185      input_path=`$CYGPATH -u "$shortmode_path"`
15186      new_path="$input_path"
15187    fi
15188  fi
15189
15190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15191  if test "x$test_cygdrive_prefix" = x; then
15192    # As a simple fix, exclude /usr/bin since it's not a real path.
15193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15195      # a path prefixed by /cygdrive for fixpath to work.
15196      new_path="$CYGWIN_ROOT_PATH$input_path"
15197    fi
15198  fi
15199
15200
15201  if test "x$path" != "x$new_path"; then
15202    BOOT_JDK="$new_path"
15203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15204$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15205  fi
15206
15207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15208
15209  path="$BOOT_JDK"
15210  has_colon=`$ECHO $path | $GREP ^.:`
15211  new_path="$path"
15212  if test "x$has_colon" = x; then
15213    # Not in mixed or Windows style, start by that.
15214    new_path=`cmd //c echo $path`
15215  fi
15216
15217
15218  input_path="$new_path"
15219  # Check if we need to convert this using DOS-style short mode. If the path
15220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15221  # take no chances and rewrite it.
15222  # Note: m4 eats our [], so we need to use [ and ] instead.
15223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15224  if test "x$has_forbidden_chars" != x; then
15225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15227  fi
15228
15229
15230  windows_path="$new_path"
15231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15232    unix_path=`$CYGPATH -u "$windows_path"`
15233    new_path="$unix_path"
15234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15236    new_path="$unix_path"
15237  fi
15238
15239  if test "x$path" != "x$new_path"; then
15240    BOOT_JDK="$new_path"
15241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15243  fi
15244
15245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15247
15248  else
15249    # We're on a posix platform. Hooray! :)
15250    path="$BOOT_JDK"
15251    has_space=`$ECHO "$path" | $GREP " "`
15252    if test "x$has_space" != x; then
15253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15255      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15256    fi
15257
15258    # Use eval to expand a potential ~
15259    eval path="$path"
15260    if test ! -f "$path" && test ! -d "$path"; then
15261      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15262    fi
15263
15264    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15265  fi
15266
15267              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15268$as_echo_n "checking for Boot JDK... " >&6; }
15269              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15270$as_echo "$BOOT_JDK" >&6; }
15271              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15272$as_echo_n "checking Boot JDK version... " >&6; }
15273              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15274              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15275$as_echo "$BOOT_JDK_VERSION" >&6; }
15276            fi # end check jdk version
15277          fi # end check rt.jar
15278        fi # end check javac
15279      fi # end check java
15280    fi # end check boot jdk found
15281  fi
15282
15283  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15284
15285  if test "x$BOOT_JDK_FOUND" = xno; then
15286    # Now execute the test
15287
15288  BOOT_JDK_PREFIX="/usr/lib/jvm"
15289  BOOT_JDK_SUFFIX=""
15290  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15291  if test "x$ALL_JDKS_FOUND" != x; then
15292    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15293
15294  if test "x$BOOT_JDK_FOUND" = xno; then
15295    # Now execute the test
15296
15297        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15298        if test -d "$BOOT_JDK"; then
15299          BOOT_JDK_FOUND=maybe
15300          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15301$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15302        fi
15303
15304
15305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15307      # Do we have a bin/java?
15308      if test ! -x "$BOOT_JDK/bin/java"; then
15309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15311        BOOT_JDK_FOUND=no
15312      else
15313        # Do we have a bin/javac?
15314        if test ! -x "$BOOT_JDK/bin/javac"; then
15315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15319          BOOT_JDK_FOUND=no
15320        else
15321          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15322          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15323            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15325            BOOT_JDK_FOUND=no
15326          else
15327            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15328            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15329
15330            # Extra M4 quote needed to protect [] in grep expression.
15331            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15332            if test "x$FOUND_VERSION_78" = x; then
15333              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15335              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15336$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15337              BOOT_JDK_FOUND=no
15338            else
15339              # We're done! :-)
15340              BOOT_JDK_FOUND=yes
15341
15342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15343
15344  # Input might be given as Windows format, start by converting to
15345  # unix format.
15346  path="$BOOT_JDK"
15347  new_path=`$CYGPATH -u "$path"`
15348
15349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15352  # "foo.exe" is OK but "foo" is an error.
15353  #
15354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15355  # It is also a way to make sure we got the proper file name for the real test later on.
15356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15357  if test "x$test_shortpath" = x; then
15358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15360    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15361  fi
15362
15363  # Call helper function which possibly converts this using DOS-style short mode.
15364  # If so, the updated path is stored in $new_path.
15365
15366  input_path="$new_path"
15367  # Check if we need to convert this using DOS-style short mode. If the path
15368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15369  # take no chances and rewrite it.
15370  # Note: m4 eats our [], so we need to use [ and ] instead.
15371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15372  if test "x$has_forbidden_chars" != x; then
15373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15377      # Going to short mode and back again did indeed matter. Since short mode is
15378      # case insensitive, let's make it lowercase to improve readability.
15379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15380      # Now convert it back to Unix-stile (cygpath)
15381      input_path=`$CYGPATH -u "$shortmode_path"`
15382      new_path="$input_path"
15383    fi
15384  fi
15385
15386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15387  if test "x$test_cygdrive_prefix" = x; then
15388    # As a simple fix, exclude /usr/bin since it's not a real path.
15389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15391      # a path prefixed by /cygdrive for fixpath to work.
15392      new_path="$CYGWIN_ROOT_PATH$input_path"
15393    fi
15394  fi
15395
15396
15397  if test "x$path" != "x$new_path"; then
15398    BOOT_JDK="$new_path"
15399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15401  fi
15402
15403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15404
15405  path="$BOOT_JDK"
15406  has_colon=`$ECHO $path | $GREP ^.:`
15407  new_path="$path"
15408  if test "x$has_colon" = x; then
15409    # Not in mixed or Windows style, start by that.
15410    new_path=`cmd //c echo $path`
15411  fi
15412
15413
15414  input_path="$new_path"
15415  # Check if we need to convert this using DOS-style short mode. If the path
15416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15417  # take no chances and rewrite it.
15418  # Note: m4 eats our [], so we need to use [ and ] instead.
15419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15420  if test "x$has_forbidden_chars" != x; then
15421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423  fi
15424
15425
15426  windows_path="$new_path"
15427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15428    unix_path=`$CYGPATH -u "$windows_path"`
15429    new_path="$unix_path"
15430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15432    new_path="$unix_path"
15433  fi
15434
15435  if test "x$path" != "x$new_path"; then
15436    BOOT_JDK="$new_path"
15437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15439  fi
15440
15441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15443
15444  else
15445    # We're on a posix platform. Hooray! :)
15446    path="$BOOT_JDK"
15447    has_space=`$ECHO "$path" | $GREP " "`
15448    if test "x$has_space" != x; then
15449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15451      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15452    fi
15453
15454    # Use eval to expand a potential ~
15455    eval path="$path"
15456    if test ! -f "$path" && test ! -d "$path"; then
15457      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15458    fi
15459
15460    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15461  fi
15462
15463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15464$as_echo_n "checking for Boot JDK... " >&6; }
15465              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15466$as_echo "$BOOT_JDK" >&6; }
15467              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15468$as_echo_n "checking Boot JDK version... " >&6; }
15469              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15470              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15471$as_echo "$BOOT_JDK_VERSION" >&6; }
15472            fi # end check jdk version
15473          fi # end check rt.jar
15474        fi # end check javac
15475      fi # end check java
15476    fi # end check boot jdk found
15477  fi
15478
15479    done
15480  fi
15481
15482
15483    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15484    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15485      # Do we have a bin/java?
15486      if test ! -x "$BOOT_JDK/bin/java"; then
15487        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15489        BOOT_JDK_FOUND=no
15490      else
15491        # Do we have a bin/javac?
15492        if test ! -x "$BOOT_JDK/bin/javac"; then
15493          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15495          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15496$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15497          BOOT_JDK_FOUND=no
15498        else
15499          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15500          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15501            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15503            BOOT_JDK_FOUND=no
15504          else
15505            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15506            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15507
15508            # Extra M4 quote needed to protect [] in grep expression.
15509            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15510            if test "x$FOUND_VERSION_78" = x; then
15511              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15514$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15515              BOOT_JDK_FOUND=no
15516            else
15517              # We're done! :-)
15518              BOOT_JDK_FOUND=yes
15519
15520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15521
15522  # Input might be given as Windows format, start by converting to
15523  # unix format.
15524  path="$BOOT_JDK"
15525  new_path=`$CYGPATH -u "$path"`
15526
15527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15530  # "foo.exe" is OK but "foo" is an error.
15531  #
15532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15533  # It is also a way to make sure we got the proper file name for the real test later on.
15534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15535  if test "x$test_shortpath" = x; then
15536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15539  fi
15540
15541  # Call helper function which possibly converts this using DOS-style short mode.
15542  # If so, the updated path is stored in $new_path.
15543
15544  input_path="$new_path"
15545  # Check if we need to convert this using DOS-style short mode. If the path
15546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15547  # take no chances and rewrite it.
15548  # Note: m4 eats our [], so we need to use [ and ] instead.
15549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15550  if test "x$has_forbidden_chars" != x; then
15551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15555      # Going to short mode and back again did indeed matter. Since short mode is
15556      # case insensitive, let's make it lowercase to improve readability.
15557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15558      # Now convert it back to Unix-stile (cygpath)
15559      input_path=`$CYGPATH -u "$shortmode_path"`
15560      new_path="$input_path"
15561    fi
15562  fi
15563
15564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15565  if test "x$test_cygdrive_prefix" = x; then
15566    # As a simple fix, exclude /usr/bin since it's not a real path.
15567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15569      # a path prefixed by /cygdrive for fixpath to work.
15570      new_path="$CYGWIN_ROOT_PATH$input_path"
15571    fi
15572  fi
15573
15574
15575  if test "x$path" != "x$new_path"; then
15576    BOOT_JDK="$new_path"
15577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15579  fi
15580
15581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15582
15583  path="$BOOT_JDK"
15584  has_colon=`$ECHO $path | $GREP ^.:`
15585  new_path="$path"
15586  if test "x$has_colon" = x; then
15587    # Not in mixed or Windows style, start by that.
15588    new_path=`cmd //c echo $path`
15589  fi
15590
15591
15592  input_path="$new_path"
15593  # Check if we need to convert this using DOS-style short mode. If the path
15594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15595  # take no chances and rewrite it.
15596  # Note: m4 eats our [], so we need to use [ and ] instead.
15597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15598  if test "x$has_forbidden_chars" != x; then
15599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15601  fi
15602
15603
15604  windows_path="$new_path"
15605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15606    unix_path=`$CYGPATH -u "$windows_path"`
15607    new_path="$unix_path"
15608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15610    new_path="$unix_path"
15611  fi
15612
15613  if test "x$path" != "x$new_path"; then
15614    BOOT_JDK="$new_path"
15615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15617  fi
15618
15619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15621
15622  else
15623    # We're on a posix platform. Hooray! :)
15624    path="$BOOT_JDK"
15625    has_space=`$ECHO "$path" | $GREP " "`
15626    if test "x$has_space" != x; then
15627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15629      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15630    fi
15631
15632    # Use eval to expand a potential ~
15633    eval path="$path"
15634    if test ! -f "$path" && test ! -d "$path"; then
15635      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15636    fi
15637
15638    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15639  fi
15640
15641              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15642$as_echo_n "checking for Boot JDK... " >&6; }
15643              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15644$as_echo "$BOOT_JDK" >&6; }
15645              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15646$as_echo_n "checking Boot JDK version... " >&6; }
15647              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15648              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15649$as_echo "$BOOT_JDK_VERSION" >&6; }
15650            fi # end check jdk version
15651          fi # end check rt.jar
15652        fi # end check javac
15653      fi # end check java
15654    fi # end check boot jdk found
15655  fi
15656
15657  fi
15658
15659
15660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15661    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15662      # Do we have a bin/java?
15663      if test ! -x "$BOOT_JDK/bin/java"; then
15664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15666        BOOT_JDK_FOUND=no
15667      else
15668        # Do we have a bin/javac?
15669        if test ! -x "$BOOT_JDK/bin/javac"; then
15670          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15672          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15673$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15674          BOOT_JDK_FOUND=no
15675        else
15676          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15677          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15678            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15680            BOOT_JDK_FOUND=no
15681          else
15682            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15683            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15684
15685            # Extra M4 quote needed to protect [] in grep expression.
15686            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15687            if test "x$FOUND_VERSION_78" = x; then
15688              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15690              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15691$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15692              BOOT_JDK_FOUND=no
15693            else
15694              # We're done! :-)
15695              BOOT_JDK_FOUND=yes
15696
15697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15698
15699  # Input might be given as Windows format, start by converting to
15700  # unix format.
15701  path="$BOOT_JDK"
15702  new_path=`$CYGPATH -u "$path"`
15703
15704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15707  # "foo.exe" is OK but "foo" is an error.
15708  #
15709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15710  # It is also a way to make sure we got the proper file name for the real test later on.
15711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15712  if test "x$test_shortpath" = x; then
15713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15715    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15716  fi
15717
15718  # Call helper function which possibly converts this using DOS-style short mode.
15719  # If so, the updated path is stored in $new_path.
15720
15721  input_path="$new_path"
15722  # Check if we need to convert this using DOS-style short mode. If the path
15723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15724  # take no chances and rewrite it.
15725  # Note: m4 eats our [], so we need to use [ and ] instead.
15726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15727  if test "x$has_forbidden_chars" != x; then
15728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15732      # Going to short mode and back again did indeed matter. Since short mode is
15733      # case insensitive, let's make it lowercase to improve readability.
15734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15735      # Now convert it back to Unix-stile (cygpath)
15736      input_path=`$CYGPATH -u "$shortmode_path"`
15737      new_path="$input_path"
15738    fi
15739  fi
15740
15741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15742  if test "x$test_cygdrive_prefix" = x; then
15743    # As a simple fix, exclude /usr/bin since it's not a real path.
15744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15746      # a path prefixed by /cygdrive for fixpath to work.
15747      new_path="$CYGWIN_ROOT_PATH$input_path"
15748    fi
15749  fi
15750
15751
15752  if test "x$path" != "x$new_path"; then
15753    BOOT_JDK="$new_path"
15754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15756  fi
15757
15758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15759
15760  path="$BOOT_JDK"
15761  has_colon=`$ECHO $path | $GREP ^.:`
15762  new_path="$path"
15763  if test "x$has_colon" = x; then
15764    # Not in mixed or Windows style, start by that.
15765    new_path=`cmd //c echo $path`
15766  fi
15767
15768
15769  input_path="$new_path"
15770  # Check if we need to convert this using DOS-style short mode. If the path
15771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15772  # take no chances and rewrite it.
15773  # Note: m4 eats our [], so we need to use [ and ] instead.
15774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15775  if test "x$has_forbidden_chars" != x; then
15776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15778  fi
15779
15780
15781  windows_path="$new_path"
15782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15783    unix_path=`$CYGPATH -u "$windows_path"`
15784    new_path="$unix_path"
15785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15787    new_path="$unix_path"
15788  fi
15789
15790  if test "x$path" != "x$new_path"; then
15791    BOOT_JDK="$new_path"
15792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15794  fi
15795
15796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15798
15799  else
15800    # We're on a posix platform. Hooray! :)
15801    path="$BOOT_JDK"
15802    has_space=`$ECHO "$path" | $GREP " "`
15803    if test "x$has_space" != x; then
15804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15806      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15807    fi
15808
15809    # Use eval to expand a potential ~
15810    eval path="$path"
15811    if test ! -f "$path" && test ! -d "$path"; then
15812      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15813    fi
15814
15815    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15816  fi
15817
15818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15819$as_echo_n "checking for Boot JDK... " >&6; }
15820              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15821$as_echo "$BOOT_JDK" >&6; }
15822              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15823$as_echo_n "checking Boot JDK version... " >&6; }
15824              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15825              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15826$as_echo "$BOOT_JDK_VERSION" >&6; }
15827            fi # end check jdk version
15828          fi # end check rt.jar
15829        fi # end check javac
15830      fi # end check java
15831    fi # end check boot jdk found
15832  fi
15833
15834
15835  # If we haven't found anything yet, we've truly lost. Give up.
15836  if test "x$BOOT_JDK_FOUND" = xno; then
15837
15838  # Print a helpful message on how to acquire the necessary build dependency.
15839  # openjdk is the help tag: freetype, cups, pulse, alsa etc
15840  MISSING_DEPENDENCY=openjdk
15841
15842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15843    cygwin_help $MISSING_DEPENDENCY
15844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15845    msys_help $MISSING_DEPENDENCY
15846  else
15847    PKGHANDLER_COMMAND=
15848
15849    case $PKGHANDLER in
15850      apt-get)
15851        apt_help     $MISSING_DEPENDENCY ;;
15852      yum)
15853        yum_help     $MISSING_DEPENDENCY ;;
15854      port)
15855        port_help    $MISSING_DEPENDENCY ;;
15856      pkgutil)
15857        pkgutil_help $MISSING_DEPENDENCY ;;
15858      pkgadd)
15859        pkgadd_help  $MISSING_DEPENDENCY ;;
15860      * )
15861        break ;;
15862    esac
15863
15864    if test "x$PKGHANDLER_COMMAND" != x; then
15865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15866    fi
15867  fi
15868
15869    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15870$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15871    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15872$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15873    as_fn_error $? "Cannot continue" "$LINENO" 5
15874  fi
15875
15876  # Setup proper paths for what we found
15877  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15878  if test ! -f "$BOOT_RTJAR"; then
15879    # On MacOSX it is called classes.jar
15880    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15881    if test -f "$BOOT_RTJAR"; then
15882      # Remove the ..
15883      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15884    fi
15885  fi
15886  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15887  BOOT_JDK="$BOOT_JDK"
15888
15889
15890
15891
15892  # Setup tools from the Boot JDK.
15893
15894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15895$as_echo_n "checking for java in Boot JDK... " >&6; }
15896  JAVA=$BOOT_JDK/bin/java
15897  if test ! -x $JAVA; 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 java 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 javac in Boot JDK" >&5
15909$as_echo_n "checking for javac in Boot JDK... " >&6; }
15910  JAVAC=$BOOT_JDK/bin/javac
15911  if test ! -x $JAVAC; 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 javac 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 javah in Boot JDK" >&5
15923$as_echo_n "checking for javah in Boot JDK... " >&6; }
15924  JAVAH=$BOOT_JDK/bin/javah
15925  if test ! -x $JAVAH; 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 javah 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 javap in Boot JDK" >&5
15937$as_echo_n "checking for javap in Boot JDK... " >&6; }
15938  JAVAP=$BOOT_JDK/bin/javap
15939  if test ! -x $JAVAP; 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 javap 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 jar in Boot JDK" >&5
15951$as_echo_n "checking for jar in Boot JDK... " >&6; }
15952  JAR=$BOOT_JDK/bin/jar
15953  if test ! -x $JAR; 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 jar 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 rmic in Boot JDK" >&5
15965$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15966  RMIC=$BOOT_JDK/bin/rmic
15967  if test ! -x $RMIC; 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 rmic 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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15979$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15980  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15981  if test ! -x $NATIVE2ASCII; then
15982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15983$as_echo "not found" >&6; }
15984    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15985$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15986    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15987  fi
15988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15989$as_echo "ok" >&6; }
15990
15991
15992  # Finally, set some other options...
15993
15994  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15995  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15996
15997
15998
15999
16000  ##############################################################################
16001  #
16002  # Specify options for anything that is run with the Boot JDK.
16003  #
16004
16005# Check whether --with-boot-jdk-jvmargs was given.
16006if test "${with_boot_jdk_jvmargs+set}" = set; then :
16007  withval=$with_boot_jdk_jvmargs;
16008fi
16009
16010
16011  if test "x$with_boot_jdk_jvmargs" = x; then
16012    # Not all JVM:s accept the same arguments on the command line.
16013    # OpenJDK specific increase in thread stack for JDK build,
16014    # well more specifically, when running javac.
16015    if test "x$BUILD_NUM_BITS" = x32; then
16016      STACK_SIZE=768
16017    else
16018      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16019      # since 64-bit pointers are pushed on the stach. Apparently, we need
16020      # to increase the stack space when javacing the JDK....
16021      STACK_SIZE=1536
16022    fi
16023
16024    # Minimum amount of heap memory.
16025
16026  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16027  $ECHO "Command: $JAVA -Xms64M -version" >&5
16028  OUTPUT=`$JAVA -Xms64M -version 2>&1`
16029  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16030  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16031  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16032    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16033    JVM_ARG_OK=true
16034  else
16035    $ECHO "Arg failed:" >&5
16036    $ECHO "$OUTPUT" >&5
16037    JVM_ARG_OK=false
16038  fi
16039
16040    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16041      # Why does macosx need more heap? Its the huge JDK batch.
16042
16043  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16044  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16045  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16046  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16047  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16048  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16049    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16050    JVM_ARG_OK=true
16051  else
16052    $ECHO "Arg failed:" >&5
16053    $ECHO "$OUTPUT" >&5
16054    JVM_ARG_OK=false
16055  fi
16056
16057    else
16058
16059  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16060  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16061  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16062  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16063  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16064  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16065    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16066    JVM_ARG_OK=true
16067  else
16068    $ECHO "Arg failed:" >&5
16069    $ECHO "$OUTPUT" >&5
16070    JVM_ARG_OK=false
16071  fi
16072
16073    fi
16074    # When is adding -client something that speeds up the JVM?
16075    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16076
16077  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16078  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16079  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16080  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16081  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16082  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16083    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16084    JVM_ARG_OK=true
16085  else
16086    $ECHO "Arg failed:" >&5
16087    $ECHO "$OUTPUT" >&5
16088    JVM_ARG_OK=false
16089  fi
16090
16091
16092  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16093  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16094  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16095  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16096  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16097  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16098    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16099    JVM_ARG_OK=true
16100  else
16101    $ECHO "Arg failed:" >&5
16102    $ECHO "$OUTPUT" >&5
16103    JVM_ARG_OK=false
16104  fi
16105
16106
16107  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16108  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16109  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16110  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16111  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16113    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16114    JVM_ARG_OK=true
16115  else
16116    $ECHO "Arg failed:" >&5
16117    $ECHO "$OUTPUT" >&5
16118    JVM_ARG_OK=false
16119  fi
16120
16121    # Disable special log output when a debug build is used as Boot JDK...
16122
16123  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16124  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16125  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16126  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16127  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16128  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16129    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16130    JVM_ARG_OK=true
16131  else
16132    $ECHO "Arg failed:" >&5
16133    $ECHO "$OUTPUT" >&5
16134    JVM_ARG_OK=false
16135  fi
16136
16137  fi
16138
16139  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16140
16141
16142
16143###############################################################################
16144#
16145# Configure the sources to use. We can add or override individual directories.
16146#
16147###############################################################################
16148
16149
16150  # Where are the sources. Any of these can be overridden
16151  # using --with-override-corba and the likes.
16152  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16153  CORBA_TOPDIR="$SRC_ROOT/corba"
16154  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16155  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16156  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16157  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16158  JDK_TOPDIR="$SRC_ROOT/jdk"
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169  ###############################################################################
16170  #
16171  # Pickup additional source for a component from outside of the source root
16172  # or override source for a component.
16173  #
16174
16175# Check whether --with-add-source-root was given.
16176if test "${with_add_source_root+set}" = set; then :
16177  withval=$with_add_source_root;
16178fi
16179
16180
16181
16182# Check whether --with-override-source-root was given.
16183if test "${with_override_source_root+set}" = set; then :
16184  withval=$with_override_source_root;
16185fi
16186
16187
16188
16189# Check whether --with-adds-and-overrides was given.
16190if test "${with_adds_and_overrides+set}" = set; then :
16191  withval=$with_adds_and_overrides;
16192fi
16193
16194
16195  if test "x$with_adds_and_overrides" != x; then
16196    with_add_source_root="$with_adds_and_overrides/adds"
16197    with_override_source_root="$with_adds_and_overrides/overrides"
16198  fi
16199
16200  if test "x$with_add_source_root" != x; then
16201    if ! test -d $with_add_source_root; then
16202      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16203    fi
16204    CURDIR="$PWD"
16205    cd "$with_add_source_root"
16206    ADD_SRC_ROOT="`pwd`"
16207    cd "$CURDIR"
16208    # Verify that the addon source root does not have any root makefiles.
16209    # If it does, then it is usually an error, prevent this.
16210    if test -f $with_add_source_root/langtools/make/Makefile; then
16211      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
16212    fi
16213    if test -f $with_add_source_root/corba/make/Makefile; then
16214      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
16215    fi
16216    if test -f $with_add_source_root/jaxp/make/Makefile; then
16217      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
16218    fi
16219    if test -f $with_add_source_root/jaxws/make/Makefile; then
16220      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
16221    fi
16222    if test -f $with_add_source_root/hotspot/make/Makefile; then
16223      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
16224    fi
16225    if test -f $with_add_source_root/nashorn/make/Makefile; then
16226      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16227    fi
16228    if test -f $with_add_source_root/jdk/make/Makefile; then
16229      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
16230    fi
16231  fi
16232
16233
16234  if test "x$with_override_source_root" != x; then
16235    if ! test -d $with_override_source_root; then
16236      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16237    fi
16238    CURDIR="$PWD"
16239    cd "$with_override_source_root"
16240    OVERRIDE_SRC_ROOT="`pwd`"
16241    cd "$CURDIR"
16242    if test -f $with_override_source_root/langtools/make/Makefile; then
16243      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
16244    fi
16245    if test -f $with_override_source_root/corba/make/Makefile; then
16246      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
16247    fi
16248    if test -f $with_override_source_root/jaxp/make/Makefile; then
16249      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
16250    fi
16251    if test -f $with_override_source_root/jaxws/make/Makefile; then
16252      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
16253    fi
16254    if test -f $with_override_source_root/hotspot/make/Makefile; then
16255      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
16256    fi
16257    if test -f $with_override_source_root/nashorn/make/Makefile; then
16258      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
16259    fi
16260    if 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/make/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/make/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/make/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/make/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; then
16392      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16393    fi
16394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16395$as_echo_n "checking if hotspot should be overridden... " >&6; }
16396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16397$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16398  fi
16399  if test "x$with_override_nashorn" != x; then
16400    CURDIR="$PWD"
16401    cd "$with_override_nashorn"
16402    NASHORN_TOPDIR="`pwd`"
16403    cd "$CURDIR"
16404    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16405      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16406    fi
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16408$as_echo_n "checking if nashorn should be overridden... " >&6; }
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16410$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16411  fi
16412  if test "x$with_override_jdk" != x; then
16413    CURDIR="$PWD"
16414    cd "$with_override_jdk"
16415    JDK_TOPDIR="`pwd`"
16416    cd "$CURDIR"
16417    if ! test -f $JDK_TOPDIR/make/Makefile; then
16418      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16419    fi
16420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16421$as_echo_n "checking if JDK should be overridden... " >&6; }
16422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16423$as_echo "yes with $JDK_TOPDIR" >&6; }
16424  fi
16425
16426
16427  BUILD_OUTPUT="$OUTPUT_ROOT"
16428
16429
16430  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16431  BUILD_HOTSPOT=true
16432
16433
16434
16435# Check whether --with-import-hotspot was given.
16436if test "${with_import_hotspot+set}" = set; then :
16437  withval=$with_import_hotspot;
16438fi
16439
16440  if test "x$with_import_hotspot" != x; then
16441    CURDIR="$PWD"
16442    cd "$with_import_hotspot"
16443    HOTSPOT_DIST="`pwd`"
16444    cd "$CURDIR"
16445    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16446      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16447    fi
16448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16449$as_echo_n "checking if hotspot should be imported... " >&6; }
16450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16451$as_echo "yes from $HOTSPOT_DIST" >&6; }
16452    BUILD_HOTSPOT=false
16453  fi
16454
16455  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16456
16457
16458###############################################################################
16459#
16460# Setup the toolchain (compilers etc), i.e. the tools that need to be
16461# cross-compilation aware.
16462#
16463###############################################################################
16464
16465
16466  ###############################################################################
16467  #
16468  # Configure the development tool paths and potential sysroot.
16469  #
16470  ac_ext=cpp
16471ac_cpp='$CXXCPP $CPPFLAGS'
16472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16475
16476
16477  # The option used to specify the target .o,.a or .so file.
16478  # When compiling, how to specify the to be created object file.
16479  CC_OUT_OPTION='-o$(SPACE)'
16480  # When linking, how to specify the to be created executable.
16481  EXE_OUT_OPTION='-o$(SPACE)'
16482  # When linking, how to specify the to be created dynamically linkable library.
16483  LD_OUT_OPTION='-o$(SPACE)'
16484  # When archiving, how to specify the to be create static archive for object files.
16485  AR_OUT_OPTION='rcs$(SPACE)'
16486
16487
16488
16489
16490
16491# Locate the actual tools
16492
16493
16494# Check whether --with-jtreg was given.
16495if test "${with_jtreg+set}" = set; then :
16496  withval=$with_jtreg;
16497else
16498  with_jtreg=no
16499fi
16500
16501
16502  if test "x$with_jtreg" = xno; then
16503    # jtreg disabled
16504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16505$as_echo_n "checking for jtreg... " >&6; }
16506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16507$as_echo "no" >&6; }
16508  else
16509    if test "x$with_jtreg" != xyes; then
16510      # with path specified.
16511      JT_HOME="$with_jtreg"
16512    fi
16513
16514    if test "x$JT_HOME" != x; then
16515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16516$as_echo_n "checking for jtreg... " >&6; }
16517
16518      # use JT_HOME enviroment var.
16519
16520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16521
16522  # Input might be given as Windows format, start by converting to
16523  # unix format.
16524  path="$JT_HOME"
16525  new_path=`$CYGPATH -u "$path"`
16526
16527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16530  # "foo.exe" is OK but "foo" is an error.
16531  #
16532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16533  # It is also a way to make sure we got the proper file name for the real test later on.
16534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16535  if test "x$test_shortpath" = x; then
16536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16537$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16538    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16539  fi
16540
16541  # Call helper function which possibly converts this using DOS-style short mode.
16542  # If so, the updated path is stored in $new_path.
16543
16544  input_path="$new_path"
16545  # Check if we need to convert this using DOS-style short mode. If the path
16546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16547  # take no chances and rewrite it.
16548  # Note: m4 eats our [], so we need to use [ and ] instead.
16549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16550  if test "x$has_forbidden_chars" != x; then
16551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16555      # Going to short mode and back again did indeed matter. Since short mode is
16556      # case insensitive, let's make it lowercase to improve readability.
16557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16558      # Now convert it back to Unix-stile (cygpath)
16559      input_path=`$CYGPATH -u "$shortmode_path"`
16560      new_path="$input_path"
16561    fi
16562  fi
16563
16564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16565  if test "x$test_cygdrive_prefix" = x; then
16566    # As a simple fix, exclude /usr/bin since it's not a real path.
16567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16569      # a path prefixed by /cygdrive for fixpath to work.
16570      new_path="$CYGWIN_ROOT_PATH$input_path"
16571    fi
16572  fi
16573
16574
16575  if test "x$path" != "x$new_path"; then
16576    JT_HOME="$new_path"
16577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16578$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16579  fi
16580
16581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16582
16583  path="$JT_HOME"
16584  has_colon=`$ECHO $path | $GREP ^.:`
16585  new_path="$path"
16586  if test "x$has_colon" = x; then
16587    # Not in mixed or Windows style, start by that.
16588    new_path=`cmd //c echo $path`
16589  fi
16590
16591
16592  input_path="$new_path"
16593  # Check if we need to convert this using DOS-style short mode. If the path
16594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16595  # take no chances and rewrite it.
16596  # Note: m4 eats our [], so we need to use [ and ] instead.
16597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16598  if test "x$has_forbidden_chars" != x; then
16599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16601  fi
16602
16603
16604  windows_path="$new_path"
16605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16606    unix_path=`$CYGPATH -u "$windows_path"`
16607    new_path="$unix_path"
16608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16610    new_path="$unix_path"
16611  fi
16612
16613  if test "x$path" != "x$new_path"; then
16614    JT_HOME="$new_path"
16615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16616$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16617  fi
16618
16619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16621
16622  else
16623    # We're on a posix platform. Hooray! :)
16624    path="$JT_HOME"
16625    has_space=`$ECHO "$path" | $GREP " "`
16626    if test "x$has_space" != x; then
16627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16628$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16629      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16630    fi
16631
16632    # Use eval to expand a potential ~
16633    eval path="$path"
16634    if test ! -f "$path" && test ! -d "$path"; then
16635      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16636    fi
16637
16638    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16639  fi
16640
16641
16642      # jtreg win32 script works for everybody
16643      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16644
16645      if test ! -f "$JTREGEXE"; then
16646        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16647      fi
16648
16649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16650$as_echo "$JTREGEXE" >&6; }
16651    else
16652      # try to find jtreg on path
16653
16654  for ac_prog in jtreg
16655do
16656  # Extract the first word of "$ac_prog", so it can be a program name with args.
16657set dummy $ac_prog; ac_word=$2
16658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16659$as_echo_n "checking for $ac_word... " >&6; }
16660if ${ac_cv_path_JTREGEXE+:} false; then :
16661  $as_echo_n "(cached) " >&6
16662else
16663  case $JTREGEXE in
16664  [\\/]* | ?:[\\/]*)
16665  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16666  ;;
16667  *)
16668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16669for as_dir in $PATH
16670do
16671  IFS=$as_save_IFS
16672  test -z "$as_dir" && as_dir=.
16673    for ac_exec_ext in '' $ac_executable_extensions; do
16674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16675    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16677    break 2
16678  fi
16679done
16680  done
16681IFS=$as_save_IFS
16682
16683  ;;
16684esac
16685fi
16686JTREGEXE=$ac_cv_path_JTREGEXE
16687if test -n "$JTREGEXE"; then
16688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16689$as_echo "$JTREGEXE" >&6; }
16690else
16691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16692$as_echo "no" >&6; }
16693fi
16694
16695
16696  test -n "$JTREGEXE" && break
16697done
16698
16699
16700  if test "x$JTREGEXE" = x; then
16701    if test "xjtreg" = x; then
16702      PROG_NAME=jtregexe
16703    else
16704      PROG_NAME=jtreg
16705    fi
16706    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16708    as_fn_error $? "Cannot continue" "$LINENO" 5
16709  fi
16710
16711
16712      JT_HOME="`$DIRNAME $JTREGEXE`"
16713    fi
16714  fi
16715
16716
16717
16718
16719
16720  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16721
16722  # Store path to cygwin link.exe to help excluding it when searching for
16723  # VS linker. This must be done before changing the PATH when looking for VS.
16724  # Extract the first word of "link", so it can be a program name with args.
16725set dummy link; ac_word=$2
16726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16727$as_echo_n "checking for $ac_word... " >&6; }
16728if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16729  $as_echo_n "(cached) " >&6
16730else
16731  case $CYGWIN_LINK in
16732  [\\/]* | ?:[\\/]*)
16733  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16734  ;;
16735  *)
16736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16737for as_dir in $PATH
16738do
16739  IFS=$as_save_IFS
16740  test -z "$as_dir" && as_dir=.
16741    for ac_exec_ext in '' $ac_executable_extensions; do
16742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16743    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16745    break 2
16746  fi
16747done
16748  done
16749IFS=$as_save_IFS
16750
16751  ;;
16752esac
16753fi
16754CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16755if test -n "$CYGWIN_LINK"; then
16756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16757$as_echo "$CYGWIN_LINK" >&6; }
16758else
16759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16760$as_echo "no" >&6; }
16761fi
16762
16763
16764  if test "x$CYGWIN_LINK" != x; then
16765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16766$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16767    "$CYGWIN_LINK" --version > /dev/null
16768    if test $? -eq 0 ; then
16769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16770$as_echo "yes" >&6; }
16771    else
16772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16773$as_echo "no" >&6; }
16774      # This might be the VS linker. Don't exclude it later on.
16775      CYGWIN_LINK=""
16776    fi
16777  fi
16778
16779  # First-hand choice is to locate and run the vsvars bat file.
16780
16781  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16782    VCVARSFILE="vc/bin/vcvars32.bat"
16783  else
16784    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16785  fi
16786
16787  VS_ENV_CMD=""
16788  VS_ENV_ARGS=""
16789  if test "x$with_toolsdir" != x; then
16790
16791  if test "x$VS_ENV_CMD" = x; then
16792    VS100BASE="$with_toolsdir/../.."
16793    METHOD="--with-tools-dir"
16794
16795  windows_path="$VS100BASE"
16796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16797    unix_path=`$CYGPATH -u "$windows_path"`
16798    VS100BASE="$unix_path"
16799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16801    VS100BASE="$unix_path"
16802  fi
16803
16804    if test -d "$VS100BASE"; then
16805      if test -f "$VS100BASE/$VCVARSFILE"; then
16806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16807$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16808        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16809      else
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16811$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16814      fi
16815    fi
16816  fi
16817
16818  fi
16819
16820  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16821    # Having specified an argument which is incorrect will produce an instant failure;
16822    # we should not go on looking
16823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16824$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16825    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16826$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16827    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16828  fi
16829
16830  if test "x$VS100COMNTOOLS" != x; then
16831
16832  if test "x$VS_ENV_CMD" = x; then
16833    VS100BASE="$VS100COMNTOOLS/../.."
16834    METHOD="VS100COMNTOOLS variable"
16835
16836  windows_path="$VS100BASE"
16837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16838    unix_path=`$CYGPATH -u "$windows_path"`
16839    VS100BASE="$unix_path"
16840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16842    VS100BASE="$unix_path"
16843  fi
16844
16845    if test -d "$VS100BASE"; then
16846      if test -f "$VS100BASE/$VCVARSFILE"; then
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16848$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16849        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16850      else
16851        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16852$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16854$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16855      fi
16856    fi
16857  fi
16858
16859  fi
16860  if test "x$PROGRAMFILES" != x; then
16861
16862  if test "x$VS_ENV_CMD" = x; then
16863    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16864    METHOD="well-known name"
16865
16866  windows_path="$VS100BASE"
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868    unix_path=`$CYGPATH -u "$windows_path"`
16869    VS100BASE="$unix_path"
16870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872    VS100BASE="$unix_path"
16873  fi
16874
16875    if test -d "$VS100BASE"; then
16876      if test -f "$VS100BASE/$VCVARSFILE"; then
16877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16878$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16879        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16880      else
16881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16882$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16883        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16884$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16885      fi
16886    fi
16887  fi
16888
16889  fi
16890
16891  if test "x$VS_ENV_CMD" = x; then
16892    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16893    METHOD="well-known name"
16894
16895  windows_path="$VS100BASE"
16896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16897    unix_path=`$CYGPATH -u "$windows_path"`
16898    VS100BASE="$unix_path"
16899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16901    VS100BASE="$unix_path"
16902  fi
16903
16904    if test -d "$VS100BASE"; then
16905      if test -f "$VS100BASE/$VCVARSFILE"; then
16906        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16907$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16908        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16909      else
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16911$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16912        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16913$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16914      fi
16915    fi
16916  fi
16917
16918
16919  if test "x$VS_ENV_CMD" = x; then
16920    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16921    METHOD="well-known name"
16922
16923  windows_path="$VS100BASE"
16924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16925    unix_path=`$CYGPATH -u "$windows_path"`
16926    VS100BASE="$unix_path"
16927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16929    VS100BASE="$unix_path"
16930  fi
16931
16932    if test -d "$VS100BASE"; then
16933      if test -f "$VS100BASE/$VCVARSFILE"; then
16934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16935$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16936        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16937      else
16938        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16939$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16940        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16941$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16942      fi
16943    fi
16944  fi
16945
16946
16947  if test "x$ProgramW6432" != x; then
16948
16949  if test "x$VS_ENV_CMD" = x; then
16950    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16951    METHOD="well-known name"
16952
16953  windows_path="$WIN_SDK_BASE"
16954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16955    unix_path=`$CYGPATH -u "$windows_path"`
16956    WIN_SDK_BASE="$unix_path"
16957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16959    WIN_SDK_BASE="$unix_path"
16960  fi
16961
16962    if test -d "$WIN_SDK_BASE"; then
16963      # There have been cases of partial or broken SDK installations. A missing
16964      # lib dir is not going to work.
16965      if test ! -d "$WIN_SDK_BASE/../lib"; then
16966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16967$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16968        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16969$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16970      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16972$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16973        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16974        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16975          VS_ENV_ARGS="/x86"
16976        else
16977          VS_ENV_ARGS="/x64"
16978        fi
16979      else
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16983$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16984      fi
16985    fi
16986  fi
16987
16988  fi
16989  if test "x$PROGRAMW6432" != x; then
16990
16991  if test "x$VS_ENV_CMD" = x; then
16992    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16993    METHOD="well-known name"
16994
16995  windows_path="$WIN_SDK_BASE"
16996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16997    unix_path=`$CYGPATH -u "$windows_path"`
16998    WIN_SDK_BASE="$unix_path"
16999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17001    WIN_SDK_BASE="$unix_path"
17002  fi
17003
17004    if test -d "$WIN_SDK_BASE"; then
17005      # There have been cases of partial or broken SDK installations. A missing
17006      # lib dir is not going to work.
17007      if test ! -d "$WIN_SDK_BASE/../lib"; then
17008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17010        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17011$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17012      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17013        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17014$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17015        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17016        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17017          VS_ENV_ARGS="/x86"
17018        else
17019          VS_ENV_ARGS="/x64"
17020        fi
17021      else
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17025$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17026      fi
17027    fi
17028  fi
17029
17030  fi
17031  if test "x$PROGRAMFILES" != x; then
17032
17033  if test "x$VS_ENV_CMD" = x; then
17034    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17035    METHOD="well-known name"
17036
17037  windows_path="$WIN_SDK_BASE"
17038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17039    unix_path=`$CYGPATH -u "$windows_path"`
17040    WIN_SDK_BASE="$unix_path"
17041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17043    WIN_SDK_BASE="$unix_path"
17044  fi
17045
17046    if test -d "$WIN_SDK_BASE"; then
17047      # There have been cases of partial or broken SDK installations. A missing
17048      # lib dir is not going to work.
17049      if test ! -d "$WIN_SDK_BASE/../lib"; then
17050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17053$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17054      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17057        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17058        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17059          VS_ENV_ARGS="/x86"
17060        else
17061          VS_ENV_ARGS="/x64"
17062        fi
17063      else
17064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17067$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17068      fi
17069    fi
17070  fi
17071
17072  fi
17073
17074  if test "x$VS_ENV_CMD" = x; then
17075    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17076    METHOD="well-known name"
17077
17078  windows_path="$WIN_SDK_BASE"
17079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17080    unix_path=`$CYGPATH -u "$windows_path"`
17081    WIN_SDK_BASE="$unix_path"
17082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17084    WIN_SDK_BASE="$unix_path"
17085  fi
17086
17087    if test -d "$WIN_SDK_BASE"; then
17088      # There have been cases of partial or broken SDK installations. A missing
17089      # lib dir is not going to work.
17090      if test ! -d "$WIN_SDK_BASE/../lib"; then
17091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17092$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17093        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17094$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17095      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17098        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17099        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17100          VS_ENV_ARGS="/x86"
17101        else
17102          VS_ENV_ARGS="/x64"
17103        fi
17104      else
17105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17107        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17108$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17109      fi
17110    fi
17111  fi
17112
17113
17114  if test "x$VS_ENV_CMD" = x; then
17115    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17116    METHOD="well-known name"
17117
17118  windows_path="$WIN_SDK_BASE"
17119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17120    unix_path=`$CYGPATH -u "$windows_path"`
17121    WIN_SDK_BASE="$unix_path"
17122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17124    WIN_SDK_BASE="$unix_path"
17125  fi
17126
17127    if test -d "$WIN_SDK_BASE"; then
17128      # There have been cases of partial or broken SDK installations. A missing
17129      # lib dir is not going to work.
17130      if test ! -d "$WIN_SDK_BASE/../lib"; then
17131        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17132$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17133        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17134$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17135      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17137$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17138        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17139        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17140          VS_ENV_ARGS="/x86"
17141        else
17142          VS_ENV_ARGS="/x64"
17143        fi
17144      else
17145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17147        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17148$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17149      fi
17150    fi
17151  fi
17152
17153
17154  if test "x$VS_ENV_CMD" != x; then
17155    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17156
17157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17158
17159  # First separate the path from the arguments. This will split at the first
17160  # space.
17161  complete="$VS_ENV_CMD"
17162  path="${complete%% *}"
17163  tmp="$complete EOL"
17164  arguments="${tmp#* }"
17165
17166  # Input might be given as Windows format, start by converting to
17167  # unix format.
17168  new_path=`$CYGPATH -u "$path"`
17169
17170  # Now try to locate executable using which
17171  new_path=`$WHICH "$new_path" 2> /dev/null`
17172  # bat and cmd files are not always considered executable in cygwin causing which
17173  # to not find them
17174  if test "x$new_path" = x \
17175      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17176      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17177    new_path=`$CYGPATH -u "$path"`
17178  fi
17179  if test "x$new_path" = x; then
17180    # Oops. Which didn't find the executable.
17181    # The splitting of arguments from the executable at a space might have been incorrect,
17182    # since paths with space are more likely in Windows. Give it another try with the whole
17183    # argument.
17184    path="$complete"
17185    arguments="EOL"
17186    new_path=`$CYGPATH -u "$path"`
17187    new_path=`$WHICH "$new_path" 2> /dev/null`
17188    # bat and cmd files are not always considered executable in cygwin causing which
17189    # to not find them
17190    if test "x$new_path" = x \
17191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17193      new_path=`$CYGPATH -u "$path"`
17194    fi
17195    if test "x$new_path" = x; then
17196      # It's still not found. Now this is an unrecoverable error.
17197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17198$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17199      has_space=`$ECHO "$complete" | $GREP " "`
17200      if test "x$has_space" != x; then
17201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17203      fi
17204      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17205    fi
17206  fi
17207
17208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17211  # "foo.exe" is OK but "foo" is an error.
17212  #
17213  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17214  # It is also a way to make sure we got the proper file name for the real test later on.
17215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17216  if test "x$test_shortpath" = x; then
17217    # Short path failed, file does not exist as specified.
17218    # Try adding .exe or .cmd
17219    if test -f "${new_path}.exe"; then
17220      input_to_shortpath="${new_path}.exe"
17221    elif test -f "${new_path}.cmd"; then
17222      input_to_shortpath="${new_path}.cmd"
17223    else
17224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17225$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17226      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17227$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17228      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17229    fi
17230  else
17231    input_to_shortpath="$new_path"
17232  fi
17233
17234  # Call helper function which possibly converts this using DOS-style short mode.
17235  # If so, the updated path is stored in $new_path.
17236  new_path="$input_to_shortpath"
17237
17238  input_path="$input_to_shortpath"
17239  # Check if we need to convert this using DOS-style short mode. If the path
17240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17241  # take no chances and rewrite it.
17242  # Note: m4 eats our [], so we need to use [ and ] instead.
17243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17244  if test "x$has_forbidden_chars" != x; then
17245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17249      # Going to short mode and back again did indeed matter. Since short mode is
17250      # case insensitive, let's make it lowercase to improve readability.
17251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17252      # Now convert it back to Unix-stile (cygpath)
17253      input_path=`$CYGPATH -u "$shortmode_path"`
17254      new_path="$input_path"
17255    fi
17256  fi
17257
17258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17259  if test "x$test_cygdrive_prefix" = x; then
17260    # As a simple fix, exclude /usr/bin since it's not a real path.
17261    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17263      # a path prefixed by /cygdrive for fixpath to work.
17264      new_path="$CYGWIN_ROOT_PATH$input_path"
17265    fi
17266  fi
17267
17268  # remove trailing .exe if any
17269  new_path="${new_path/%.exe/}"
17270
17271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17272
17273  # First separate the path from the arguments. This will split at the first
17274  # space.
17275  complete="$VS_ENV_CMD"
17276  path="${complete%% *}"
17277  tmp="$complete EOL"
17278  arguments="${tmp#* }"
17279
17280  # Input might be given as Windows format, start by converting to
17281  # unix format.
17282  new_path="$path"
17283
17284  windows_path="$new_path"
17285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17286    unix_path=`$CYGPATH -u "$windows_path"`
17287    new_path="$unix_path"
17288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17290    new_path="$unix_path"
17291  fi
17292
17293
17294  # Now try to locate executable using which
17295  new_path=`$WHICH "$new_path" 2> /dev/null`
17296
17297  if test "x$new_path" = x; then
17298    # Oops. Which didn't find the executable.
17299    # The splitting of arguments from the executable at a space might have been incorrect,
17300    # since paths with space are more likely in Windows. Give it another try with the whole
17301    # argument.
17302    path="$complete"
17303    arguments="EOL"
17304    new_path="$path"
17305
17306  windows_path="$new_path"
17307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17308    unix_path=`$CYGPATH -u "$windows_path"`
17309    new_path="$unix_path"
17310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17312    new_path="$unix_path"
17313  fi
17314
17315
17316    new_path=`$WHICH "$new_path" 2> /dev/null`
17317
17318    if test "x$new_path" = x; then
17319      # It's still not found. Now this is an unrecoverable error.
17320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17321$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17322      has_space=`$ECHO "$complete" | $GREP " "`
17323      if test "x$has_space" != x; then
17324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17326      fi
17327      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17328    fi
17329  fi
17330
17331  # Now new_path has a complete unix path to the binary
17332  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17333    # Keep paths in /bin as-is, but remove trailing .exe if any
17334    new_path="${new_path/%.exe/}"
17335    # Do not save /bin paths to all_fixpath_prefixes!
17336  else
17337    # Not in mixed or Windows style, start by that.
17338    new_path=`cmd //c echo $new_path`
17339
17340  input_path="$new_path"
17341  # Check if we need to convert this using DOS-style short mode. If the path
17342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17343  # take no chances and rewrite it.
17344  # Note: m4 eats our [], so we need to use [ and ] instead.
17345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17346  if test "x$has_forbidden_chars" != x; then
17347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17349  fi
17350
17351    # Output is in $new_path
17352
17353  windows_path="$new_path"
17354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17355    unix_path=`$CYGPATH -u "$windows_path"`
17356    new_path="$unix_path"
17357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17359    new_path="$unix_path"
17360  fi
17361
17362    # remove trailing .exe if any
17363    new_path="${new_path/%.exe/}"
17364
17365    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17366    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17367  fi
17368
17369  else
17370    # We're on a posix platform. Hooray! :)
17371    # First separate the path from the arguments. This will split at the first
17372    # space.
17373    complete="$VS_ENV_CMD"
17374    path="${complete%% *}"
17375    tmp="$complete EOL"
17376    arguments="${tmp#* }"
17377
17378    # Cannot rely on the command "which" here since it doesn't always work.
17379    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17380    if test -z "$is_absolute_path"; then
17381      # Path to executable is not absolute. Find it.
17382      IFS_save="$IFS"
17383      IFS=:
17384      for p in $PATH; do
17385        if test -f "$p/$path" && test -x "$p/$path"; then
17386          new_path="$p/$path"
17387          break
17388        fi
17389      done
17390      IFS="$IFS_save"
17391    else
17392      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17393$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17394      new_path="$path"
17395    fi
17396
17397    if test "x$new_path" = x; then
17398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17399$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17400      has_space=`$ECHO "$complete" | $GREP " "`
17401      if test "x$has_space" != x; then
17402        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17404      fi
17405      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17406    fi
17407  fi
17408
17409  # Now join together the path and the arguments once again
17410  if test "x$arguments" != xEOL; then
17411    new_complete="$new_path ${arguments% *}"
17412  else
17413    new_complete="$new_path"
17414  fi
17415
17416  if test "x$complete" != "x$new_complete"; then
17417    VS_ENV_CMD="$new_complete"
17418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17419$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17420  fi
17421
17422
17423    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17425$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17426    cd $OUTPUT_ROOT
17427    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17428    # to autoconf standards.
17429
17430    #----
17431
17432    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17433    # but calculate the difference in Cygwin environment before/after running it and then
17434    # apply the diff.
17435
17436    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17437      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17438      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17439      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17440    else
17441      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17442      _dosbash=`cmd //c echo \`which bash\``
17443    fi
17444
17445    # generate the set of exported vars before/after the vs10 setup
17446    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17447    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17448    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17449    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17450
17451    # Now execute the newly created bat file.
17452    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17453    cmd /c localdevenvtmp.bat | cat
17454
17455    # apply the diff (less some non-vs10 vars named by "!")
17456    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17457    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17458    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17459
17460    # cleanup
17461    $RM localdevenvtmp*
17462    #----
17463    cd $CURDIR
17464    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17466$as_echo "no" >&6; }
17467      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17468$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17469      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17470$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17471      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17472$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17473      as_fn_error $? "Cannot continue" "$LINENO" 5
17474    fi
17475
17476    # Now set all paths and other env variables. This will allow the rest of
17477    # the configure script to find and run the compiler in the proper way.
17478    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17479$as_echo "$as_me: Setting extracted environment variables" >&6;}
17480    . $OUTPUT_ROOT/localdevenv.sh
17481  else
17482    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17483    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17484$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17485  fi
17486
17487  # At this point, we should have corrent variables in the environment, or we can't continue.
17488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17489$as_echo_n "checking for Visual Studio variables... " >&6; }
17490
17491  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17492    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17494$as_echo "present but broken" >&6; }
17495      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17496    else
17497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17498$as_echo "ok" >&6; }
17499      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17500      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17501      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17502      # Remove any paths containing # (typically F#) as that messes up make
17503      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17504      VS_PATH="$PATH"
17505
17506
17507
17508    fi
17509  else
17510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17511$as_echo "not found" >&6; }
17512
17513    if test "x$VS_ENV_CMD" = x; then
17514      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17515$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17516      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17517$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17518    else
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17520$as_echo "$as_me: Running the extraction script failed." >&6;}
17521    fi
17522    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17523$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17524    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17525$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17526    as_fn_error $? "Cannot continue" "$LINENO" 5
17527  fi
17528
17529
17530
17531# Check whether --with-msvcr-dll was given.
17532if test "${with_msvcr_dll+set}" = set; then :
17533  withval=$with_msvcr_dll;
17534fi
17535
17536
17537  if test "x$with_msvcr_dll" != x; then
17538    # If given explicitely by user, do not probe. If not present, fail directly.
17539
17540  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17541  METHOD="--with-msvcr-dll"
17542  if test -e "$POSSIBLE_MSVCR_DLL"; then
17543    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17544$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17545
17546    # Need to check if the found msvcr is correct architecture
17547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17548$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17549    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17550    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17551      CORRECT_MSVCR_ARCH=386
17552    else
17553      CORRECT_MSVCR_ARCH=x86-64
17554    fi
17555    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17557$as_echo "ok" >&6; }
17558      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17560$as_echo_n "checking for msvcr100.dll... " >&6; }
17561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17562$as_echo "$MSVCR_DLL" >&6; }
17563    else
17564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17565$as_echo "incorrect, ignoring" >&6; }
17566      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17567$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17568    fi
17569  fi
17570
17571    if test "x$MSVCR_DLL" = x; then
17572      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17573    fi
17574  fi
17575
17576  if test "x$MSVCR_DLL" = x; then
17577    # Probe: Using well-known location from Visual Studio 10.0
17578    if test "x$VCINSTALLDIR" != x; then
17579      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17580
17581  windows_path="$CYGWIN_VC_INSTALL_DIR"
17582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17583    unix_path=`$CYGPATH -u "$windows_path"`
17584    CYGWIN_VC_INSTALL_DIR="$unix_path"
17585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17587    CYGWIN_VC_INSTALL_DIR="$unix_path"
17588  fi
17589
17590      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17591        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17592      else
17593        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17594      fi
17595
17596  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17597  METHOD="well-known location in VCINSTALLDIR"
17598  if test -e "$POSSIBLE_MSVCR_DLL"; then
17599    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17600$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17601
17602    # Need to check if the found msvcr is correct architecture
17603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17604$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17605    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17606    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17607      CORRECT_MSVCR_ARCH=386
17608    else
17609      CORRECT_MSVCR_ARCH=x86-64
17610    fi
17611    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17613$as_echo "ok" >&6; }
17614      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17616$as_echo_n "checking for msvcr100.dll... " >&6; }
17617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17618$as_echo "$MSVCR_DLL" >&6; }
17619    else
17620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17621$as_echo "incorrect, ignoring" >&6; }
17622      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17623$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17624    fi
17625  fi
17626
17627    fi
17628  fi
17629
17630  if test "x$MSVCR_DLL" = x; then
17631    # Probe: Check in the Boot JDK directory.
17632    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17633
17634  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17635  METHOD="well-known location in Boot JDK"
17636  if test -e "$POSSIBLE_MSVCR_DLL"; then
17637    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17638$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17639
17640    # Need to check if the found msvcr is correct architecture
17641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17642$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17643    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17644    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17645      CORRECT_MSVCR_ARCH=386
17646    else
17647      CORRECT_MSVCR_ARCH=x86-64
17648    fi
17649    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17651$as_echo "ok" >&6; }
17652      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17654$as_echo_n "checking for msvcr100.dll... " >&6; }
17655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17656$as_echo "$MSVCR_DLL" >&6; }
17657    else
17658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17659$as_echo "incorrect, ignoring" >&6; }
17660      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17661$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17662    fi
17663  fi
17664
17665  fi
17666
17667  if test "x$MSVCR_DLL" = x; then
17668    # Probe: Look in the Windows system32 directory
17669    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17670
17671  windows_path="$CYGWIN_SYSTEMROOT"
17672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17673    unix_path=`$CYGPATH -u "$windows_path"`
17674    CYGWIN_SYSTEMROOT="$unix_path"
17675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17677    CYGWIN_SYSTEMROOT="$unix_path"
17678  fi
17679
17680    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17681
17682  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17683  METHOD="well-known location in SYSTEMROOT"
17684  if test -e "$POSSIBLE_MSVCR_DLL"; then
17685    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17686$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17687
17688    # Need to check if the found msvcr is correct architecture
17689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17690$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17691    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17692    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17693      CORRECT_MSVCR_ARCH=386
17694    else
17695      CORRECT_MSVCR_ARCH=x86-64
17696    fi
17697    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17699$as_echo "ok" >&6; }
17700      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17702$as_echo_n "checking for msvcr100.dll... " >&6; }
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17704$as_echo "$MSVCR_DLL" >&6; }
17705    else
17706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17707$as_echo "incorrect, ignoring" >&6; }
17708      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17709$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17710    fi
17711  fi
17712
17713  fi
17714
17715  if test "x$MSVCR_DLL" = x; then
17716    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17717    if test "x$VS100COMNTOOLS" != x; then
17718      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17719
17720  windows_path="$CYGWIN_VS_TOOLS_DIR"
17721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17722    unix_path=`$CYGPATH -u "$windows_path"`
17723    CYGWIN_VS_TOOLS_DIR="$unix_path"
17724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17726    CYGWIN_VS_TOOLS_DIR="$unix_path"
17727  fi
17728
17729      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17730        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17731      else
17732        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17733      fi
17734
17735  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17736  METHOD="search of VS100COMNTOOLS"
17737  if test -e "$POSSIBLE_MSVCR_DLL"; then
17738    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17739$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17740
17741    # Need to check if the found msvcr is correct architecture
17742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17743$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17744    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17745    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17746      CORRECT_MSVCR_ARCH=386
17747    else
17748      CORRECT_MSVCR_ARCH=x86-64
17749    fi
17750    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17752$as_echo "ok" >&6; }
17753      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17754      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17755$as_echo_n "checking for msvcr100.dll... " >&6; }
17756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17757$as_echo "$MSVCR_DLL" >&6; }
17758    else
17759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17760$as_echo "incorrect, ignoring" >&6; }
17761      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17762$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17763    fi
17764  fi
17765
17766    fi
17767  fi
17768
17769  if test "x$MSVCR_DLL" = x; then
17770    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17771    # (This was the original behaviour; kept since it might turn up something)
17772    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17773      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17774        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17775      else
17776        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17777        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17778          # We're grasping at straws now...
17779          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17780        fi
17781      fi
17782
17783
17784  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17785  METHOD="search of VCINSTALLDIR"
17786  if test -e "$POSSIBLE_MSVCR_DLL"; then
17787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17788$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17789
17790    # Need to check if the found msvcr is correct architecture
17791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17792$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17793    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17794    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17795      CORRECT_MSVCR_ARCH=386
17796    else
17797      CORRECT_MSVCR_ARCH=x86-64
17798    fi
17799    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17801$as_echo "ok" >&6; }
17802      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17804$as_echo_n "checking for msvcr100.dll... " >&6; }
17805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17806$as_echo "$MSVCR_DLL" >&6; }
17807    else
17808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17809$as_echo "incorrect, ignoring" >&6; }
17810      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17811$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17812    fi
17813  fi
17814
17815    fi
17816  fi
17817
17818  if test "x$MSVCR_DLL" = x; then
17819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17820$as_echo_n "checking for msvcr100.dll... " >&6; }
17821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17822$as_echo "no" >&6; }
17823    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17824  fi
17825
17826
17827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17828
17829  # Input might be given as Windows format, start by converting to
17830  # unix format.
17831  path="$MSVCR_DLL"
17832  new_path=`$CYGPATH -u "$path"`
17833
17834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17837  # "foo.exe" is OK but "foo" is an error.
17838  #
17839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17840  # It is also a way to make sure we got the proper file name for the real test later on.
17841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17842  if test "x$test_shortpath" = x; then
17843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17844$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17845    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17846  fi
17847
17848  # Call helper function which possibly converts this using DOS-style short mode.
17849  # If so, the updated path is stored in $new_path.
17850
17851  input_path="$new_path"
17852  # Check if we need to convert this using DOS-style short mode. If the path
17853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17854  # take no chances and rewrite it.
17855  # Note: m4 eats our [], so we need to use [ and ] instead.
17856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17857  if test "x$has_forbidden_chars" != x; then
17858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17862      # Going to short mode and back again did indeed matter. Since short mode is
17863      # case insensitive, let's make it lowercase to improve readability.
17864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17865      # Now convert it back to Unix-stile (cygpath)
17866      input_path=`$CYGPATH -u "$shortmode_path"`
17867      new_path="$input_path"
17868    fi
17869  fi
17870
17871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17872  if test "x$test_cygdrive_prefix" = x; then
17873    # As a simple fix, exclude /usr/bin since it's not a real path.
17874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17876      # a path prefixed by /cygdrive for fixpath to work.
17877      new_path="$CYGWIN_ROOT_PATH$input_path"
17878    fi
17879  fi
17880
17881
17882  if test "x$path" != "x$new_path"; then
17883    MSVCR_DLL="$new_path"
17884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17885$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17886  fi
17887
17888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17889
17890  path="$MSVCR_DLL"
17891  has_colon=`$ECHO $path | $GREP ^.:`
17892  new_path="$path"
17893  if test "x$has_colon" = x; then
17894    # Not in mixed or Windows style, start by that.
17895    new_path=`cmd //c echo $path`
17896  fi
17897
17898
17899  input_path="$new_path"
17900  # Check if we need to convert this using DOS-style short mode. If the path
17901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17902  # take no chances and rewrite it.
17903  # Note: m4 eats our [], so we need to use [ and ] instead.
17904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17905  if test "x$has_forbidden_chars" != x; then
17906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17908  fi
17909
17910
17911  windows_path="$new_path"
17912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17913    unix_path=`$CYGPATH -u "$windows_path"`
17914    new_path="$unix_path"
17915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17917    new_path="$unix_path"
17918  fi
17919
17920  if test "x$path" != "x$new_path"; then
17921    MSVCR_DLL="$new_path"
17922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17923$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17924  fi
17925
17926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17928
17929  else
17930    # We're on a posix platform. Hooray! :)
17931    path="$MSVCR_DLL"
17932    has_space=`$ECHO "$path" | $GREP " "`
17933    if test "x$has_space" != x; then
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17935$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17937    fi
17938
17939    # Use eval to expand a potential ~
17940    eval path="$path"
17941    if test ! -f "$path" && test ! -d "$path"; then
17942      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17943    fi
17944
17945    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17946  fi
17947
17948
17949
17950
17951# Check whether --with-dxsdk was given.
17952if test "${with_dxsdk+set}" = set; then :
17953  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17954$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17955fi
17956
17957
17958
17959
17960# Check whether --with-dxsdk-lib was given.
17961if test "${with_dxsdk_lib+set}" = set; then :
17962  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17963$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17964fi
17965
17966
17967
17968
17969# Check whether --with-dxsdk-include was given.
17970if test "${with_dxsdk_include+set}" = set; then :
17971  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17972$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17973fi
17974
17975
17976  fi
17977
17978
17979
17980  # If --build AND --host is set, then the configure script will find any
17981  # cross compilation tools in the PATH. Cross compilation tools
17982  # follows the cross compilation standard where they are prefixed with ${host}.
17983  # For example the binary i686-sun-solaris2.10-gcc
17984  # will cross compile for i686-sun-solaris2.10
17985  # If neither of build and host is not set, then build=host and the
17986  # default compiler found in the path will be used.
17987  # Setting only --host, does not seem to be really supported.
17988  # Please set both --build and --host if you want to cross compile.
17989
17990  if test "x$COMPILE_TYPE" = "xcross"; then
17991    # Now we to find a C/C++ compiler that can build executables for the build
17992    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17993    # once. Also, we need to do this before adding a tools dir to the path,
17994    # otherwise we might pick up cross-compilers which don't use standard naming.
17995    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17996    # to wait until they are properly discovered.
17997    for ac_prog in cl cc gcc
17998do
17999  # Extract the first word of "$ac_prog", so it can be a program name with args.
18000set dummy $ac_prog; ac_word=$2
18001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18002$as_echo_n "checking for $ac_word... " >&6; }
18003if ${ac_cv_path_BUILD_CC+:} false; then :
18004  $as_echo_n "(cached) " >&6
18005else
18006  case $BUILD_CC in
18007  [\\/]* | ?:[\\/]*)
18008  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18009  ;;
18010  *)
18011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18012for as_dir in $PATH
18013do
18014  IFS=$as_save_IFS
18015  test -z "$as_dir" && as_dir=.
18016    for ac_exec_ext in '' $ac_executable_extensions; do
18017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18018    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18020    break 2
18021  fi
18022done
18023  done
18024IFS=$as_save_IFS
18025
18026  ;;
18027esac
18028fi
18029BUILD_CC=$ac_cv_path_BUILD_CC
18030if test -n "$BUILD_CC"; then
18031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18032$as_echo "$BUILD_CC" >&6; }
18033else
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18035$as_echo "no" >&6; }
18036fi
18037
18038
18039  test -n "$BUILD_CC" && break
18040done
18041
18042
18043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18044
18045  # First separate the path from the arguments. This will split at the first
18046  # space.
18047  complete="$BUILD_CC"
18048  path="${complete%% *}"
18049  tmp="$complete EOL"
18050  arguments="${tmp#* }"
18051
18052  # Input might be given as Windows format, start by converting to
18053  # unix format.
18054  new_path=`$CYGPATH -u "$path"`
18055
18056  # Now try to locate executable using which
18057  new_path=`$WHICH "$new_path" 2> /dev/null`
18058  # bat and cmd files are not always considered executable in cygwin causing which
18059  # to not find them
18060  if test "x$new_path" = x \
18061      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18062      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18063    new_path=`$CYGPATH -u "$path"`
18064  fi
18065  if test "x$new_path" = x; then
18066    # Oops. Which didn't find the executable.
18067    # The splitting of arguments from the executable at a space might have been incorrect,
18068    # since paths with space are more likely in Windows. Give it another try with the whole
18069    # argument.
18070    path="$complete"
18071    arguments="EOL"
18072    new_path=`$CYGPATH -u "$path"`
18073    new_path=`$WHICH "$new_path" 2> /dev/null`
18074    # bat and cmd files are not always considered executable in cygwin causing which
18075    # to not find them
18076    if test "x$new_path" = x \
18077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18079      new_path=`$CYGPATH -u "$path"`
18080    fi
18081    if test "x$new_path" = x; then
18082      # It's still not found. Now this is an unrecoverable error.
18083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18084$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18085      has_space=`$ECHO "$complete" | $GREP " "`
18086      if test "x$has_space" != x; then
18087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18089      fi
18090      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18091    fi
18092  fi
18093
18094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18097  # "foo.exe" is OK but "foo" is an error.
18098  #
18099  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18100  # It is also a way to make sure we got the proper file name for the real test later on.
18101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18102  if test "x$test_shortpath" = x; then
18103    # Short path failed, file does not exist as specified.
18104    # Try adding .exe or .cmd
18105    if test -f "${new_path}.exe"; then
18106      input_to_shortpath="${new_path}.exe"
18107    elif test -f "${new_path}.cmd"; then
18108      input_to_shortpath="${new_path}.cmd"
18109    else
18110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18111$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18112      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18113$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18114      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18115    fi
18116  else
18117    input_to_shortpath="$new_path"
18118  fi
18119
18120  # Call helper function which possibly converts this using DOS-style short mode.
18121  # If so, the updated path is stored in $new_path.
18122  new_path="$input_to_shortpath"
18123
18124  input_path="$input_to_shortpath"
18125  # Check if we need to convert this using DOS-style short mode. If the path
18126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18127  # take no chances and rewrite it.
18128  # Note: m4 eats our [], so we need to use [ and ] instead.
18129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18130  if test "x$has_forbidden_chars" != x; then
18131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18135      # Going to short mode and back again did indeed matter. Since short mode is
18136      # case insensitive, let's make it lowercase to improve readability.
18137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18138      # Now convert it back to Unix-stile (cygpath)
18139      input_path=`$CYGPATH -u "$shortmode_path"`
18140      new_path="$input_path"
18141    fi
18142  fi
18143
18144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18145  if test "x$test_cygdrive_prefix" = x; then
18146    # As a simple fix, exclude /usr/bin since it's not a real path.
18147    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18149      # a path prefixed by /cygdrive for fixpath to work.
18150      new_path="$CYGWIN_ROOT_PATH$input_path"
18151    fi
18152  fi
18153
18154  # remove trailing .exe if any
18155  new_path="${new_path/%.exe/}"
18156
18157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18158
18159  # First separate the path from the arguments. This will split at the first
18160  # space.
18161  complete="$BUILD_CC"
18162  path="${complete%% *}"
18163  tmp="$complete EOL"
18164  arguments="${tmp#* }"
18165
18166  # Input might be given as Windows format, start by converting to
18167  # unix format.
18168  new_path="$path"
18169
18170  windows_path="$new_path"
18171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18172    unix_path=`$CYGPATH -u "$windows_path"`
18173    new_path="$unix_path"
18174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18176    new_path="$unix_path"
18177  fi
18178
18179
18180  # Now try to locate executable using which
18181  new_path=`$WHICH "$new_path" 2> /dev/null`
18182
18183  if test "x$new_path" = x; then
18184    # Oops. Which didn't find the executable.
18185    # The splitting of arguments from the executable at a space might have been incorrect,
18186    # since paths with space are more likely in Windows. Give it another try with the whole
18187    # argument.
18188    path="$complete"
18189    arguments="EOL"
18190    new_path="$path"
18191
18192  windows_path="$new_path"
18193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18194    unix_path=`$CYGPATH -u "$windows_path"`
18195    new_path="$unix_path"
18196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18198    new_path="$unix_path"
18199  fi
18200
18201
18202    new_path=`$WHICH "$new_path" 2> /dev/null`
18203
18204    if test "x$new_path" = x; then
18205      # It's still not found. Now this is an unrecoverable error.
18206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18207$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18208      has_space=`$ECHO "$complete" | $GREP " "`
18209      if test "x$has_space" != x; then
18210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18212      fi
18213      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18214    fi
18215  fi
18216
18217  # Now new_path has a complete unix path to the binary
18218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18219    # Keep paths in /bin as-is, but remove trailing .exe if any
18220    new_path="${new_path/%.exe/}"
18221    # Do not save /bin paths to all_fixpath_prefixes!
18222  else
18223    # Not in mixed or Windows style, start by that.
18224    new_path=`cmd //c echo $new_path`
18225
18226  input_path="$new_path"
18227  # Check if we need to convert this using DOS-style short mode. If the path
18228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18229  # take no chances and rewrite it.
18230  # Note: m4 eats our [], so we need to use [ and ] instead.
18231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18232  if test "x$has_forbidden_chars" != x; then
18233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18235  fi
18236
18237    # Output is in $new_path
18238
18239  windows_path="$new_path"
18240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18241    unix_path=`$CYGPATH -u "$windows_path"`
18242    new_path="$unix_path"
18243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18245    new_path="$unix_path"
18246  fi
18247
18248    # remove trailing .exe if any
18249    new_path="${new_path/%.exe/}"
18250
18251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18253  fi
18254
18255  else
18256    # We're on a posix platform. Hooray! :)
18257    # First separate the path from the arguments. This will split at the first
18258    # space.
18259    complete="$BUILD_CC"
18260    path="${complete%% *}"
18261    tmp="$complete EOL"
18262    arguments="${tmp#* }"
18263
18264    # Cannot rely on the command "which" here since it doesn't always work.
18265    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18266    if test -z "$is_absolute_path"; then
18267      # Path to executable is not absolute. Find it.
18268      IFS_save="$IFS"
18269      IFS=:
18270      for p in $PATH; do
18271        if test -f "$p/$path" && test -x "$p/$path"; then
18272          new_path="$p/$path"
18273          break
18274        fi
18275      done
18276      IFS="$IFS_save"
18277    else
18278      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18279$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18280      new_path="$path"
18281    fi
18282
18283    if test "x$new_path" = x; then
18284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18285$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18286      has_space=`$ECHO "$complete" | $GREP " "`
18287      if test "x$has_space" != x; then
18288        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18290      fi
18291      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18292    fi
18293  fi
18294
18295  # Now join together the path and the arguments once again
18296  if test "x$arguments" != xEOL; then
18297    new_complete="$new_path ${arguments% *}"
18298  else
18299    new_complete="$new_path"
18300  fi
18301
18302  if test "x$complete" != "x$new_complete"; then
18303    BUILD_CC="$new_complete"
18304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18305$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18306  fi
18307
18308    for ac_prog in cl CC g++
18309do
18310  # Extract the first word of "$ac_prog", so it can be a program name with args.
18311set dummy $ac_prog; ac_word=$2
18312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18313$as_echo_n "checking for $ac_word... " >&6; }
18314if ${ac_cv_path_BUILD_CXX+:} false; then :
18315  $as_echo_n "(cached) " >&6
18316else
18317  case $BUILD_CXX in
18318  [\\/]* | ?:[\\/]*)
18319  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18320  ;;
18321  *)
18322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18323for as_dir in $PATH
18324do
18325  IFS=$as_save_IFS
18326  test -z "$as_dir" && as_dir=.
18327    for ac_exec_ext in '' $ac_executable_extensions; do
18328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18329    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18331    break 2
18332  fi
18333done
18334  done
18335IFS=$as_save_IFS
18336
18337  ;;
18338esac
18339fi
18340BUILD_CXX=$ac_cv_path_BUILD_CXX
18341if test -n "$BUILD_CXX"; then
18342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18343$as_echo "$BUILD_CXX" >&6; }
18344else
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18346$as_echo "no" >&6; }
18347fi
18348
18349
18350  test -n "$BUILD_CXX" && break
18351done
18352
18353
18354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355
18356  # First separate the path from the arguments. This will split at the first
18357  # space.
18358  complete="$BUILD_CXX"
18359  path="${complete%% *}"
18360  tmp="$complete EOL"
18361  arguments="${tmp#* }"
18362
18363  # Input might be given as Windows format, start by converting to
18364  # unix format.
18365  new_path=`$CYGPATH -u "$path"`
18366
18367  # Now try to locate executable using which
18368  new_path=`$WHICH "$new_path" 2> /dev/null`
18369  # bat and cmd files are not always considered executable in cygwin causing which
18370  # to not find them
18371  if test "x$new_path" = x \
18372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18374    new_path=`$CYGPATH -u "$path"`
18375  fi
18376  if test "x$new_path" = x; then
18377    # Oops. Which didn't find the executable.
18378    # The splitting of arguments from the executable at a space might have been incorrect,
18379    # since paths with space are more likely in Windows. Give it another try with the whole
18380    # argument.
18381    path="$complete"
18382    arguments="EOL"
18383    new_path=`$CYGPATH -u "$path"`
18384    new_path=`$WHICH "$new_path" 2> /dev/null`
18385    # bat and cmd files are not always considered executable in cygwin causing which
18386    # to not find them
18387    if test "x$new_path" = x \
18388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18390      new_path=`$CYGPATH -u "$path"`
18391    fi
18392    if test "x$new_path" = x; then
18393      # It's still not found. Now this is an unrecoverable error.
18394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18395$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18396      has_space=`$ECHO "$complete" | $GREP " "`
18397      if test "x$has_space" != x; then
18398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18400      fi
18401      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18402    fi
18403  fi
18404
18405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18408  # "foo.exe" is OK but "foo" is an error.
18409  #
18410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18411  # It is also a way to make sure we got the proper file name for the real test later on.
18412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18413  if test "x$test_shortpath" = x; then
18414    # Short path failed, file does not exist as specified.
18415    # Try adding .exe or .cmd
18416    if test -f "${new_path}.exe"; then
18417      input_to_shortpath="${new_path}.exe"
18418    elif test -f "${new_path}.cmd"; then
18419      input_to_shortpath="${new_path}.cmd"
18420    else
18421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18422$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18425      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18426    fi
18427  else
18428    input_to_shortpath="$new_path"
18429  fi
18430
18431  # Call helper function which possibly converts this using DOS-style short mode.
18432  # If so, the updated path is stored in $new_path.
18433  new_path="$input_to_shortpath"
18434
18435  input_path="$input_to_shortpath"
18436  # Check if we need to convert this using DOS-style short mode. If the path
18437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18438  # take no chances and rewrite it.
18439  # Note: m4 eats our [], so we need to use [ and ] instead.
18440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18441  if test "x$has_forbidden_chars" != x; then
18442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18446      # Going to short mode and back again did indeed matter. Since short mode is
18447      # case insensitive, let's make it lowercase to improve readability.
18448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18449      # Now convert it back to Unix-stile (cygpath)
18450      input_path=`$CYGPATH -u "$shortmode_path"`
18451      new_path="$input_path"
18452    fi
18453  fi
18454
18455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18456  if test "x$test_cygdrive_prefix" = x; then
18457    # As a simple fix, exclude /usr/bin since it's not a real path.
18458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18460      # a path prefixed by /cygdrive for fixpath to work.
18461      new_path="$CYGWIN_ROOT_PATH$input_path"
18462    fi
18463  fi
18464
18465  # remove trailing .exe if any
18466  new_path="${new_path/%.exe/}"
18467
18468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18469
18470  # First separate the path from the arguments. This will split at the first
18471  # space.
18472  complete="$BUILD_CXX"
18473  path="${complete%% *}"
18474  tmp="$complete EOL"
18475  arguments="${tmp#* }"
18476
18477  # Input might be given as Windows format, start by converting to
18478  # unix format.
18479  new_path="$path"
18480
18481  windows_path="$new_path"
18482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18483    unix_path=`$CYGPATH -u "$windows_path"`
18484    new_path="$unix_path"
18485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18487    new_path="$unix_path"
18488  fi
18489
18490
18491  # Now try to locate executable using which
18492  new_path=`$WHICH "$new_path" 2> /dev/null`
18493
18494  if test "x$new_path" = x; then
18495    # Oops. Which didn't find the executable.
18496    # The splitting of arguments from the executable at a space might have been incorrect,
18497    # since paths with space are more likely in Windows. Give it another try with the whole
18498    # argument.
18499    path="$complete"
18500    arguments="EOL"
18501    new_path="$path"
18502
18503  windows_path="$new_path"
18504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18505    unix_path=`$CYGPATH -u "$windows_path"`
18506    new_path="$unix_path"
18507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18509    new_path="$unix_path"
18510  fi
18511
18512
18513    new_path=`$WHICH "$new_path" 2> /dev/null`
18514
18515    if test "x$new_path" = x; then
18516      # It's still not found. Now this is an unrecoverable error.
18517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18518$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18519      has_space=`$ECHO "$complete" | $GREP " "`
18520      if test "x$has_space" != x; then
18521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18523      fi
18524      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18525    fi
18526  fi
18527
18528  # Now new_path has a complete unix path to the binary
18529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18530    # Keep paths in /bin as-is, but remove trailing .exe if any
18531    new_path="${new_path/%.exe/}"
18532    # Do not save /bin paths to all_fixpath_prefixes!
18533  else
18534    # Not in mixed or Windows style, start by that.
18535    new_path=`cmd //c echo $new_path`
18536
18537  input_path="$new_path"
18538  # Check if we need to convert this using DOS-style short mode. If the path
18539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18540  # take no chances and rewrite it.
18541  # Note: m4 eats our [], so we need to use [ and ] instead.
18542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18543  if test "x$has_forbidden_chars" != x; then
18544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18546  fi
18547
18548    # Output is in $new_path
18549
18550  windows_path="$new_path"
18551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552    unix_path=`$CYGPATH -u "$windows_path"`
18553    new_path="$unix_path"
18554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18556    new_path="$unix_path"
18557  fi
18558
18559    # remove trailing .exe if any
18560    new_path="${new_path/%.exe/}"
18561
18562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18564  fi
18565
18566  else
18567    # We're on a posix platform. Hooray! :)
18568    # First separate the path from the arguments. This will split at the first
18569    # space.
18570    complete="$BUILD_CXX"
18571    path="${complete%% *}"
18572    tmp="$complete EOL"
18573    arguments="${tmp#* }"
18574
18575    # Cannot rely on the command "which" here since it doesn't always work.
18576    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18577    if test -z "$is_absolute_path"; then
18578      # Path to executable is not absolute. Find it.
18579      IFS_save="$IFS"
18580      IFS=:
18581      for p in $PATH; do
18582        if test -f "$p/$path" && test -x "$p/$path"; then
18583          new_path="$p/$path"
18584          break
18585        fi
18586      done
18587      IFS="$IFS_save"
18588    else
18589      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18590$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18591      new_path="$path"
18592    fi
18593
18594    if test "x$new_path" = x; then
18595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18596$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18597      has_space=`$ECHO "$complete" | $GREP " "`
18598      if test "x$has_space" != x; then
18599        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18601      fi
18602      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18603    fi
18604  fi
18605
18606  # Now join together the path and the arguments once again
18607  if test "x$arguments" != xEOL; then
18608    new_complete="$new_path ${arguments% *}"
18609  else
18610    new_complete="$new_path"
18611  fi
18612
18613  if test "x$complete" != "x$new_complete"; then
18614    BUILD_CXX="$new_complete"
18615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18616$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18617  fi
18618
18619    # Extract the first word of "ld", so it can be a program name with args.
18620set dummy ld; ac_word=$2
18621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18622$as_echo_n "checking for $ac_word... " >&6; }
18623if ${ac_cv_path_BUILD_LD+:} false; then :
18624  $as_echo_n "(cached) " >&6
18625else
18626  case $BUILD_LD in
18627  [\\/]* | ?:[\\/]*)
18628  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18629  ;;
18630  *)
18631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18632for as_dir in $PATH
18633do
18634  IFS=$as_save_IFS
18635  test -z "$as_dir" && as_dir=.
18636    for ac_exec_ext in '' $ac_executable_extensions; do
18637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18638    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18640    break 2
18641  fi
18642done
18643  done
18644IFS=$as_save_IFS
18645
18646  ;;
18647esac
18648fi
18649BUILD_LD=$ac_cv_path_BUILD_LD
18650if test -n "$BUILD_LD"; then
18651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18652$as_echo "$BUILD_LD" >&6; }
18653else
18654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18655$as_echo "no" >&6; }
18656fi
18657
18658
18659
18660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18661
18662  # First separate the path from the arguments. This will split at the first
18663  # space.
18664  complete="$BUILD_LD"
18665  path="${complete%% *}"
18666  tmp="$complete EOL"
18667  arguments="${tmp#* }"
18668
18669  # Input might be given as Windows format, start by converting to
18670  # unix format.
18671  new_path=`$CYGPATH -u "$path"`
18672
18673  # Now try to locate executable using which
18674  new_path=`$WHICH "$new_path" 2> /dev/null`
18675  # bat and cmd files are not always considered executable in cygwin causing which
18676  # to not find them
18677  if test "x$new_path" = x \
18678      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18679      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18680    new_path=`$CYGPATH -u "$path"`
18681  fi
18682  if test "x$new_path" = x; then
18683    # Oops. Which didn't find the executable.
18684    # The splitting of arguments from the executable at a space might have been incorrect,
18685    # since paths with space are more likely in Windows. Give it another try with the whole
18686    # argument.
18687    path="$complete"
18688    arguments="EOL"
18689    new_path=`$CYGPATH -u "$path"`
18690    new_path=`$WHICH "$new_path" 2> /dev/null`
18691    # bat and cmd files are not always considered executable in cygwin causing which
18692    # to not find them
18693    if test "x$new_path" = x \
18694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18696      new_path=`$CYGPATH -u "$path"`
18697    fi
18698    if test "x$new_path" = x; then
18699      # It's still not found. Now this is an unrecoverable error.
18700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18701$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18702      has_space=`$ECHO "$complete" | $GREP " "`
18703      if test "x$has_space" != x; then
18704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18706      fi
18707      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18708    fi
18709  fi
18710
18711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18714  # "foo.exe" is OK but "foo" is an error.
18715  #
18716  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18717  # It is also a way to make sure we got the proper file name for the real test later on.
18718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18719  if test "x$test_shortpath" = x; then
18720    # Short path failed, file does not exist as specified.
18721    # Try adding .exe or .cmd
18722    if test -f "${new_path}.exe"; then
18723      input_to_shortpath="${new_path}.exe"
18724    elif test -f "${new_path}.cmd"; then
18725      input_to_shortpath="${new_path}.cmd"
18726    else
18727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18728$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18729      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18731      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18732    fi
18733  else
18734    input_to_shortpath="$new_path"
18735  fi
18736
18737  # Call helper function which possibly converts this using DOS-style short mode.
18738  # If so, the updated path is stored in $new_path.
18739  new_path="$input_to_shortpath"
18740
18741  input_path="$input_to_shortpath"
18742  # Check if we need to convert this using DOS-style short mode. If the path
18743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18744  # take no chances and rewrite it.
18745  # Note: m4 eats our [], so we need to use [ and ] instead.
18746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18747  if test "x$has_forbidden_chars" != x; then
18748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18752      # Going to short mode and back again did indeed matter. Since short mode is
18753      # case insensitive, let's make it lowercase to improve readability.
18754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18755      # Now convert it back to Unix-stile (cygpath)
18756      input_path=`$CYGPATH -u "$shortmode_path"`
18757      new_path="$input_path"
18758    fi
18759  fi
18760
18761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18762  if test "x$test_cygdrive_prefix" = x; then
18763    # As a simple fix, exclude /usr/bin since it's not a real path.
18764    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18766      # a path prefixed by /cygdrive for fixpath to work.
18767      new_path="$CYGWIN_ROOT_PATH$input_path"
18768    fi
18769  fi
18770
18771  # remove trailing .exe if any
18772  new_path="${new_path/%.exe/}"
18773
18774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18775
18776  # First separate the path from the arguments. This will split at the first
18777  # space.
18778  complete="$BUILD_LD"
18779  path="${complete%% *}"
18780  tmp="$complete EOL"
18781  arguments="${tmp#* }"
18782
18783  # Input might be given as Windows format, start by converting to
18784  # unix format.
18785  new_path="$path"
18786
18787  windows_path="$new_path"
18788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18789    unix_path=`$CYGPATH -u "$windows_path"`
18790    new_path="$unix_path"
18791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18793    new_path="$unix_path"
18794  fi
18795
18796
18797  # Now try to locate executable using which
18798  new_path=`$WHICH "$new_path" 2> /dev/null`
18799
18800  if test "x$new_path" = x; then
18801    # Oops. Which didn't find the executable.
18802    # The splitting of arguments from the executable at a space might have been incorrect,
18803    # since paths with space are more likely in Windows. Give it another try with the whole
18804    # argument.
18805    path="$complete"
18806    arguments="EOL"
18807    new_path="$path"
18808
18809  windows_path="$new_path"
18810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18811    unix_path=`$CYGPATH -u "$windows_path"`
18812    new_path="$unix_path"
18813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18815    new_path="$unix_path"
18816  fi
18817
18818
18819    new_path=`$WHICH "$new_path" 2> /dev/null`
18820
18821    if test "x$new_path" = x; then
18822      # It's still not found. Now this is an unrecoverable error.
18823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18824$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18825      has_space=`$ECHO "$complete" | $GREP " "`
18826      if test "x$has_space" != x; then
18827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18829      fi
18830      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18831    fi
18832  fi
18833
18834  # Now new_path has a complete unix path to the binary
18835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18836    # Keep paths in /bin as-is, but remove trailing .exe if any
18837    new_path="${new_path/%.exe/}"
18838    # Do not save /bin paths to all_fixpath_prefixes!
18839  else
18840    # Not in mixed or Windows style, start by that.
18841    new_path=`cmd //c echo $new_path`
18842
18843  input_path="$new_path"
18844  # Check if we need to convert this using DOS-style short mode. If the path
18845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18846  # take no chances and rewrite it.
18847  # Note: m4 eats our [], so we need to use [ and ] instead.
18848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18849  if test "x$has_forbidden_chars" != x; then
18850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18852  fi
18853
18854    # Output is in $new_path
18855
18856  windows_path="$new_path"
18857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18858    unix_path=`$CYGPATH -u "$windows_path"`
18859    new_path="$unix_path"
18860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18862    new_path="$unix_path"
18863  fi
18864
18865    # remove trailing .exe if any
18866    new_path="${new_path/%.exe/}"
18867
18868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18870  fi
18871
18872  else
18873    # We're on a posix platform. Hooray! :)
18874    # First separate the path from the arguments. This will split at the first
18875    # space.
18876    complete="$BUILD_LD"
18877    path="${complete%% *}"
18878    tmp="$complete EOL"
18879    arguments="${tmp#* }"
18880
18881    # Cannot rely on the command "which" here since it doesn't always work.
18882    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18883    if test -z "$is_absolute_path"; then
18884      # Path to executable is not absolute. Find it.
18885      IFS_save="$IFS"
18886      IFS=:
18887      for p in $PATH; do
18888        if test -f "$p/$path" && test -x "$p/$path"; then
18889          new_path="$p/$path"
18890          break
18891        fi
18892      done
18893      IFS="$IFS_save"
18894    else
18895      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18896$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18897      new_path="$path"
18898    fi
18899
18900    if test "x$new_path" = x; then
18901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18902$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18903      has_space=`$ECHO "$complete" | $GREP " "`
18904      if test "x$has_space" != x; then
18905        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18906$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18907      fi
18908      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18909    fi
18910  fi
18911
18912  # Now join together the path and the arguments once again
18913  if test "x$arguments" != xEOL; then
18914    new_complete="$new_path ${arguments% *}"
18915  else
18916    new_complete="$new_path"
18917  fi
18918
18919  if test "x$complete" != "x$new_complete"; then
18920    BUILD_LD="$new_complete"
18921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18922$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18923  fi
18924
18925  fi
18926
18927
18928
18929
18930  # If a devkit is found on the builddeps server, then prepend its path to the
18931  # PATH variable. If there are cross compilers available in the devkit, these
18932  # will be found by AC_PROG_CC et al.
18933  DEVKIT=
18934
18935
18936  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18937    # Source the builddeps file again, to make sure it uses the latest variables!
18938    . $builddepsfile
18939    # Look for a target and build machine specific resource!
18940    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18941    if test "x$resource" = x; then
18942      # Ok, lets instead look for a target specific resource
18943      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18944    fi
18945    if test "x$resource" = x; then
18946      # Ok, lets instead look for a build specific resource
18947      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18948    fi
18949    if test "x$resource" = x; then
18950      # Ok, lets instead look for a generic resource
18951      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18952      resource=${builddep_devkit}
18953    fi
18954    if test "x$resource" != x; then
18955      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18956$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18957      # If the resource in the builddeps.conf file is an existing directory,
18958      # for example /java/linux/cups
18959      if test -d ${resource}; then
18960        depdir=${resource}
18961      else
18962
18963  # devkit is for example mymodule
18964  # $resource is for example libs/general/libmymod_1_2_3.zip
18965  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18966  # $with_builddeps_dir is for example /localhome/builddeps
18967  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18968  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18969  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18970  filename=`basename $resource`
18971  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18972  filebase=${filename%%.*}
18973  extension=${filename#*.}
18974  installdir=$with_builddeps_dir/$filebase
18975  if test ! -f $installdir/$filename.unpacked; then
18976    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18977$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18978    if test ! -d $installdir; then
18979      mkdir -p $installdir
18980    fi
18981    if test ! -d $installdir; then
18982      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18983    fi
18984    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18985    touch $tmpfile
18986    if test ! -f $tmpfile; then
18987      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18988    fi
18989
18990  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18991  # $tmpfile is the local file name for the downloaded file.
18992  VALID_TOOL=no
18993  if test "x$BDEPS_FTP" = xwget; then
18994    VALID_TOOL=yes
18995    wget -O $tmpfile $with_builddeps_server/$resource
18996  fi
18997  if test "x$BDEPS_FTP" = xlftp; then
18998    VALID_TOOL=yes
18999    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19000  fi
19001  if test "x$BDEPS_FTP" = xftp; then
19002    VALID_TOOL=yes
19003    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19004    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19005    FTPUSERPWD=${FTPSERVER%%@*}
19006    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19007      FTPUSER=${userpwd%%:*}
19008      FTPPWD=${userpwd#*@}
19009      FTPSERVER=${FTPSERVER#*@}
19010    else
19011      FTPUSER=ftp
19012      FTPPWD=ftp
19013    fi
19014    # the "pass" command does not work on some
19015    # ftp clients (read ftp.exe) but if it works,
19016    # passive mode is better!
19017    ( \
19018        echo "user $FTPUSER $FTPPWD"        ; \
19019        echo "pass"                         ; \
19020        echo "bin"                          ; \
19021        echo "get $FTPPATH $tmpfile"              ; \
19022    ) | ftp -in $FTPSERVER
19023  fi
19024  if test "x$VALID_TOOL" != xyes; then
19025    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19026  fi
19027
19028    mv $tmpfile $installdir/$filename
19029    if test ! -s $installdir/$filename; then
19030      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19031    fi
19032    case "$extension" in
19033      zip)  echo "Unzipping $installdir/$filename..."
19034        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19035        ;;
19036      tar.gz) echo "Untaring $installdir/$filename..."
19037        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19038        ;;
19039      tgz) echo "Untaring $installdir/$filename..."
19040        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19041        ;;
19042      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19043        ;;
19044    esac
19045  fi
19046  if test -f $installdir/$filename.unpacked; then
19047    depdir=$installdir
19048  fi
19049
19050      fi
19051      # Source the builddeps file again, because in the previous command, the depdir
19052      # was updated to point at the current build dependency install directory.
19053      . $builddepsfile
19054      # Now extract variables from the builddeps.conf files.
19055      theroot=${builddep_devkit_ROOT}
19056      thecflags=${builddep_devkit_CFLAGS}
19057      thelibs=${builddep_devkit_LIBS}
19058      if test "x$depdir" = x; then
19059        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19060      fi
19061      DEVKIT=$depdir
19062      if test "x$theroot" != x; then
19063        DEVKIT="$theroot"
19064      fi
19065      if test "x$thecflags" != x; then
19066        DEVKIT_CFLAGS="$thecflags"
19067      fi
19068      if test "x$thelibs" != x; then
19069        DEVKIT_LIBS="$thelibs"
19070      fi
19071
19072        # Found devkit
19073        PATH="$DEVKIT/bin:$PATH"
19074        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19075        if test "x$x_includes" = "xNONE"; then
19076          x_includes="$SYS_ROOT/usr/include/X11"
19077        fi
19078        if test "x$x_libraries" = "xNONE"; then
19079          x_libraries="$SYS_ROOT/usr/lib"
19080        fi
19081
19082
19083    fi
19084
19085  fi
19086
19087
19088  # Store the CFLAGS etal passed to the configure script.
19089  ORG_CFLAGS="$CFLAGS"
19090  ORG_CXXFLAGS="$CXXFLAGS"
19091  ORG_OBJCFLAGS="$OBJCFLAGS"
19092
19093  # autoconf magic only relies on PATH, so update it if tools dir is specified
19094  OLD_PATH="$PATH"
19095  if test "x$TOOLS_DIR" != x; then
19096    PATH=$TOOLS_DIR:$PATH
19097  fi
19098
19099
19100  ### Locate C compiler (CC)
19101
19102  # On windows, only cl.exe is supported.
19103  # On Solaris, cc is preferred to gcc.
19104  # Elsewhere, gcc is preferred to cc.
19105
19106  if test "x$CC" != x; then
19107    COMPILER_CHECK_LIST="$CC"
19108  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19109    COMPILER_CHECK_LIST="cl"
19110  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19111    COMPILER_CHECK_LIST="cc gcc"
19112  else
19113    COMPILER_CHECK_LIST="gcc cc"
19114  fi
19115
19116
19117  COMPILER_NAME=C
19118
19119  CC=
19120  # If TOOLS_DIR is set, check for all compiler names in there first
19121  # before checking the rest of the PATH.
19122  if test -n "$TOOLS_DIR"; then
19123    PATH_save="$PATH"
19124    PATH="$TOOLS_DIR"
19125    for ac_prog in $COMPILER_CHECK_LIST
19126do
19127  # Extract the first word of "$ac_prog", so it can be a program name with args.
19128set dummy $ac_prog; ac_word=$2
19129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19130$as_echo_n "checking for $ac_word... " >&6; }
19131if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19132  $as_echo_n "(cached) " >&6
19133else
19134  case $TOOLS_DIR_CC in
19135  [\\/]* | ?:[\\/]*)
19136  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19137  ;;
19138  *)
19139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19140for as_dir in $PATH
19141do
19142  IFS=$as_save_IFS
19143  test -z "$as_dir" && as_dir=.
19144    for ac_exec_ext in '' $ac_executable_extensions; do
19145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19146    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19148    break 2
19149  fi
19150done
19151  done
19152IFS=$as_save_IFS
19153
19154  ;;
19155esac
19156fi
19157TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19158if test -n "$TOOLS_DIR_CC"; then
19159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19160$as_echo "$TOOLS_DIR_CC" >&6; }
19161else
19162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19163$as_echo "no" >&6; }
19164fi
19165
19166
19167  test -n "$TOOLS_DIR_CC" && break
19168done
19169
19170    CC=$TOOLS_DIR_CC
19171    PATH="$PATH_save"
19172  fi
19173
19174  # AC_PATH_PROGS can't be run multiple times with the same variable,
19175  # so create a new name for this run.
19176  if test "x$CC" = x; then
19177    for ac_prog in $COMPILER_CHECK_LIST
19178do
19179  # Extract the first word of "$ac_prog", so it can be a program name with args.
19180set dummy $ac_prog; ac_word=$2
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19182$as_echo_n "checking for $ac_word... " >&6; }
19183if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19184  $as_echo_n "(cached) " >&6
19185else
19186  case $POTENTIAL_CC in
19187  [\\/]* | ?:[\\/]*)
19188  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19189  ;;
19190  *)
19191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19192for as_dir in $PATH
19193do
19194  IFS=$as_save_IFS
19195  test -z "$as_dir" && as_dir=.
19196    for ac_exec_ext in '' $ac_executable_extensions; do
19197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19198    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19200    break 2
19201  fi
19202done
19203  done
19204IFS=$as_save_IFS
19205
19206  ;;
19207esac
19208fi
19209POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19210if test -n "$POTENTIAL_CC"; then
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19212$as_echo "$POTENTIAL_CC" >&6; }
19213else
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19215$as_echo "no" >&6; }
19216fi
19217
19218
19219  test -n "$POTENTIAL_CC" && break
19220done
19221
19222    CC=$POTENTIAL_CC
19223  fi
19224
19225  if test "x$CC" = x; then
19226
19227  # Print a helpful message on how to acquire the necessary build dependency.
19228  # devkit is the help tag: freetype, cups, pulse, alsa etc
19229  MISSING_DEPENDENCY=devkit
19230
19231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19232    cygwin_help $MISSING_DEPENDENCY
19233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19234    msys_help $MISSING_DEPENDENCY
19235  else
19236    PKGHANDLER_COMMAND=
19237
19238    case $PKGHANDLER in
19239      apt-get)
19240        apt_help     $MISSING_DEPENDENCY ;;
19241      yum)
19242        yum_help     $MISSING_DEPENDENCY ;;
19243      port)
19244        port_help    $MISSING_DEPENDENCY ;;
19245      pkgutil)
19246        pkgutil_help $MISSING_DEPENDENCY ;;
19247      pkgadd)
19248        pkgadd_help  $MISSING_DEPENDENCY ;;
19249      * )
19250        break ;;
19251    esac
19252
19253    if test "x$PKGHANDLER_COMMAND" != x; then
19254      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19255    fi
19256  fi
19257
19258    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19259  fi
19260
19261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19262
19263  # First separate the path from the arguments. This will split at the first
19264  # space.
19265  complete="$CC"
19266  path="${complete%% *}"
19267  tmp="$complete EOL"
19268  arguments="${tmp#* }"
19269
19270  # Input might be given as Windows format, start by converting to
19271  # unix format.
19272  new_path=`$CYGPATH -u "$path"`
19273
19274  # Now try to locate executable using which
19275  new_path=`$WHICH "$new_path" 2> /dev/null`
19276  # bat and cmd files are not always considered executable in cygwin causing which
19277  # to not find them
19278  if test "x$new_path" = x \
19279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19281    new_path=`$CYGPATH -u "$path"`
19282  fi
19283  if test "x$new_path" = x; then
19284    # Oops. Which didn't find the executable.
19285    # The splitting of arguments from the executable at a space might have been incorrect,
19286    # since paths with space are more likely in Windows. Give it another try with the whole
19287    # argument.
19288    path="$complete"
19289    arguments="EOL"
19290    new_path=`$CYGPATH -u "$path"`
19291    new_path=`$WHICH "$new_path" 2> /dev/null`
19292    # bat and cmd files are not always considered executable in cygwin causing which
19293    # to not find them
19294    if test "x$new_path" = x \
19295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19297      new_path=`$CYGPATH -u "$path"`
19298    fi
19299    if test "x$new_path" = x; then
19300      # It's still not found. Now this is an unrecoverable error.
19301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19302$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19303      has_space=`$ECHO "$complete" | $GREP " "`
19304      if test "x$has_space" != x; then
19305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19307      fi
19308      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19309    fi
19310  fi
19311
19312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19315  # "foo.exe" is OK but "foo" is an error.
19316  #
19317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19318  # It is also a way to make sure we got the proper file name for the real test later on.
19319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19320  if test "x$test_shortpath" = x; then
19321    # Short path failed, file does not exist as specified.
19322    # Try adding .exe or .cmd
19323    if test -f "${new_path}.exe"; then
19324      input_to_shortpath="${new_path}.exe"
19325    elif test -f "${new_path}.cmd"; then
19326      input_to_shortpath="${new_path}.cmd"
19327    else
19328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19329$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19332      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19333    fi
19334  else
19335    input_to_shortpath="$new_path"
19336  fi
19337
19338  # Call helper function which possibly converts this using DOS-style short mode.
19339  # If so, the updated path is stored in $new_path.
19340  new_path="$input_to_shortpath"
19341
19342  input_path="$input_to_shortpath"
19343  # Check if we need to convert this using DOS-style short mode. If the path
19344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19345  # take no chances and rewrite it.
19346  # Note: m4 eats our [], so we need to use [ and ] instead.
19347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19348  if test "x$has_forbidden_chars" != x; then
19349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19353      # Going to short mode and back again did indeed matter. Since short mode is
19354      # case insensitive, let's make it lowercase to improve readability.
19355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19356      # Now convert it back to Unix-stile (cygpath)
19357      input_path=`$CYGPATH -u "$shortmode_path"`
19358      new_path="$input_path"
19359    fi
19360  fi
19361
19362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19363  if test "x$test_cygdrive_prefix" = x; then
19364    # As a simple fix, exclude /usr/bin since it's not a real path.
19365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19367      # a path prefixed by /cygdrive for fixpath to work.
19368      new_path="$CYGWIN_ROOT_PATH$input_path"
19369    fi
19370  fi
19371
19372  # remove trailing .exe if any
19373  new_path="${new_path/%.exe/}"
19374
19375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19376
19377  # First separate the path from the arguments. This will split at the first
19378  # space.
19379  complete="$CC"
19380  path="${complete%% *}"
19381  tmp="$complete EOL"
19382  arguments="${tmp#* }"
19383
19384  # Input might be given as Windows format, start by converting to
19385  # unix format.
19386  new_path="$path"
19387
19388  windows_path="$new_path"
19389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19390    unix_path=`$CYGPATH -u "$windows_path"`
19391    new_path="$unix_path"
19392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19394    new_path="$unix_path"
19395  fi
19396
19397
19398  # Now try to locate executable using which
19399  new_path=`$WHICH "$new_path" 2> /dev/null`
19400
19401  if test "x$new_path" = x; then
19402    # Oops. Which didn't find the executable.
19403    # The splitting of arguments from the executable at a space might have been incorrect,
19404    # since paths with space are more likely in Windows. Give it another try with the whole
19405    # argument.
19406    path="$complete"
19407    arguments="EOL"
19408    new_path="$path"
19409
19410  windows_path="$new_path"
19411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19412    unix_path=`$CYGPATH -u "$windows_path"`
19413    new_path="$unix_path"
19414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19416    new_path="$unix_path"
19417  fi
19418
19419
19420    new_path=`$WHICH "$new_path" 2> /dev/null`
19421
19422    if test "x$new_path" = x; then
19423      # It's still not found. Now this is an unrecoverable error.
19424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19425$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19426      has_space=`$ECHO "$complete" | $GREP " "`
19427      if test "x$has_space" != x; then
19428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19430      fi
19431      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19432    fi
19433  fi
19434
19435  # Now new_path has a complete unix path to the binary
19436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19437    # Keep paths in /bin as-is, but remove trailing .exe if any
19438    new_path="${new_path/%.exe/}"
19439    # Do not save /bin paths to all_fixpath_prefixes!
19440  else
19441    # Not in mixed or Windows style, start by that.
19442    new_path=`cmd //c echo $new_path`
19443
19444  input_path="$new_path"
19445  # Check if we need to convert this using DOS-style short mode. If the path
19446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19447  # take no chances and rewrite it.
19448  # Note: m4 eats our [], so we need to use [ and ] instead.
19449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19450  if test "x$has_forbidden_chars" != x; then
19451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19453  fi
19454
19455    # Output is in $new_path
19456
19457  windows_path="$new_path"
19458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19459    unix_path=`$CYGPATH -u "$windows_path"`
19460    new_path="$unix_path"
19461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19463    new_path="$unix_path"
19464  fi
19465
19466    # remove trailing .exe if any
19467    new_path="${new_path/%.exe/}"
19468
19469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19471  fi
19472
19473  else
19474    # We're on a posix platform. Hooray! :)
19475    # First separate the path from the arguments. This will split at the first
19476    # space.
19477    complete="$CC"
19478    path="${complete%% *}"
19479    tmp="$complete EOL"
19480    arguments="${tmp#* }"
19481
19482    # Cannot rely on the command "which" here since it doesn't always work.
19483    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19484    if test -z "$is_absolute_path"; then
19485      # Path to executable is not absolute. Find it.
19486      IFS_save="$IFS"
19487      IFS=:
19488      for p in $PATH; do
19489        if test -f "$p/$path" && test -x "$p/$path"; then
19490          new_path="$p/$path"
19491          break
19492        fi
19493      done
19494      IFS="$IFS_save"
19495    else
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19497$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19498      new_path="$path"
19499    fi
19500
19501    if test "x$new_path" = x; then
19502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19503$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19504      has_space=`$ECHO "$complete" | $GREP " "`
19505      if test "x$has_space" != x; then
19506        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19508      fi
19509      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19510    fi
19511  fi
19512
19513  # Now join together the path and the arguments once again
19514  if test "x$arguments" != xEOL; then
19515    new_complete="$new_path ${arguments% *}"
19516  else
19517    new_complete="$new_path"
19518  fi
19519
19520  if test "x$complete" != "x$new_complete"; then
19521    CC="$new_complete"
19522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19523$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19524  fi
19525
19526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19527$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19528  TEST_COMPILER="$CC"
19529
19530  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19531    # Follow a chain of symbolic links. Use readlink
19532    # where it exists, else fall back to horribly
19533    # complicated shell code.
19534    if test "x$READLINK_TESTED" != yes; then
19535      # On MacOSX there is a readlink tool with a different
19536      # purpose than the GNU readlink tool. Check the found readlink.
19537      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19538      if test "x$ISGNU" = x; then
19539        # A readlink that we do not know how to use.
19540        # Are there other non-GNU readlinks out there?
19541        READLINK_TESTED=yes
19542        READLINK=
19543      fi
19544    fi
19545
19546    if test "x$READLINK" != x; then
19547      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19548    else
19549      # Save the current directory for restoring afterwards
19550      STARTDIR=$PWD
19551      COUNTER=0
19552      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19553      sym_link_file=`$BASENAME $TEST_COMPILER`
19554      cd $sym_link_dir
19555      # Use -P flag to resolve symlinks in directories.
19556      cd `$THEPWDCMD -P`
19557      sym_link_dir=`$THEPWDCMD -P`
19558      # Resolve file symlinks
19559      while test $COUNTER -lt 20; do
19560        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19561        if test "x$ISLINK" == x; then
19562          # This is not a symbolic link! We are done!
19563          break
19564        fi
19565        # Again resolve directory symlinks since the target of the just found
19566        # link could be in a different directory
19567        cd `$DIRNAME $ISLINK`
19568        sym_link_dir=`$THEPWDCMD -P`
19569        sym_link_file=`$BASENAME $ISLINK`
19570        let COUNTER=COUNTER+1
19571      done
19572      cd $STARTDIR
19573      TEST_COMPILER=$sym_link_dir/$sym_link_file
19574    fi
19575  fi
19576
19577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19578$as_echo "$TEST_COMPILER" >&6; }
19579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19580$as_echo_n "checking if CC is disguised ccache... " >&6; }
19581
19582  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19583  if test "x$COMPILER_BASENAME" = "xccache"; then
19584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19585$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19586    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19587    # We want to control ccache invocation ourselves, so ignore this cc and try
19588    # searching again.
19589
19590    # Remove the path to the fake ccache cc from the PATH
19591    RETRY_COMPILER_SAVED_PATH="$PATH"
19592    COMPILER_DIRNAME=`$DIRNAME $CC`
19593    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19594
19595    # Try again looking for our compiler
19596    if test -n "$ac_tool_prefix"; then
19597  for ac_prog in $COMPILER_CHECK_LIST
19598  do
19599    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19600set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19602$as_echo_n "checking for $ac_word... " >&6; }
19603if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19604  $as_echo_n "(cached) " >&6
19605else
19606  if test -n "$PROPER_COMPILER_CC"; then
19607  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19608else
19609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19610for as_dir in $PATH
19611do
19612  IFS=$as_save_IFS
19613  test -z "$as_dir" && as_dir=.
19614    for ac_exec_ext in '' $ac_executable_extensions; do
19615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19616    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19618    break 2
19619  fi
19620done
19621  done
19622IFS=$as_save_IFS
19623
19624fi
19625fi
19626PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19627if test -n "$PROPER_COMPILER_CC"; then
19628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19629$as_echo "$PROPER_COMPILER_CC" >&6; }
19630else
19631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19632$as_echo "no" >&6; }
19633fi
19634
19635
19636    test -n "$PROPER_COMPILER_CC" && break
19637  done
19638fi
19639if test -z "$PROPER_COMPILER_CC"; then
19640  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19641  for ac_prog in $COMPILER_CHECK_LIST
19642do
19643  # Extract the first word of "$ac_prog", so it can be a program name with args.
19644set dummy $ac_prog; ac_word=$2
19645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19646$as_echo_n "checking for $ac_word... " >&6; }
19647if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19648  $as_echo_n "(cached) " >&6
19649else
19650  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19651  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19652else
19653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19654for as_dir in $PATH
19655do
19656  IFS=$as_save_IFS
19657  test -z "$as_dir" && as_dir=.
19658    for ac_exec_ext in '' $ac_executable_extensions; do
19659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19660    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19662    break 2
19663  fi
19664done
19665  done
19666IFS=$as_save_IFS
19667
19668fi
19669fi
19670ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19671if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19673$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19674else
19675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19676$as_echo "no" >&6; }
19677fi
19678
19679
19680  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19681done
19682
19683  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19684    PROPER_COMPILER_CC=""
19685  else
19686    case $cross_compiling:$ac_tool_warned in
19687yes:)
19688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19690ac_tool_warned=yes ;;
19691esac
19692    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19693  fi
19694fi
19695
19696
19697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19698
19699  # First separate the path from the arguments. This will split at the first
19700  # space.
19701  complete="$PROPER_COMPILER_CC"
19702  path="${complete%% *}"
19703  tmp="$complete EOL"
19704  arguments="${tmp#* }"
19705
19706  # Input might be given as Windows format, start by converting to
19707  # unix format.
19708  new_path=`$CYGPATH -u "$path"`
19709
19710  # Now try to locate executable using which
19711  new_path=`$WHICH "$new_path" 2> /dev/null`
19712  # bat and cmd files are not always considered executable in cygwin causing which
19713  # to not find them
19714  if test "x$new_path" = x \
19715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19717    new_path=`$CYGPATH -u "$path"`
19718  fi
19719  if test "x$new_path" = x; then
19720    # Oops. Which didn't find the executable.
19721    # The splitting of arguments from the executable at a space might have been incorrect,
19722    # since paths with space are more likely in Windows. Give it another try with the whole
19723    # argument.
19724    path="$complete"
19725    arguments="EOL"
19726    new_path=`$CYGPATH -u "$path"`
19727    new_path=`$WHICH "$new_path" 2> /dev/null`
19728    # bat and cmd files are not always considered executable in cygwin causing which
19729    # to not find them
19730    if test "x$new_path" = x \
19731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19733      new_path=`$CYGPATH -u "$path"`
19734    fi
19735    if test "x$new_path" = x; then
19736      # It's still not found. Now this is an unrecoverable error.
19737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19738$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19739      has_space=`$ECHO "$complete" | $GREP " "`
19740      if test "x$has_space" != x; then
19741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19743      fi
19744      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19745    fi
19746  fi
19747
19748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19751  # "foo.exe" is OK but "foo" is an error.
19752  #
19753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19754  # It is also a way to make sure we got the proper file name for the real test later on.
19755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19756  if test "x$test_shortpath" = x; then
19757    # Short path failed, file does not exist as specified.
19758    # Try adding .exe or .cmd
19759    if test -f "${new_path}.exe"; then
19760      input_to_shortpath="${new_path}.exe"
19761    elif test -f "${new_path}.cmd"; then
19762      input_to_shortpath="${new_path}.cmd"
19763    else
19764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19765$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19768      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19769    fi
19770  else
19771    input_to_shortpath="$new_path"
19772  fi
19773
19774  # Call helper function which possibly converts this using DOS-style short mode.
19775  # If so, the updated path is stored in $new_path.
19776  new_path="$input_to_shortpath"
19777
19778  input_path="$input_to_shortpath"
19779  # Check if we need to convert this using DOS-style short mode. If the path
19780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19781  # take no chances and rewrite it.
19782  # Note: m4 eats our [], so we need to use [ and ] instead.
19783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19784  if test "x$has_forbidden_chars" != x; then
19785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19789      # Going to short mode and back again did indeed matter. Since short mode is
19790      # case insensitive, let's make it lowercase to improve readability.
19791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19792      # Now convert it back to Unix-stile (cygpath)
19793      input_path=`$CYGPATH -u "$shortmode_path"`
19794      new_path="$input_path"
19795    fi
19796  fi
19797
19798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19799  if test "x$test_cygdrive_prefix" = x; then
19800    # As a simple fix, exclude /usr/bin since it's not a real path.
19801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19803      # a path prefixed by /cygdrive for fixpath to work.
19804      new_path="$CYGWIN_ROOT_PATH$input_path"
19805    fi
19806  fi
19807
19808  # remove trailing .exe if any
19809  new_path="${new_path/%.exe/}"
19810
19811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19812
19813  # First separate the path from the arguments. This will split at the first
19814  # space.
19815  complete="$PROPER_COMPILER_CC"
19816  path="${complete%% *}"
19817  tmp="$complete EOL"
19818  arguments="${tmp#* }"
19819
19820  # Input might be given as Windows format, start by converting to
19821  # unix format.
19822  new_path="$path"
19823
19824  windows_path="$new_path"
19825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826    unix_path=`$CYGPATH -u "$windows_path"`
19827    new_path="$unix_path"
19828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19830    new_path="$unix_path"
19831  fi
19832
19833
19834  # Now try to locate executable using which
19835  new_path=`$WHICH "$new_path" 2> /dev/null`
19836
19837  if test "x$new_path" = x; then
19838    # Oops. Which didn't find the executable.
19839    # The splitting of arguments from the executable at a space might have been incorrect,
19840    # since paths with space are more likely in Windows. Give it another try with the whole
19841    # argument.
19842    path="$complete"
19843    arguments="EOL"
19844    new_path="$path"
19845
19846  windows_path="$new_path"
19847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19848    unix_path=`$CYGPATH -u "$windows_path"`
19849    new_path="$unix_path"
19850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19852    new_path="$unix_path"
19853  fi
19854
19855
19856    new_path=`$WHICH "$new_path" 2> /dev/null`
19857
19858    if test "x$new_path" = x; then
19859      # It's still not found. Now this is an unrecoverable error.
19860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19861$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19862      has_space=`$ECHO "$complete" | $GREP " "`
19863      if test "x$has_space" != x; then
19864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19866      fi
19867      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19868    fi
19869  fi
19870
19871  # Now new_path has a complete unix path to the binary
19872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19873    # Keep paths in /bin as-is, but remove trailing .exe if any
19874    new_path="${new_path/%.exe/}"
19875    # Do not save /bin paths to all_fixpath_prefixes!
19876  else
19877    # Not in mixed or Windows style, start by that.
19878    new_path=`cmd //c echo $new_path`
19879
19880  input_path="$new_path"
19881  # Check if we need to convert this using DOS-style short mode. If the path
19882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19883  # take no chances and rewrite it.
19884  # Note: m4 eats our [], so we need to use [ and ] instead.
19885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19886  if test "x$has_forbidden_chars" != x; then
19887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19889  fi
19890
19891    # Output is in $new_path
19892
19893  windows_path="$new_path"
19894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19895    unix_path=`$CYGPATH -u "$windows_path"`
19896    new_path="$unix_path"
19897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19899    new_path="$unix_path"
19900  fi
19901
19902    # remove trailing .exe if any
19903    new_path="${new_path/%.exe/}"
19904
19905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19907  fi
19908
19909  else
19910    # We're on a posix platform. Hooray! :)
19911    # First separate the path from the arguments. This will split at the first
19912    # space.
19913    complete="$PROPER_COMPILER_CC"
19914    path="${complete%% *}"
19915    tmp="$complete EOL"
19916    arguments="${tmp#* }"
19917
19918    # Cannot rely on the command "which" here since it doesn't always work.
19919    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19920    if test -z "$is_absolute_path"; then
19921      # Path to executable is not absolute. Find it.
19922      IFS_save="$IFS"
19923      IFS=:
19924      for p in $PATH; do
19925        if test -f "$p/$path" && test -x "$p/$path"; then
19926          new_path="$p/$path"
19927          break
19928        fi
19929      done
19930      IFS="$IFS_save"
19931    else
19932      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19933$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19934      new_path="$path"
19935    fi
19936
19937    if test "x$new_path" = x; then
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19939$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19940      has_space=`$ECHO "$complete" | $GREP " "`
19941      if test "x$has_space" != x; then
19942        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19944      fi
19945      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19946    fi
19947  fi
19948
19949  # Now join together the path and the arguments once again
19950  if test "x$arguments" != xEOL; then
19951    new_complete="$new_path ${arguments% *}"
19952  else
19953    new_complete="$new_path"
19954  fi
19955
19956  if test "x$complete" != "x$new_complete"; then
19957    PROPER_COMPILER_CC="$new_complete"
19958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19959$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19960  fi
19961
19962    PATH="$RETRY_COMPILER_SAVED_PATH"
19963
19964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19965$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19966
19967  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19968    # Follow a chain of symbolic links. Use readlink
19969    # where it exists, else fall back to horribly
19970    # complicated shell code.
19971    if test "x$READLINK_TESTED" != yes; then
19972      # On MacOSX there is a readlink tool with a different
19973      # purpose than the GNU readlink tool. Check the found readlink.
19974      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19975      if test "x$ISGNU" = x; then
19976        # A readlink that we do not know how to use.
19977        # Are there other non-GNU readlinks out there?
19978        READLINK_TESTED=yes
19979        READLINK=
19980      fi
19981    fi
19982
19983    if test "x$READLINK" != x; then
19984      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19985    else
19986      # Save the current directory for restoring afterwards
19987      STARTDIR=$PWD
19988      COUNTER=0
19989      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19990      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19991      cd $sym_link_dir
19992      # Use -P flag to resolve symlinks in directories.
19993      cd `$THEPWDCMD -P`
19994      sym_link_dir=`$THEPWDCMD -P`
19995      # Resolve file symlinks
19996      while test $COUNTER -lt 20; do
19997        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19998        if test "x$ISLINK" == x; then
19999          # This is not a symbolic link! We are done!
20000          break
20001        fi
20002        # Again resolve directory symlinks since the target of the just found
20003        # link could be in a different directory
20004        cd `$DIRNAME $ISLINK`
20005        sym_link_dir=`$THEPWDCMD -P`
20006        sym_link_file=`$BASENAME $ISLINK`
20007        let COUNTER=COUNTER+1
20008      done
20009      cd $STARTDIR
20010      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20011    fi
20012  fi
20013
20014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20015$as_echo "$PROPER_COMPILER_CC" >&6; }
20016    CC="$PROPER_COMPILER_CC"
20017  else
20018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20019$as_echo "no, keeping CC" >&6; }
20020    CC="$TEST_COMPILER"
20021  fi
20022
20023  COMPILER=$CC
20024  COMPILER_NAME=$COMPILER_NAME
20025
20026  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20027    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20028    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20029    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20030    if test $? -ne 0; then
20031      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20032
20033      { $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
20034$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20035      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20036$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20037      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20038    else
20039      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20040      COMPILER_VENDOR="Sun Studio"
20041    fi
20042  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20043    # First line typically looks something like:
20044    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20045    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20046    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20047    COMPILER_VENDOR="Microsoft CL.EXE"
20048    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20049    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20050      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20051        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20052      fi
20053    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20054      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20055        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20056      fi
20057    fi
20058  else
20059    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20060    # Check that this is likely to be GCC.
20061    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20062    if test $? -ne 0; then
20063      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20064$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20065      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20066$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20067      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20068    fi
20069
20070    # First line typically looks something like:
20071    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20072    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20073    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20074  fi
20075  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20076  CC_VERSION="$COMPILER_VERSION"
20077  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20078  CC_VENDOR="$COMPILER_VENDOR"
20079
20080  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20081$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20082
20083
20084  # Now that we have resolved CC ourself, let autoconf have its go at it
20085  ac_ext=c
20086ac_cpp='$CPP $CPPFLAGS'
20087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20089ac_compiler_gnu=$ac_cv_c_compiler_gnu
20090if test -n "$ac_tool_prefix"; then
20091  for ac_prog in $CC
20092  do
20093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20096$as_echo_n "checking for $ac_word... " >&6; }
20097if ${ac_cv_prog_CC+:} false; then :
20098  $as_echo_n "(cached) " >&6
20099else
20100  if test -n "$CC"; then
20101  ac_cv_prog_CC="$CC" # Let the user override the test.
20102else
20103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20104for as_dir in $PATH
20105do
20106  IFS=$as_save_IFS
20107  test -z "$as_dir" && as_dir=.
20108    for ac_exec_ext in '' $ac_executable_extensions; do
20109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20110    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20112    break 2
20113  fi
20114done
20115  done
20116IFS=$as_save_IFS
20117
20118fi
20119fi
20120CC=$ac_cv_prog_CC
20121if test -n "$CC"; then
20122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20123$as_echo "$CC" >&6; }
20124else
20125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20126$as_echo "no" >&6; }
20127fi
20128
20129
20130    test -n "$CC" && break
20131  done
20132fi
20133if test -z "$CC"; then
20134  ac_ct_CC=$CC
20135  for ac_prog in $CC
20136do
20137  # Extract the first word of "$ac_prog", so it can be a program name with args.
20138set dummy $ac_prog; ac_word=$2
20139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20140$as_echo_n "checking for $ac_word... " >&6; }
20141if ${ac_cv_prog_ac_ct_CC+:} false; then :
20142  $as_echo_n "(cached) " >&6
20143else
20144  if test -n "$ac_ct_CC"; then
20145  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20146else
20147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20148for as_dir in $PATH
20149do
20150  IFS=$as_save_IFS
20151  test -z "$as_dir" && as_dir=.
20152    for ac_exec_ext in '' $ac_executable_extensions; do
20153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20154    ac_cv_prog_ac_ct_CC="$ac_prog"
20155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20156    break 2
20157  fi
20158done
20159  done
20160IFS=$as_save_IFS
20161
20162fi
20163fi
20164ac_ct_CC=$ac_cv_prog_ac_ct_CC
20165if test -n "$ac_ct_CC"; then
20166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20167$as_echo "$ac_ct_CC" >&6; }
20168else
20169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20170$as_echo "no" >&6; }
20171fi
20172
20173
20174  test -n "$ac_ct_CC" && break
20175done
20176
20177  if test "x$ac_ct_CC" = x; then
20178    CC=""
20179  else
20180    case $cross_compiling:$ac_tool_warned in
20181yes:)
20182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20184ac_tool_warned=yes ;;
20185esac
20186    CC=$ac_ct_CC
20187  fi
20188fi
20189
20190
20191test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20193as_fn_error $? "no acceptable C compiler found in \$PATH
20194See \`config.log' for more details" "$LINENO" 5; }
20195
20196# Provide some information about the compiler.
20197$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20198set X $ac_compile
20199ac_compiler=$2
20200for ac_option in --version -v -V -qversion; do
20201  { { ac_try="$ac_compiler $ac_option >&5"
20202case "(($ac_try" in
20203  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20204  *) ac_try_echo=$ac_try;;
20205esac
20206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20207$as_echo "$ac_try_echo"; } >&5
20208  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20209  ac_status=$?
20210  if test -s conftest.err; then
20211    sed '10a\
20212... rest of stderr output deleted ...
20213         10q' conftest.err >conftest.er1
20214    cat conftest.er1 >&5
20215  fi
20216  rm -f conftest.er1 conftest.err
20217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20218  test $ac_status = 0; }
20219done
20220
20221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20222/* end confdefs.h.  */
20223
20224int
20225main ()
20226{
20227
20228  ;
20229  return 0;
20230}
20231_ACEOF
20232ac_clean_files_save=$ac_clean_files
20233ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20234# Try to create an executable without -o first, disregard a.out.
20235# It will help us diagnose broken compilers, and finding out an intuition
20236# of exeext.
20237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20238$as_echo_n "checking whether the C compiler works... " >&6; }
20239ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20240
20241# The possible output files:
20242ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20243
20244ac_rmfiles=
20245for ac_file in $ac_files
20246do
20247  case $ac_file in
20248    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20249    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20250  esac
20251done
20252rm -f $ac_rmfiles
20253
20254if { { ac_try="$ac_link_default"
20255case "(($ac_try" in
20256  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20257  *) ac_try_echo=$ac_try;;
20258esac
20259eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20260$as_echo "$ac_try_echo"; } >&5
20261  (eval "$ac_link_default") 2>&5
20262  ac_status=$?
20263  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20264  test $ac_status = 0; }; then :
20265  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20266# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20267# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20268# so that the user can short-circuit this test for compilers unknown to
20269# Autoconf.
20270for ac_file in $ac_files ''
20271do
20272  test -f "$ac_file" || continue
20273  case $ac_file in
20274    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20275	;;
20276    [ab].out )
20277	# We found the default executable, but exeext='' is most
20278	# certainly right.
20279	break;;
20280    *.* )
20281	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20282	then :; else
20283	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20284	fi
20285	# We set ac_cv_exeext here because the later test for it is not
20286	# safe: cross compilers may not add the suffix if given an `-o'
20287	# argument, so we may need to know it at that point already.
20288	# Even if this section looks crufty: it has the advantage of
20289	# actually working.
20290	break;;
20291    * )
20292	break;;
20293  esac
20294done
20295test "$ac_cv_exeext" = no && ac_cv_exeext=
20296
20297else
20298  ac_file=''
20299fi
20300if test -z "$ac_file"; then :
20301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20302$as_echo "no" >&6; }
20303$as_echo "$as_me: failed program was:" >&5
20304sed 's/^/| /' conftest.$ac_ext >&5
20305
20306{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20308as_fn_error 77 "C compiler cannot create executables
20309See \`config.log' for more details" "$LINENO" 5; }
20310else
20311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20312$as_echo "yes" >&6; }
20313fi
20314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20315$as_echo_n "checking for C compiler default output file name... " >&6; }
20316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20317$as_echo "$ac_file" >&6; }
20318ac_exeext=$ac_cv_exeext
20319
20320rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20321ac_clean_files=$ac_clean_files_save
20322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20323$as_echo_n "checking for suffix of executables... " >&6; }
20324if { { ac_try="$ac_link"
20325case "(($ac_try" in
20326  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20327  *) ac_try_echo=$ac_try;;
20328esac
20329eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20330$as_echo "$ac_try_echo"; } >&5
20331  (eval "$ac_link") 2>&5
20332  ac_status=$?
20333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20334  test $ac_status = 0; }; then :
20335  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20336# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20337# work properly (i.e., refer to `conftest.exe'), while it won't with
20338# `rm'.
20339for ac_file in conftest.exe conftest conftest.*; do
20340  test -f "$ac_file" || continue
20341  case $ac_file in
20342    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20343    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20344	  break;;
20345    * ) break;;
20346  esac
20347done
20348else
20349  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20351as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20352See \`config.log' for more details" "$LINENO" 5; }
20353fi
20354rm -f conftest conftest$ac_cv_exeext
20355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20356$as_echo "$ac_cv_exeext" >&6; }
20357
20358rm -f conftest.$ac_ext
20359EXEEXT=$ac_cv_exeext
20360ac_exeext=$EXEEXT
20361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20362/* end confdefs.h.  */
20363#include <stdio.h>
20364int
20365main ()
20366{
20367FILE *f = fopen ("conftest.out", "w");
20368 return ferror (f) || fclose (f) != 0;
20369
20370  ;
20371  return 0;
20372}
20373_ACEOF
20374ac_clean_files="$ac_clean_files conftest.out"
20375# Check that the compiler produces executables we can run.  If not, either
20376# the compiler is broken, or we cross compile.
20377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20378$as_echo_n "checking whether we are cross compiling... " >&6; }
20379if test "$cross_compiling" != yes; then
20380  { { ac_try="$ac_link"
20381case "(($ac_try" in
20382  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20383  *) ac_try_echo=$ac_try;;
20384esac
20385eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20386$as_echo "$ac_try_echo"; } >&5
20387  (eval "$ac_link") 2>&5
20388  ac_status=$?
20389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20390  test $ac_status = 0; }
20391  if { ac_try='./conftest$ac_cv_exeext'
20392  { { case "(($ac_try" in
20393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20394  *) ac_try_echo=$ac_try;;
20395esac
20396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20397$as_echo "$ac_try_echo"; } >&5
20398  (eval "$ac_try") 2>&5
20399  ac_status=$?
20400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20401  test $ac_status = 0; }; }; then
20402    cross_compiling=no
20403  else
20404    if test "$cross_compiling" = maybe; then
20405	cross_compiling=yes
20406    else
20407	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20409as_fn_error $? "cannot run C compiled programs.
20410If you meant to cross compile, use \`--host'.
20411See \`config.log' for more details" "$LINENO" 5; }
20412    fi
20413  fi
20414fi
20415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20416$as_echo "$cross_compiling" >&6; }
20417
20418rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20419ac_clean_files=$ac_clean_files_save
20420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20421$as_echo_n "checking for suffix of object files... " >&6; }
20422if ${ac_cv_objext+:} false; then :
20423  $as_echo_n "(cached) " >&6
20424else
20425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20426/* end confdefs.h.  */
20427
20428int
20429main ()
20430{
20431
20432  ;
20433  return 0;
20434}
20435_ACEOF
20436rm -f conftest.o conftest.obj
20437if { { ac_try="$ac_compile"
20438case "(($ac_try" in
20439  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20440  *) ac_try_echo=$ac_try;;
20441esac
20442eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20443$as_echo "$ac_try_echo"; } >&5
20444  (eval "$ac_compile") 2>&5
20445  ac_status=$?
20446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20447  test $ac_status = 0; }; then :
20448  for ac_file in conftest.o conftest.obj conftest.*; do
20449  test -f "$ac_file" || continue;
20450  case $ac_file in
20451    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20452    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20453       break;;
20454  esac
20455done
20456else
20457  $as_echo "$as_me: failed program was:" >&5
20458sed 's/^/| /' conftest.$ac_ext >&5
20459
20460{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20462as_fn_error $? "cannot compute suffix of object files: cannot compile
20463See \`config.log' for more details" "$LINENO" 5; }
20464fi
20465rm -f conftest.$ac_cv_objext conftest.$ac_ext
20466fi
20467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20468$as_echo "$ac_cv_objext" >&6; }
20469OBJEXT=$ac_cv_objext
20470ac_objext=$OBJEXT
20471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20472$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20473if ${ac_cv_c_compiler_gnu+:} false; then :
20474  $as_echo_n "(cached) " >&6
20475else
20476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20477/* end confdefs.h.  */
20478
20479int
20480main ()
20481{
20482#ifndef __GNUC__
20483       choke me
20484#endif
20485
20486  ;
20487  return 0;
20488}
20489_ACEOF
20490if ac_fn_c_try_compile "$LINENO"; then :
20491  ac_compiler_gnu=yes
20492else
20493  ac_compiler_gnu=no
20494fi
20495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20496ac_cv_c_compiler_gnu=$ac_compiler_gnu
20497
20498fi
20499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20500$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20501if test $ac_compiler_gnu = yes; then
20502  GCC=yes
20503else
20504  GCC=
20505fi
20506ac_test_CFLAGS=${CFLAGS+set}
20507ac_save_CFLAGS=$CFLAGS
20508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20509$as_echo_n "checking whether $CC accepts -g... " >&6; }
20510if ${ac_cv_prog_cc_g+:} false; then :
20511  $as_echo_n "(cached) " >&6
20512else
20513  ac_save_c_werror_flag=$ac_c_werror_flag
20514   ac_c_werror_flag=yes
20515   ac_cv_prog_cc_g=no
20516   CFLAGS="-g"
20517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20518/* end confdefs.h.  */
20519
20520int
20521main ()
20522{
20523
20524  ;
20525  return 0;
20526}
20527_ACEOF
20528if ac_fn_c_try_compile "$LINENO"; then :
20529  ac_cv_prog_cc_g=yes
20530else
20531  CFLAGS=""
20532      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20533/* end confdefs.h.  */
20534
20535int
20536main ()
20537{
20538
20539  ;
20540  return 0;
20541}
20542_ACEOF
20543if ac_fn_c_try_compile "$LINENO"; then :
20544
20545else
20546  ac_c_werror_flag=$ac_save_c_werror_flag
20547	 CFLAGS="-g"
20548	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20549/* end confdefs.h.  */
20550
20551int
20552main ()
20553{
20554
20555  ;
20556  return 0;
20557}
20558_ACEOF
20559if ac_fn_c_try_compile "$LINENO"; then :
20560  ac_cv_prog_cc_g=yes
20561fi
20562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20563fi
20564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20565fi
20566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20567   ac_c_werror_flag=$ac_save_c_werror_flag
20568fi
20569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20570$as_echo "$ac_cv_prog_cc_g" >&6; }
20571if test "$ac_test_CFLAGS" = set; then
20572  CFLAGS=$ac_save_CFLAGS
20573elif test $ac_cv_prog_cc_g = yes; then
20574  if test "$GCC" = yes; then
20575    CFLAGS="-g -O2"
20576  else
20577    CFLAGS="-g"
20578  fi
20579else
20580  if test "$GCC" = yes; then
20581    CFLAGS="-O2"
20582  else
20583    CFLAGS=
20584  fi
20585fi
20586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20587$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20588if ${ac_cv_prog_cc_c89+:} false; then :
20589  $as_echo_n "(cached) " >&6
20590else
20591  ac_cv_prog_cc_c89=no
20592ac_save_CC=$CC
20593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20594/* end confdefs.h.  */
20595#include <stdarg.h>
20596#include <stdio.h>
20597struct stat;
20598/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20599struct buf { int x; };
20600FILE * (*rcsopen) (struct buf *, struct stat *, int);
20601static char *e (p, i)
20602     char **p;
20603     int i;
20604{
20605  return p[i];
20606}
20607static char *f (char * (*g) (char **, int), char **p, ...)
20608{
20609  char *s;
20610  va_list v;
20611  va_start (v,p);
20612  s = g (p, va_arg (v,int));
20613  va_end (v);
20614  return s;
20615}
20616
20617/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20618   function prototypes and stuff, but not '\xHH' hex character constants.
20619   These don't provoke an error unfortunately, instead are silently treated
20620   as 'x'.  The following induces an error, until -std is added to get
20621   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20622   array size at least.  It's necessary to write '\x00'==0 to get something
20623   that's true only with -std.  */
20624int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20625
20626/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20627   inside strings and character constants.  */
20628#define FOO(x) 'x'
20629int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20630
20631int test (int i, double x);
20632struct s1 {int (*f) (int a);};
20633struct s2 {int (*f) (double a);};
20634int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20635int argc;
20636char **argv;
20637int
20638main ()
20639{
20640return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20641  ;
20642  return 0;
20643}
20644_ACEOF
20645for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20646	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20647do
20648  CC="$ac_save_CC $ac_arg"
20649  if ac_fn_c_try_compile "$LINENO"; then :
20650  ac_cv_prog_cc_c89=$ac_arg
20651fi
20652rm -f core conftest.err conftest.$ac_objext
20653  test "x$ac_cv_prog_cc_c89" != "xno" && break
20654done
20655rm -f conftest.$ac_ext
20656CC=$ac_save_CC
20657
20658fi
20659# AC_CACHE_VAL
20660case "x$ac_cv_prog_cc_c89" in
20661  x)
20662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20663$as_echo "none needed" >&6; } ;;
20664  xno)
20665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20666$as_echo "unsupported" >&6; } ;;
20667  *)
20668    CC="$CC $ac_cv_prog_cc_c89"
20669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20670$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20671esac
20672if test "x$ac_cv_prog_cc_c89" != xno; then :
20673
20674fi
20675
20676ac_ext=cpp
20677ac_cpp='$CXXCPP $CPPFLAGS'
20678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20681
20682
20683  ### Locate C++ compiler (CXX)
20684
20685  if test "x$CXX" != x; then
20686    COMPILER_CHECK_LIST="$CXX"
20687  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20688    COMPILER_CHECK_LIST="cl"
20689  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20690    COMPILER_CHECK_LIST="CC g++"
20691  else
20692    COMPILER_CHECK_LIST="g++ CC"
20693  fi
20694
20695
20696  COMPILER_NAME=C++
20697
20698  CXX=
20699  # If TOOLS_DIR is set, check for all compiler names in there first
20700  # before checking the rest of the PATH.
20701  if test -n "$TOOLS_DIR"; then
20702    PATH_save="$PATH"
20703    PATH="$TOOLS_DIR"
20704    for ac_prog in $COMPILER_CHECK_LIST
20705do
20706  # Extract the first word of "$ac_prog", so it can be a program name with args.
20707set dummy $ac_prog; ac_word=$2
20708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20709$as_echo_n "checking for $ac_word... " >&6; }
20710if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20711  $as_echo_n "(cached) " >&6
20712else
20713  case $TOOLS_DIR_CXX in
20714  [\\/]* | ?:[\\/]*)
20715  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20716  ;;
20717  *)
20718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20719for as_dir in $PATH
20720do
20721  IFS=$as_save_IFS
20722  test -z "$as_dir" && as_dir=.
20723    for ac_exec_ext in '' $ac_executable_extensions; do
20724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20725    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20727    break 2
20728  fi
20729done
20730  done
20731IFS=$as_save_IFS
20732
20733  ;;
20734esac
20735fi
20736TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20737if test -n "$TOOLS_DIR_CXX"; then
20738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20739$as_echo "$TOOLS_DIR_CXX" >&6; }
20740else
20741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20742$as_echo "no" >&6; }
20743fi
20744
20745
20746  test -n "$TOOLS_DIR_CXX" && break
20747done
20748
20749    CXX=$TOOLS_DIR_CXX
20750    PATH="$PATH_save"
20751  fi
20752
20753  # AC_PATH_PROGS can't be run multiple times with the same variable,
20754  # so create a new name for this run.
20755  if test "x$CXX" = x; then
20756    for ac_prog in $COMPILER_CHECK_LIST
20757do
20758  # Extract the first word of "$ac_prog", so it can be a program name with args.
20759set dummy $ac_prog; ac_word=$2
20760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20761$as_echo_n "checking for $ac_word... " >&6; }
20762if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20763  $as_echo_n "(cached) " >&6
20764else
20765  case $POTENTIAL_CXX in
20766  [\\/]* | ?:[\\/]*)
20767  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20768  ;;
20769  *)
20770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20771for as_dir in $PATH
20772do
20773  IFS=$as_save_IFS
20774  test -z "$as_dir" && as_dir=.
20775    for ac_exec_ext in '' $ac_executable_extensions; do
20776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20777    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20779    break 2
20780  fi
20781done
20782  done
20783IFS=$as_save_IFS
20784
20785  ;;
20786esac
20787fi
20788POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20789if test -n "$POTENTIAL_CXX"; then
20790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20791$as_echo "$POTENTIAL_CXX" >&6; }
20792else
20793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20794$as_echo "no" >&6; }
20795fi
20796
20797
20798  test -n "$POTENTIAL_CXX" && break
20799done
20800
20801    CXX=$POTENTIAL_CXX
20802  fi
20803
20804  if test "x$CXX" = x; then
20805
20806  # Print a helpful message on how to acquire the necessary build dependency.
20807  # devkit is the help tag: freetype, cups, pulse, alsa etc
20808  MISSING_DEPENDENCY=devkit
20809
20810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20811    cygwin_help $MISSING_DEPENDENCY
20812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20813    msys_help $MISSING_DEPENDENCY
20814  else
20815    PKGHANDLER_COMMAND=
20816
20817    case $PKGHANDLER in
20818      apt-get)
20819        apt_help     $MISSING_DEPENDENCY ;;
20820      yum)
20821        yum_help     $MISSING_DEPENDENCY ;;
20822      port)
20823        port_help    $MISSING_DEPENDENCY ;;
20824      pkgutil)
20825        pkgutil_help $MISSING_DEPENDENCY ;;
20826      pkgadd)
20827        pkgadd_help  $MISSING_DEPENDENCY ;;
20828      * )
20829        break ;;
20830    esac
20831
20832    if test "x$PKGHANDLER_COMMAND" != x; then
20833      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20834    fi
20835  fi
20836
20837    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20838  fi
20839
20840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20841
20842  # First separate the path from the arguments. This will split at the first
20843  # space.
20844  complete="$CXX"
20845  path="${complete%% *}"
20846  tmp="$complete EOL"
20847  arguments="${tmp#* }"
20848
20849  # Input might be given as Windows format, start by converting to
20850  # unix format.
20851  new_path=`$CYGPATH -u "$path"`
20852
20853  # Now try to locate executable using which
20854  new_path=`$WHICH "$new_path" 2> /dev/null`
20855  # bat and cmd files are not always considered executable in cygwin causing which
20856  # to not find them
20857  if test "x$new_path" = x \
20858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20860    new_path=`$CYGPATH -u "$path"`
20861  fi
20862  if test "x$new_path" = x; then
20863    # Oops. Which didn't find the executable.
20864    # The splitting of arguments from the executable at a space might have been incorrect,
20865    # since paths with space are more likely in Windows. Give it another try with the whole
20866    # argument.
20867    path="$complete"
20868    arguments="EOL"
20869    new_path=`$CYGPATH -u "$path"`
20870    new_path=`$WHICH "$new_path" 2> /dev/null`
20871    # bat and cmd files are not always considered executable in cygwin causing which
20872    # to not find them
20873    if test "x$new_path" = x \
20874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20876      new_path=`$CYGPATH -u "$path"`
20877    fi
20878    if test "x$new_path" = x; then
20879      # It's still not found. Now this is an unrecoverable error.
20880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20881$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20882      has_space=`$ECHO "$complete" | $GREP " "`
20883      if test "x$has_space" != x; then
20884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20886      fi
20887      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20888    fi
20889  fi
20890
20891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20894  # "foo.exe" is OK but "foo" is an error.
20895  #
20896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20897  # It is also a way to make sure we got the proper file name for the real test later on.
20898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20899  if test "x$test_shortpath" = x; then
20900    # Short path failed, file does not exist as specified.
20901    # Try adding .exe or .cmd
20902    if test -f "${new_path}.exe"; then
20903      input_to_shortpath="${new_path}.exe"
20904    elif test -f "${new_path}.cmd"; then
20905      input_to_shortpath="${new_path}.cmd"
20906    else
20907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20908$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20911      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20912    fi
20913  else
20914    input_to_shortpath="$new_path"
20915  fi
20916
20917  # Call helper function which possibly converts this using DOS-style short mode.
20918  # If so, the updated path is stored in $new_path.
20919  new_path="$input_to_shortpath"
20920
20921  input_path="$input_to_shortpath"
20922  # Check if we need to convert this using DOS-style short mode. If the path
20923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20924  # take no chances and rewrite it.
20925  # Note: m4 eats our [], so we need to use [ and ] instead.
20926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20927  if test "x$has_forbidden_chars" != x; then
20928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20932      # Going to short mode and back again did indeed matter. Since short mode is
20933      # case insensitive, let's make it lowercase to improve readability.
20934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20935      # Now convert it back to Unix-stile (cygpath)
20936      input_path=`$CYGPATH -u "$shortmode_path"`
20937      new_path="$input_path"
20938    fi
20939  fi
20940
20941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20942  if test "x$test_cygdrive_prefix" = x; then
20943    # As a simple fix, exclude /usr/bin since it's not a real path.
20944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20946      # a path prefixed by /cygdrive for fixpath to work.
20947      new_path="$CYGWIN_ROOT_PATH$input_path"
20948    fi
20949  fi
20950
20951  # remove trailing .exe if any
20952  new_path="${new_path/%.exe/}"
20953
20954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20955
20956  # First separate the path from the arguments. This will split at the first
20957  # space.
20958  complete="$CXX"
20959  path="${complete%% *}"
20960  tmp="$complete EOL"
20961  arguments="${tmp#* }"
20962
20963  # Input might be given as Windows format, start by converting to
20964  # unix format.
20965  new_path="$path"
20966
20967  windows_path="$new_path"
20968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20969    unix_path=`$CYGPATH -u "$windows_path"`
20970    new_path="$unix_path"
20971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20973    new_path="$unix_path"
20974  fi
20975
20976
20977  # Now try to locate executable using which
20978  new_path=`$WHICH "$new_path" 2> /dev/null`
20979
20980  if test "x$new_path" = x; then
20981    # Oops. Which didn't find the executable.
20982    # The splitting of arguments from the executable at a space might have been incorrect,
20983    # since paths with space are more likely in Windows. Give it another try with the whole
20984    # argument.
20985    path="$complete"
20986    arguments="EOL"
20987    new_path="$path"
20988
20989  windows_path="$new_path"
20990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20991    unix_path=`$CYGPATH -u "$windows_path"`
20992    new_path="$unix_path"
20993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20995    new_path="$unix_path"
20996  fi
20997
20998
20999    new_path=`$WHICH "$new_path" 2> /dev/null`
21000
21001    if test "x$new_path" = x; then
21002      # It's still not found. Now this is an unrecoverable error.
21003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21004$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21005      has_space=`$ECHO "$complete" | $GREP " "`
21006      if test "x$has_space" != x; then
21007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21009      fi
21010      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21011    fi
21012  fi
21013
21014  # Now new_path has a complete unix path to the binary
21015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21016    # Keep paths in /bin as-is, but remove trailing .exe if any
21017    new_path="${new_path/%.exe/}"
21018    # Do not save /bin paths to all_fixpath_prefixes!
21019  else
21020    # Not in mixed or Windows style, start by that.
21021    new_path=`cmd //c echo $new_path`
21022
21023  input_path="$new_path"
21024  # Check if we need to convert this using DOS-style short mode. If the path
21025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21026  # take no chances and rewrite it.
21027  # Note: m4 eats our [], so we need to use [ and ] instead.
21028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21029  if test "x$has_forbidden_chars" != x; then
21030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21032  fi
21033
21034    # Output is in $new_path
21035
21036  windows_path="$new_path"
21037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21038    unix_path=`$CYGPATH -u "$windows_path"`
21039    new_path="$unix_path"
21040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21042    new_path="$unix_path"
21043  fi
21044
21045    # remove trailing .exe if any
21046    new_path="${new_path/%.exe/}"
21047
21048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21050  fi
21051
21052  else
21053    # We're on a posix platform. Hooray! :)
21054    # First separate the path from the arguments. This will split at the first
21055    # space.
21056    complete="$CXX"
21057    path="${complete%% *}"
21058    tmp="$complete EOL"
21059    arguments="${tmp#* }"
21060
21061    # Cannot rely on the command "which" here since it doesn't always work.
21062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21063    if test -z "$is_absolute_path"; then
21064      # Path to executable is not absolute. Find it.
21065      IFS_save="$IFS"
21066      IFS=:
21067      for p in $PATH; do
21068        if test -f "$p/$path" && test -x "$p/$path"; then
21069          new_path="$p/$path"
21070          break
21071        fi
21072      done
21073      IFS="$IFS_save"
21074    else
21075      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21076$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21077      new_path="$path"
21078    fi
21079
21080    if test "x$new_path" = x; then
21081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21082$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21083      has_space=`$ECHO "$complete" | $GREP " "`
21084      if test "x$has_space" != x; then
21085        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21087      fi
21088      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21089    fi
21090  fi
21091
21092  # Now join together the path and the arguments once again
21093  if test "x$arguments" != xEOL; then
21094    new_complete="$new_path ${arguments% *}"
21095  else
21096    new_complete="$new_path"
21097  fi
21098
21099  if test "x$complete" != "x$new_complete"; then
21100    CXX="$new_complete"
21101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21102$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21103  fi
21104
21105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21106$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21107  TEST_COMPILER="$CXX"
21108
21109  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21110    # Follow a chain of symbolic links. Use readlink
21111    # where it exists, else fall back to horribly
21112    # complicated shell code.
21113    if test "x$READLINK_TESTED" != yes; then
21114      # On MacOSX there is a readlink tool with a different
21115      # purpose than the GNU readlink tool. Check the found readlink.
21116      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21117      if test "x$ISGNU" = x; then
21118        # A readlink that we do not know how to use.
21119        # Are there other non-GNU readlinks out there?
21120        READLINK_TESTED=yes
21121        READLINK=
21122      fi
21123    fi
21124
21125    if test "x$READLINK" != x; then
21126      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21127    else
21128      # Save the current directory for restoring afterwards
21129      STARTDIR=$PWD
21130      COUNTER=0
21131      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21132      sym_link_file=`$BASENAME $TEST_COMPILER`
21133      cd $sym_link_dir
21134      # Use -P flag to resolve symlinks in directories.
21135      cd `$THEPWDCMD -P`
21136      sym_link_dir=`$THEPWDCMD -P`
21137      # Resolve file symlinks
21138      while test $COUNTER -lt 20; do
21139        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21140        if test "x$ISLINK" == x; then
21141          # This is not a symbolic link! We are done!
21142          break
21143        fi
21144        # Again resolve directory symlinks since the target of the just found
21145        # link could be in a different directory
21146        cd `$DIRNAME $ISLINK`
21147        sym_link_dir=`$THEPWDCMD -P`
21148        sym_link_file=`$BASENAME $ISLINK`
21149        let COUNTER=COUNTER+1
21150      done
21151      cd $STARTDIR
21152      TEST_COMPILER=$sym_link_dir/$sym_link_file
21153    fi
21154  fi
21155
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21157$as_echo "$TEST_COMPILER" >&6; }
21158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21159$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21160
21161  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21162  if test "x$COMPILER_BASENAME" = "xccache"; then
21163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21164$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21165    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21166    # We want to control ccache invocation ourselves, so ignore this cc and try
21167    # searching again.
21168
21169    # Remove the path to the fake ccache cc from the PATH
21170    RETRY_COMPILER_SAVED_PATH="$PATH"
21171    COMPILER_DIRNAME=`$DIRNAME $CXX`
21172    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21173
21174    # Try again looking for our compiler
21175    if test -n "$ac_tool_prefix"; then
21176  for ac_prog in $COMPILER_CHECK_LIST
21177  do
21178    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21179set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21181$as_echo_n "checking for $ac_word... " >&6; }
21182if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21183  $as_echo_n "(cached) " >&6
21184else
21185  if test -n "$PROPER_COMPILER_CXX"; then
21186  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21187else
21188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21189for as_dir in $PATH
21190do
21191  IFS=$as_save_IFS
21192  test -z "$as_dir" && as_dir=.
21193    for ac_exec_ext in '' $ac_executable_extensions; do
21194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21195    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21197    break 2
21198  fi
21199done
21200  done
21201IFS=$as_save_IFS
21202
21203fi
21204fi
21205PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21206if test -n "$PROPER_COMPILER_CXX"; then
21207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21208$as_echo "$PROPER_COMPILER_CXX" >&6; }
21209else
21210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21211$as_echo "no" >&6; }
21212fi
21213
21214
21215    test -n "$PROPER_COMPILER_CXX" && break
21216  done
21217fi
21218if test -z "$PROPER_COMPILER_CXX"; then
21219  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21220  for ac_prog in $COMPILER_CHECK_LIST
21221do
21222  # Extract the first word of "$ac_prog", so it can be a program name with args.
21223set dummy $ac_prog; ac_word=$2
21224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21225$as_echo_n "checking for $ac_word... " >&6; }
21226if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21227  $as_echo_n "(cached) " >&6
21228else
21229  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21230  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21231else
21232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21233for as_dir in $PATH
21234do
21235  IFS=$as_save_IFS
21236  test -z "$as_dir" && as_dir=.
21237    for ac_exec_ext in '' $ac_executable_extensions; do
21238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21239    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21241    break 2
21242  fi
21243done
21244  done
21245IFS=$as_save_IFS
21246
21247fi
21248fi
21249ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21250if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21252$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21253else
21254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21255$as_echo "no" >&6; }
21256fi
21257
21258
21259  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21260done
21261
21262  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21263    PROPER_COMPILER_CXX=""
21264  else
21265    case $cross_compiling:$ac_tool_warned in
21266yes:)
21267{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21268$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21269ac_tool_warned=yes ;;
21270esac
21271    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21272  fi
21273fi
21274
21275
21276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21277
21278  # First separate the path from the arguments. This will split at the first
21279  # space.
21280  complete="$PROPER_COMPILER_CXX"
21281  path="${complete%% *}"
21282  tmp="$complete EOL"
21283  arguments="${tmp#* }"
21284
21285  # Input might be given as Windows format, start by converting to
21286  # unix format.
21287  new_path=`$CYGPATH -u "$path"`
21288
21289  # Now try to locate executable using which
21290  new_path=`$WHICH "$new_path" 2> /dev/null`
21291  # bat and cmd files are not always considered executable in cygwin causing which
21292  # to not find them
21293  if test "x$new_path" = x \
21294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21296    new_path=`$CYGPATH -u "$path"`
21297  fi
21298  if test "x$new_path" = x; then
21299    # Oops. Which didn't find the executable.
21300    # The splitting of arguments from the executable at a space might have been incorrect,
21301    # since paths with space are more likely in Windows. Give it another try with the whole
21302    # argument.
21303    path="$complete"
21304    arguments="EOL"
21305    new_path=`$CYGPATH -u "$path"`
21306    new_path=`$WHICH "$new_path" 2> /dev/null`
21307    # bat and cmd files are not always considered executable in cygwin causing which
21308    # to not find them
21309    if test "x$new_path" = x \
21310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21312      new_path=`$CYGPATH -u "$path"`
21313    fi
21314    if test "x$new_path" = x; then
21315      # It's still not found. Now this is an unrecoverable error.
21316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21317$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21318      has_space=`$ECHO "$complete" | $GREP " "`
21319      if test "x$has_space" != x; then
21320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21322      fi
21323      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21324    fi
21325  fi
21326
21327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21330  # "foo.exe" is OK but "foo" is an error.
21331  #
21332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21333  # It is also a way to make sure we got the proper file name for the real test later on.
21334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21335  if test "x$test_shortpath" = x; then
21336    # Short path failed, file does not exist as specified.
21337    # Try adding .exe or .cmd
21338    if test -f "${new_path}.exe"; then
21339      input_to_shortpath="${new_path}.exe"
21340    elif test -f "${new_path}.cmd"; then
21341      input_to_shortpath="${new_path}.cmd"
21342    else
21343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21344$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21347      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21348    fi
21349  else
21350    input_to_shortpath="$new_path"
21351  fi
21352
21353  # Call helper function which possibly converts this using DOS-style short mode.
21354  # If so, the updated path is stored in $new_path.
21355  new_path="$input_to_shortpath"
21356
21357  input_path="$input_to_shortpath"
21358  # Check if we need to convert this using DOS-style short mode. If the path
21359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21360  # take no chances and rewrite it.
21361  # Note: m4 eats our [], so we need to use [ and ] instead.
21362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21363  if test "x$has_forbidden_chars" != x; then
21364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21368      # Going to short mode and back again did indeed matter. Since short mode is
21369      # case insensitive, let's make it lowercase to improve readability.
21370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21371      # Now convert it back to Unix-stile (cygpath)
21372      input_path=`$CYGPATH -u "$shortmode_path"`
21373      new_path="$input_path"
21374    fi
21375  fi
21376
21377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21378  if test "x$test_cygdrive_prefix" = x; then
21379    # As a simple fix, exclude /usr/bin since it's not a real path.
21380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21382      # a path prefixed by /cygdrive for fixpath to work.
21383      new_path="$CYGWIN_ROOT_PATH$input_path"
21384    fi
21385  fi
21386
21387  # remove trailing .exe if any
21388  new_path="${new_path/%.exe/}"
21389
21390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21391
21392  # First separate the path from the arguments. This will split at the first
21393  # space.
21394  complete="$PROPER_COMPILER_CXX"
21395  path="${complete%% *}"
21396  tmp="$complete EOL"
21397  arguments="${tmp#* }"
21398
21399  # Input might be given as Windows format, start by converting to
21400  # unix format.
21401  new_path="$path"
21402
21403  windows_path="$new_path"
21404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21405    unix_path=`$CYGPATH -u "$windows_path"`
21406    new_path="$unix_path"
21407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21409    new_path="$unix_path"
21410  fi
21411
21412
21413  # Now try to locate executable using which
21414  new_path=`$WHICH "$new_path" 2> /dev/null`
21415
21416  if test "x$new_path" = x; then
21417    # Oops. Which didn't find the executable.
21418    # The splitting of arguments from the executable at a space might have been incorrect,
21419    # since paths with space are more likely in Windows. Give it another try with the whole
21420    # argument.
21421    path="$complete"
21422    arguments="EOL"
21423    new_path="$path"
21424
21425  windows_path="$new_path"
21426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21427    unix_path=`$CYGPATH -u "$windows_path"`
21428    new_path="$unix_path"
21429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21431    new_path="$unix_path"
21432  fi
21433
21434
21435    new_path=`$WHICH "$new_path" 2> /dev/null`
21436
21437    if test "x$new_path" = x; then
21438      # It's still not found. Now this is an unrecoverable error.
21439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21440$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21441      has_space=`$ECHO "$complete" | $GREP " "`
21442      if test "x$has_space" != x; then
21443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21445      fi
21446      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21447    fi
21448  fi
21449
21450  # Now new_path has a complete unix path to the binary
21451  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21452    # Keep paths in /bin as-is, but remove trailing .exe if any
21453    new_path="${new_path/%.exe/}"
21454    # Do not save /bin paths to all_fixpath_prefixes!
21455  else
21456    # Not in mixed or Windows style, start by that.
21457    new_path=`cmd //c echo $new_path`
21458
21459  input_path="$new_path"
21460  # Check if we need to convert this using DOS-style short mode. If the path
21461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21462  # take no chances and rewrite it.
21463  # Note: m4 eats our [], so we need to use [ and ] instead.
21464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21465  if test "x$has_forbidden_chars" != x; then
21466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21468  fi
21469
21470    # Output is in $new_path
21471
21472  windows_path="$new_path"
21473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21474    unix_path=`$CYGPATH -u "$windows_path"`
21475    new_path="$unix_path"
21476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21478    new_path="$unix_path"
21479  fi
21480
21481    # remove trailing .exe if any
21482    new_path="${new_path/%.exe/}"
21483
21484    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21485    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21486  fi
21487
21488  else
21489    # We're on a posix platform. Hooray! :)
21490    # First separate the path from the arguments. This will split at the first
21491    # space.
21492    complete="$PROPER_COMPILER_CXX"
21493    path="${complete%% *}"
21494    tmp="$complete EOL"
21495    arguments="${tmp#* }"
21496
21497    # Cannot rely on the command "which" here since it doesn't always work.
21498    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21499    if test -z "$is_absolute_path"; then
21500      # Path to executable is not absolute. Find it.
21501      IFS_save="$IFS"
21502      IFS=:
21503      for p in $PATH; do
21504        if test -f "$p/$path" && test -x "$p/$path"; then
21505          new_path="$p/$path"
21506          break
21507        fi
21508      done
21509      IFS="$IFS_save"
21510    else
21511      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21512$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21513      new_path="$path"
21514    fi
21515
21516    if test "x$new_path" = x; then
21517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21518$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21519      has_space=`$ECHO "$complete" | $GREP " "`
21520      if test "x$has_space" != x; then
21521        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21522$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21523      fi
21524      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21525    fi
21526  fi
21527
21528  # Now join together the path and the arguments once again
21529  if test "x$arguments" != xEOL; then
21530    new_complete="$new_path ${arguments% *}"
21531  else
21532    new_complete="$new_path"
21533  fi
21534
21535  if test "x$complete" != "x$new_complete"; then
21536    PROPER_COMPILER_CXX="$new_complete"
21537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21538$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21539  fi
21540
21541    PATH="$RETRY_COMPILER_SAVED_PATH"
21542
21543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21544$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21545
21546  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21547    # Follow a chain of symbolic links. Use readlink
21548    # where it exists, else fall back to horribly
21549    # complicated shell code.
21550    if test "x$READLINK_TESTED" != yes; then
21551      # On MacOSX there is a readlink tool with a different
21552      # purpose than the GNU readlink tool. Check the found readlink.
21553      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21554      if test "x$ISGNU" = x; then
21555        # A readlink that we do not know how to use.
21556        # Are there other non-GNU readlinks out there?
21557        READLINK_TESTED=yes
21558        READLINK=
21559      fi
21560    fi
21561
21562    if test "x$READLINK" != x; then
21563      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21564    else
21565      # Save the current directory for restoring afterwards
21566      STARTDIR=$PWD
21567      COUNTER=0
21568      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21569      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21570      cd $sym_link_dir
21571      # Use -P flag to resolve symlinks in directories.
21572      cd `$THEPWDCMD -P`
21573      sym_link_dir=`$THEPWDCMD -P`
21574      # Resolve file symlinks
21575      while test $COUNTER -lt 20; do
21576        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21577        if test "x$ISLINK" == x; then
21578          # This is not a symbolic link! We are done!
21579          break
21580        fi
21581        # Again resolve directory symlinks since the target of the just found
21582        # link could be in a different directory
21583        cd `$DIRNAME $ISLINK`
21584        sym_link_dir=`$THEPWDCMD -P`
21585        sym_link_file=`$BASENAME $ISLINK`
21586        let COUNTER=COUNTER+1
21587      done
21588      cd $STARTDIR
21589      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21590    fi
21591  fi
21592
21593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21594$as_echo "$PROPER_COMPILER_CXX" >&6; }
21595    CXX="$PROPER_COMPILER_CXX"
21596  else
21597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21598$as_echo "no, keeping CXX" >&6; }
21599    CXX="$TEST_COMPILER"
21600  fi
21601
21602  COMPILER=$CXX
21603  COMPILER_NAME=$COMPILER_NAME
21604
21605  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21606    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21607    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21608    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21609    if test $? -ne 0; then
21610      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21611
21612      { $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
21613$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21614      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21615$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21616      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21617    else
21618      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21619      COMPILER_VENDOR="Sun Studio"
21620    fi
21621  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21622    # First line typically looks something like:
21623    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21624    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21625    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21626    COMPILER_VENDOR="Microsoft CL.EXE"
21627    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21628    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21629      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21630        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21631      fi
21632    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21633      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21634        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21635      fi
21636    fi
21637  else
21638    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21639    # Check that this is likely to be GCC.
21640    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21641    if test $? -ne 0; then
21642      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21643$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21644      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21645$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21646      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21647    fi
21648
21649    # First line typically looks something like:
21650    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21651    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21652    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21653  fi
21654  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21655  CXX_VERSION="$COMPILER_VERSION"
21656  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21657  CXX_VENDOR="$COMPILER_VENDOR"
21658
21659  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21660$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21661
21662
21663  # Now that we have resolved CXX ourself, let autoconf have its go at it
21664  ac_ext=cpp
21665ac_cpp='$CXXCPP $CPPFLAGS'
21666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21669if test -z "$CXX"; then
21670  if test -n "$CCC"; then
21671    CXX=$CCC
21672  else
21673    if test -n "$ac_tool_prefix"; then
21674  for ac_prog in $CXX
21675  do
21676    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21677set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21679$as_echo_n "checking for $ac_word... " >&6; }
21680if ${ac_cv_prog_CXX+:} false; then :
21681  $as_echo_n "(cached) " >&6
21682else
21683  if test -n "$CXX"; then
21684  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21685else
21686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21687for as_dir in $PATH
21688do
21689  IFS=$as_save_IFS
21690  test -z "$as_dir" && as_dir=.
21691    for ac_exec_ext in '' $ac_executable_extensions; do
21692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21693    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21695    break 2
21696  fi
21697done
21698  done
21699IFS=$as_save_IFS
21700
21701fi
21702fi
21703CXX=$ac_cv_prog_CXX
21704if test -n "$CXX"; then
21705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21706$as_echo "$CXX" >&6; }
21707else
21708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21709$as_echo "no" >&6; }
21710fi
21711
21712
21713    test -n "$CXX" && break
21714  done
21715fi
21716if test -z "$CXX"; then
21717  ac_ct_CXX=$CXX
21718  for ac_prog in $CXX
21719do
21720  # Extract the first word of "$ac_prog", so it can be a program name with args.
21721set dummy $ac_prog; ac_word=$2
21722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21723$as_echo_n "checking for $ac_word... " >&6; }
21724if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21725  $as_echo_n "(cached) " >&6
21726else
21727  if test -n "$ac_ct_CXX"; then
21728  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21729else
21730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21731for as_dir in $PATH
21732do
21733  IFS=$as_save_IFS
21734  test -z "$as_dir" && as_dir=.
21735    for ac_exec_ext in '' $ac_executable_extensions; do
21736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21737    ac_cv_prog_ac_ct_CXX="$ac_prog"
21738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21739    break 2
21740  fi
21741done
21742  done
21743IFS=$as_save_IFS
21744
21745fi
21746fi
21747ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21748if test -n "$ac_ct_CXX"; then
21749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21750$as_echo "$ac_ct_CXX" >&6; }
21751else
21752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21753$as_echo "no" >&6; }
21754fi
21755
21756
21757  test -n "$ac_ct_CXX" && break
21758done
21759
21760  if test "x$ac_ct_CXX" = x; then
21761    CXX="g++"
21762  else
21763    case $cross_compiling:$ac_tool_warned in
21764yes:)
21765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21767ac_tool_warned=yes ;;
21768esac
21769    CXX=$ac_ct_CXX
21770  fi
21771fi
21772
21773  fi
21774fi
21775# Provide some information about the compiler.
21776$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21777set X $ac_compile
21778ac_compiler=$2
21779for ac_option in --version -v -V -qversion; do
21780  { { ac_try="$ac_compiler $ac_option >&5"
21781case "(($ac_try" in
21782  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21783  *) ac_try_echo=$ac_try;;
21784esac
21785eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21786$as_echo "$ac_try_echo"; } >&5
21787  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21788  ac_status=$?
21789  if test -s conftest.err; then
21790    sed '10a\
21791... rest of stderr output deleted ...
21792         10q' conftest.err >conftest.er1
21793    cat conftest.er1 >&5
21794  fi
21795  rm -f conftest.er1 conftest.err
21796  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21797  test $ac_status = 0; }
21798done
21799
21800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21801$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21802if ${ac_cv_cxx_compiler_gnu+:} false; then :
21803  $as_echo_n "(cached) " >&6
21804else
21805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21806/* end confdefs.h.  */
21807
21808int
21809main ()
21810{
21811#ifndef __GNUC__
21812       choke me
21813#endif
21814
21815  ;
21816  return 0;
21817}
21818_ACEOF
21819if ac_fn_cxx_try_compile "$LINENO"; then :
21820  ac_compiler_gnu=yes
21821else
21822  ac_compiler_gnu=no
21823fi
21824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21825ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21826
21827fi
21828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21829$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21830if test $ac_compiler_gnu = yes; then
21831  GXX=yes
21832else
21833  GXX=
21834fi
21835ac_test_CXXFLAGS=${CXXFLAGS+set}
21836ac_save_CXXFLAGS=$CXXFLAGS
21837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21838$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21839if ${ac_cv_prog_cxx_g+:} false; then :
21840  $as_echo_n "(cached) " >&6
21841else
21842  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21843   ac_cxx_werror_flag=yes
21844   ac_cv_prog_cxx_g=no
21845   CXXFLAGS="-g"
21846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21847/* end confdefs.h.  */
21848
21849int
21850main ()
21851{
21852
21853  ;
21854  return 0;
21855}
21856_ACEOF
21857if ac_fn_cxx_try_compile "$LINENO"; then :
21858  ac_cv_prog_cxx_g=yes
21859else
21860  CXXFLAGS=""
21861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21862/* end confdefs.h.  */
21863
21864int
21865main ()
21866{
21867
21868  ;
21869  return 0;
21870}
21871_ACEOF
21872if ac_fn_cxx_try_compile "$LINENO"; then :
21873
21874else
21875  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21876	 CXXFLAGS="-g"
21877	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21878/* end confdefs.h.  */
21879
21880int
21881main ()
21882{
21883
21884  ;
21885  return 0;
21886}
21887_ACEOF
21888if ac_fn_cxx_try_compile "$LINENO"; then :
21889  ac_cv_prog_cxx_g=yes
21890fi
21891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21892fi
21893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21894fi
21895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21896   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21897fi
21898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21899$as_echo "$ac_cv_prog_cxx_g" >&6; }
21900if test "$ac_test_CXXFLAGS" = set; then
21901  CXXFLAGS=$ac_save_CXXFLAGS
21902elif test $ac_cv_prog_cxx_g = yes; then
21903  if test "$GXX" = yes; then
21904    CXXFLAGS="-g -O2"
21905  else
21906    CXXFLAGS="-g"
21907  fi
21908else
21909  if test "$GXX" = yes; then
21910    CXXFLAGS="-O2"
21911  else
21912    CXXFLAGS=
21913  fi
21914fi
21915ac_ext=cpp
21916ac_cpp='$CXXCPP $CPPFLAGS'
21917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21920
21921
21922  ### Locate other tools
21923
21924  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21925    ac_ext=m
21926ac_cpp='$OBJCPP $CPPFLAGS'
21927ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21928ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21929ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21930if test -n "$ac_tool_prefix"; then
21931  for ac_prog in gcc objcc objc cc CC
21932  do
21933    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21934set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21936$as_echo_n "checking for $ac_word... " >&6; }
21937if ${ac_cv_prog_OBJC+:} false; then :
21938  $as_echo_n "(cached) " >&6
21939else
21940  if test -n "$OBJC"; then
21941  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21942else
21943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21944for as_dir in $PATH
21945do
21946  IFS=$as_save_IFS
21947  test -z "$as_dir" && as_dir=.
21948    for ac_exec_ext in '' $ac_executable_extensions; do
21949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21950    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21952    break 2
21953  fi
21954done
21955  done
21956IFS=$as_save_IFS
21957
21958fi
21959fi
21960OBJC=$ac_cv_prog_OBJC
21961if test -n "$OBJC"; then
21962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21963$as_echo "$OBJC" >&6; }
21964else
21965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21966$as_echo "no" >&6; }
21967fi
21968
21969
21970    test -n "$OBJC" && break
21971  done
21972fi
21973if test -z "$OBJC"; then
21974  ac_ct_OBJC=$OBJC
21975  for ac_prog in gcc objcc objc cc CC
21976do
21977  # Extract the first word of "$ac_prog", so it can be a program name with args.
21978set dummy $ac_prog; ac_word=$2
21979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21980$as_echo_n "checking for $ac_word... " >&6; }
21981if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21982  $as_echo_n "(cached) " >&6
21983else
21984  if test -n "$ac_ct_OBJC"; then
21985  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21986else
21987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21988for as_dir in $PATH
21989do
21990  IFS=$as_save_IFS
21991  test -z "$as_dir" && as_dir=.
21992    for ac_exec_ext in '' $ac_executable_extensions; do
21993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21994    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21996    break 2
21997  fi
21998done
21999  done
22000IFS=$as_save_IFS
22001
22002fi
22003fi
22004ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22005if test -n "$ac_ct_OBJC"; then
22006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22007$as_echo "$ac_ct_OBJC" >&6; }
22008else
22009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22010$as_echo "no" >&6; }
22011fi
22012
22013
22014  test -n "$ac_ct_OBJC" && break
22015done
22016
22017  if test "x$ac_ct_OBJC" = x; then
22018    OBJC="gcc"
22019  else
22020    case $cross_compiling:$ac_tool_warned in
22021yes:)
22022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22024ac_tool_warned=yes ;;
22025esac
22026    OBJC=$ac_ct_OBJC
22027  fi
22028fi
22029
22030# Provide some information about the compiler.
22031$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22032set X $ac_compile
22033ac_compiler=$2
22034for ac_option in --version -v -V -qversion; do
22035  { { ac_try="$ac_compiler $ac_option >&5"
22036case "(($ac_try" in
22037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22038  *) ac_try_echo=$ac_try;;
22039esac
22040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22041$as_echo "$ac_try_echo"; } >&5
22042  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22043  ac_status=$?
22044  if test -s conftest.err; then
22045    sed '10a\
22046... rest of stderr output deleted ...
22047         10q' conftest.err >conftest.er1
22048    cat conftest.er1 >&5
22049  fi
22050  rm -f conftest.er1 conftest.err
22051  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22052  test $ac_status = 0; }
22053done
22054
22055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22056$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22057if ${ac_cv_objc_compiler_gnu+:} false; then :
22058  $as_echo_n "(cached) " >&6
22059else
22060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22061/* end confdefs.h.  */
22062
22063int
22064main ()
22065{
22066#ifndef __GNUC__
22067       choke me
22068#endif
22069
22070  ;
22071  return 0;
22072}
22073_ACEOF
22074if ac_fn_objc_try_compile "$LINENO"; then :
22075  ac_compiler_gnu=yes
22076else
22077  ac_compiler_gnu=no
22078fi
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22080ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22081
22082fi
22083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22084$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22085if test $ac_compiler_gnu = yes; then
22086  GOBJC=yes
22087else
22088  GOBJC=
22089fi
22090ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22091ac_save_OBJCFLAGS=$OBJCFLAGS
22092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22093$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22094if ${ac_cv_prog_objc_g+:} false; then :
22095  $as_echo_n "(cached) " >&6
22096else
22097  ac_save_objc_werror_flag=$ac_objc_werror_flag
22098   ac_objc_werror_flag=yes
22099   ac_cv_prog_objc_g=no
22100   OBJCFLAGS="-g"
22101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22102/* end confdefs.h.  */
22103
22104int
22105main ()
22106{
22107
22108  ;
22109  return 0;
22110}
22111_ACEOF
22112if ac_fn_objc_try_compile "$LINENO"; then :
22113  ac_cv_prog_objc_g=yes
22114else
22115  OBJCFLAGS=""
22116      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22117/* end confdefs.h.  */
22118
22119int
22120main ()
22121{
22122
22123  ;
22124  return 0;
22125}
22126_ACEOF
22127if ac_fn_objc_try_compile "$LINENO"; then :
22128
22129else
22130  ac_objc_werror_flag=$ac_save_objc_werror_flag
22131	 OBJCFLAGS="-g"
22132	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22133/* end confdefs.h.  */
22134
22135int
22136main ()
22137{
22138
22139  ;
22140  return 0;
22141}
22142_ACEOF
22143if ac_fn_objc_try_compile "$LINENO"; then :
22144  ac_cv_prog_objc_g=yes
22145fi
22146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22147fi
22148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22149fi
22150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22151   ac_objc_werror_flag=$ac_save_objc_werror_flag
22152fi
22153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22154$as_echo "$ac_cv_prog_objc_g" >&6; }
22155if test "$ac_test_OBJCFLAGS" = set; then
22156  OBJCFLAGS=$ac_save_OBJCFLAGS
22157elif test $ac_cv_prog_objc_g = yes; then
22158  if test "$GOBJC" = yes; then
22159    OBJCFLAGS="-g -O2"
22160  else
22161    OBJCFLAGS="-g"
22162  fi
22163else
22164  if test "$GOBJC" = yes; then
22165    OBJCFLAGS="-O2"
22166  else
22167    OBJCFLAGS=
22168  fi
22169fi
22170ac_ext=cpp
22171ac_cpp='$CXXCPP $CPPFLAGS'
22172ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22173ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22174ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22175
22176
22177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22178
22179  # First separate the path from the arguments. This will split at the first
22180  # space.
22181  complete="$OBJC"
22182  path="${complete%% *}"
22183  tmp="$complete EOL"
22184  arguments="${tmp#* }"
22185
22186  # Input might be given as Windows format, start by converting to
22187  # unix format.
22188  new_path=`$CYGPATH -u "$path"`
22189
22190  # Now try to locate executable using which
22191  new_path=`$WHICH "$new_path" 2> /dev/null`
22192  # bat and cmd files are not always considered executable in cygwin causing which
22193  # to not find them
22194  if test "x$new_path" = x \
22195      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22196      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22197    new_path=`$CYGPATH -u "$path"`
22198  fi
22199  if test "x$new_path" = x; then
22200    # Oops. Which didn't find the executable.
22201    # The splitting of arguments from the executable at a space might have been incorrect,
22202    # since paths with space are more likely in Windows. Give it another try with the whole
22203    # argument.
22204    path="$complete"
22205    arguments="EOL"
22206    new_path=`$CYGPATH -u "$path"`
22207    new_path=`$WHICH "$new_path" 2> /dev/null`
22208    # bat and cmd files are not always considered executable in cygwin causing which
22209    # to not find them
22210    if test "x$new_path" = x \
22211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22213      new_path=`$CYGPATH -u "$path"`
22214    fi
22215    if test "x$new_path" = x; then
22216      # It's still not found. Now this is an unrecoverable error.
22217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22218$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22219      has_space=`$ECHO "$complete" | $GREP " "`
22220      if test "x$has_space" != x; then
22221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22223      fi
22224      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22225    fi
22226  fi
22227
22228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22231  # "foo.exe" is OK but "foo" is an error.
22232  #
22233  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22234  # It is also a way to make sure we got the proper file name for the real test later on.
22235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22236  if test "x$test_shortpath" = x; then
22237    # Short path failed, file does not exist as specified.
22238    # Try adding .exe or .cmd
22239    if test -f "${new_path}.exe"; then
22240      input_to_shortpath="${new_path}.exe"
22241    elif test -f "${new_path}.cmd"; then
22242      input_to_shortpath="${new_path}.cmd"
22243    else
22244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22245$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22248      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22249    fi
22250  else
22251    input_to_shortpath="$new_path"
22252  fi
22253
22254  # Call helper function which possibly converts this using DOS-style short mode.
22255  # If so, the updated path is stored in $new_path.
22256  new_path="$input_to_shortpath"
22257
22258  input_path="$input_to_shortpath"
22259  # Check if we need to convert this using DOS-style short mode. If the path
22260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22261  # take no chances and rewrite it.
22262  # Note: m4 eats our [], so we need to use [ and ] instead.
22263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22264  if test "x$has_forbidden_chars" != x; then
22265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22269      # Going to short mode and back again did indeed matter. Since short mode is
22270      # case insensitive, let's make it lowercase to improve readability.
22271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22272      # Now convert it back to Unix-stile (cygpath)
22273      input_path=`$CYGPATH -u "$shortmode_path"`
22274      new_path="$input_path"
22275    fi
22276  fi
22277
22278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22279  if test "x$test_cygdrive_prefix" = x; then
22280    # As a simple fix, exclude /usr/bin since it's not a real path.
22281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22283      # a path prefixed by /cygdrive for fixpath to work.
22284      new_path="$CYGWIN_ROOT_PATH$input_path"
22285    fi
22286  fi
22287
22288  # remove trailing .exe if any
22289  new_path="${new_path/%.exe/}"
22290
22291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22292
22293  # First separate the path from the arguments. This will split at the first
22294  # space.
22295  complete="$OBJC"
22296  path="${complete%% *}"
22297  tmp="$complete EOL"
22298  arguments="${tmp#* }"
22299
22300  # Input might be given as Windows format, start by converting to
22301  # unix format.
22302  new_path="$path"
22303
22304  windows_path="$new_path"
22305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22306    unix_path=`$CYGPATH -u "$windows_path"`
22307    new_path="$unix_path"
22308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22310    new_path="$unix_path"
22311  fi
22312
22313
22314  # Now try to locate executable using which
22315  new_path=`$WHICH "$new_path" 2> /dev/null`
22316
22317  if test "x$new_path" = x; then
22318    # Oops. Which didn't find the executable.
22319    # The splitting of arguments from the executable at a space might have been incorrect,
22320    # since paths with space are more likely in Windows. Give it another try with the whole
22321    # argument.
22322    path="$complete"
22323    arguments="EOL"
22324    new_path="$path"
22325
22326  windows_path="$new_path"
22327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22328    unix_path=`$CYGPATH -u "$windows_path"`
22329    new_path="$unix_path"
22330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22332    new_path="$unix_path"
22333  fi
22334
22335
22336    new_path=`$WHICH "$new_path" 2> /dev/null`
22337
22338    if test "x$new_path" = x; then
22339      # It's still not found. Now this is an unrecoverable error.
22340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22341$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22342      has_space=`$ECHO "$complete" | $GREP " "`
22343      if test "x$has_space" != x; then
22344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22346      fi
22347      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22348    fi
22349  fi
22350
22351  # Now new_path has a complete unix path to the binary
22352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22353    # Keep paths in /bin as-is, but remove trailing .exe if any
22354    new_path="${new_path/%.exe/}"
22355    # Do not save /bin paths to all_fixpath_prefixes!
22356  else
22357    # Not in mixed or Windows style, start by that.
22358    new_path=`cmd //c echo $new_path`
22359
22360  input_path="$new_path"
22361  # Check if we need to convert this using DOS-style short mode. If the path
22362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22363  # take no chances and rewrite it.
22364  # Note: m4 eats our [], so we need to use [ and ] instead.
22365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22366  if test "x$has_forbidden_chars" != x; then
22367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22369  fi
22370
22371    # Output is in $new_path
22372
22373  windows_path="$new_path"
22374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22375    unix_path=`$CYGPATH -u "$windows_path"`
22376    new_path="$unix_path"
22377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22379    new_path="$unix_path"
22380  fi
22381
22382    # remove trailing .exe if any
22383    new_path="${new_path/%.exe/}"
22384
22385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22387  fi
22388
22389  else
22390    # We're on a posix platform. Hooray! :)
22391    # First separate the path from the arguments. This will split at the first
22392    # space.
22393    complete="$OBJC"
22394    path="${complete%% *}"
22395    tmp="$complete EOL"
22396    arguments="${tmp#* }"
22397
22398    # Cannot rely on the command "which" here since it doesn't always work.
22399    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22400    if test -z "$is_absolute_path"; then
22401      # Path to executable is not absolute. Find it.
22402      IFS_save="$IFS"
22403      IFS=:
22404      for p in $PATH; do
22405        if test -f "$p/$path" && test -x "$p/$path"; then
22406          new_path="$p/$path"
22407          break
22408        fi
22409      done
22410      IFS="$IFS_save"
22411    else
22412      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22413$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22414      new_path="$path"
22415    fi
22416
22417    if test "x$new_path" = x; then
22418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22419$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22420      has_space=`$ECHO "$complete" | $GREP " "`
22421      if test "x$has_space" != x; then
22422        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22423$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22424      fi
22425      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22426    fi
22427  fi
22428
22429  # Now join together the path and the arguments once again
22430  if test "x$arguments" != xEOL; then
22431    new_complete="$new_path ${arguments% *}"
22432  else
22433    new_complete="$new_path"
22434  fi
22435
22436  if test "x$complete" != "x$new_complete"; then
22437    OBJC="$new_complete"
22438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22439$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22440  fi
22441
22442  else
22443    OBJC=
22444  fi
22445
22446  # Restore the flags to the user specified values.
22447  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22448  CFLAGS="$ORG_CFLAGS"
22449  CXXFLAGS="$ORG_CXXFLAGS"
22450  OBJCFLAGS="$ORG_OBJCFLAGS"
22451
22452  LD="$CC"
22453  LDEXE="$CC"
22454  LDCXX="$CXX"
22455  LDEXECXX="$CXX"
22456
22457  # LDEXE is the linker to use, when creating executables.
22458
22459  # Linking C++ libraries.
22460
22461  # Linking C++ executables.
22462
22463
22464  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22465    if test -n "$ac_tool_prefix"; then
22466  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22467set dummy ${ac_tool_prefix}ar; ac_word=$2
22468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22469$as_echo_n "checking for $ac_word... " >&6; }
22470if ${ac_cv_prog_AR+:} false; then :
22471  $as_echo_n "(cached) " >&6
22472else
22473  if test -n "$AR"; then
22474  ac_cv_prog_AR="$AR" # Let the user override the test.
22475else
22476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22477for as_dir in $PATH
22478do
22479  IFS=$as_save_IFS
22480  test -z "$as_dir" && as_dir=.
22481    for ac_exec_ext in '' $ac_executable_extensions; do
22482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22483    ac_cv_prog_AR="${ac_tool_prefix}ar"
22484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22485    break 2
22486  fi
22487done
22488  done
22489IFS=$as_save_IFS
22490
22491fi
22492fi
22493AR=$ac_cv_prog_AR
22494if test -n "$AR"; then
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22496$as_echo "$AR" >&6; }
22497else
22498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22499$as_echo "no" >&6; }
22500fi
22501
22502
22503fi
22504if test -z "$ac_cv_prog_AR"; then
22505  ac_ct_AR=$AR
22506  # Extract the first word of "ar", so it can be a program name with args.
22507set dummy ar; ac_word=$2
22508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22509$as_echo_n "checking for $ac_word... " >&6; }
22510if ${ac_cv_prog_ac_ct_AR+:} false; then :
22511  $as_echo_n "(cached) " >&6
22512else
22513  if test -n "$ac_ct_AR"; then
22514  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22515else
22516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22517for as_dir in $PATH
22518do
22519  IFS=$as_save_IFS
22520  test -z "$as_dir" && as_dir=.
22521    for ac_exec_ext in '' $ac_executable_extensions; do
22522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22523    ac_cv_prog_ac_ct_AR="ar"
22524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22525    break 2
22526  fi
22527done
22528  done
22529IFS=$as_save_IFS
22530
22531fi
22532fi
22533ac_ct_AR=$ac_cv_prog_ac_ct_AR
22534if test -n "$ac_ct_AR"; then
22535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22536$as_echo "$ac_ct_AR" >&6; }
22537else
22538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22539$as_echo "no" >&6; }
22540fi
22541
22542  if test "x$ac_ct_AR" = x; then
22543    AR=""
22544  else
22545    case $cross_compiling:$ac_tool_warned in
22546yes:)
22547{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22548$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22549ac_tool_warned=yes ;;
22550esac
22551    AR=$ac_ct_AR
22552  fi
22553else
22554  AR="$ac_cv_prog_AR"
22555fi
22556
22557
22558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22559
22560  # First separate the path from the arguments. This will split at the first
22561  # space.
22562  complete="$AR"
22563  path="${complete%% *}"
22564  tmp="$complete EOL"
22565  arguments="${tmp#* }"
22566
22567  # Input might be given as Windows format, start by converting to
22568  # unix format.
22569  new_path=`$CYGPATH -u "$path"`
22570
22571  # Now try to locate executable using which
22572  new_path=`$WHICH "$new_path" 2> /dev/null`
22573  # bat and cmd files are not always considered executable in cygwin causing which
22574  # to not find them
22575  if test "x$new_path" = x \
22576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22578    new_path=`$CYGPATH -u "$path"`
22579  fi
22580  if test "x$new_path" = x; then
22581    # Oops. Which didn't find the executable.
22582    # The splitting of arguments from the executable at a space might have been incorrect,
22583    # since paths with space are more likely in Windows. Give it another try with the whole
22584    # argument.
22585    path="$complete"
22586    arguments="EOL"
22587    new_path=`$CYGPATH -u "$path"`
22588    new_path=`$WHICH "$new_path" 2> /dev/null`
22589    # bat and cmd files are not always considered executable in cygwin causing which
22590    # to not find them
22591    if test "x$new_path" = x \
22592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22594      new_path=`$CYGPATH -u "$path"`
22595    fi
22596    if test "x$new_path" = x; then
22597      # It's still not found. Now this is an unrecoverable error.
22598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22599$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22600      has_space=`$ECHO "$complete" | $GREP " "`
22601      if test "x$has_space" != x; then
22602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22604      fi
22605      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22606    fi
22607  fi
22608
22609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22612  # "foo.exe" is OK but "foo" is an error.
22613  #
22614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22615  # It is also a way to make sure we got the proper file name for the real test later on.
22616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22617  if test "x$test_shortpath" = x; then
22618    # Short path failed, file does not exist as specified.
22619    # Try adding .exe or .cmd
22620    if test -f "${new_path}.exe"; then
22621      input_to_shortpath="${new_path}.exe"
22622    elif test -f "${new_path}.cmd"; then
22623      input_to_shortpath="${new_path}.cmd"
22624    else
22625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22626$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22629      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22630    fi
22631  else
22632    input_to_shortpath="$new_path"
22633  fi
22634
22635  # Call helper function which possibly converts this using DOS-style short mode.
22636  # If so, the updated path is stored in $new_path.
22637  new_path="$input_to_shortpath"
22638
22639  input_path="$input_to_shortpath"
22640  # Check if we need to convert this using DOS-style short mode. If the path
22641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22642  # take no chances and rewrite it.
22643  # Note: m4 eats our [], so we need to use [ and ] instead.
22644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22645  if test "x$has_forbidden_chars" != x; then
22646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22650      # Going to short mode and back again did indeed matter. Since short mode is
22651      # case insensitive, let's make it lowercase to improve readability.
22652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22653      # Now convert it back to Unix-stile (cygpath)
22654      input_path=`$CYGPATH -u "$shortmode_path"`
22655      new_path="$input_path"
22656    fi
22657  fi
22658
22659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22660  if test "x$test_cygdrive_prefix" = x; then
22661    # As a simple fix, exclude /usr/bin since it's not a real path.
22662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22664      # a path prefixed by /cygdrive for fixpath to work.
22665      new_path="$CYGWIN_ROOT_PATH$input_path"
22666    fi
22667  fi
22668
22669  # remove trailing .exe if any
22670  new_path="${new_path/%.exe/}"
22671
22672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22673
22674  # First separate the path from the arguments. This will split at the first
22675  # space.
22676  complete="$AR"
22677  path="${complete%% *}"
22678  tmp="$complete EOL"
22679  arguments="${tmp#* }"
22680
22681  # Input might be given as Windows format, start by converting to
22682  # unix format.
22683  new_path="$path"
22684
22685  windows_path="$new_path"
22686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687    unix_path=`$CYGPATH -u "$windows_path"`
22688    new_path="$unix_path"
22689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22691    new_path="$unix_path"
22692  fi
22693
22694
22695  # Now try to locate executable using which
22696  new_path=`$WHICH "$new_path" 2> /dev/null`
22697
22698  if test "x$new_path" = x; then
22699    # Oops. Which didn't find the executable.
22700    # The splitting of arguments from the executable at a space might have been incorrect,
22701    # since paths with space are more likely in Windows. Give it another try with the whole
22702    # argument.
22703    path="$complete"
22704    arguments="EOL"
22705    new_path="$path"
22706
22707  windows_path="$new_path"
22708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22709    unix_path=`$CYGPATH -u "$windows_path"`
22710    new_path="$unix_path"
22711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22713    new_path="$unix_path"
22714  fi
22715
22716
22717    new_path=`$WHICH "$new_path" 2> /dev/null`
22718
22719    if test "x$new_path" = x; then
22720      # It's still not found. Now this is an unrecoverable error.
22721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22722$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22723      has_space=`$ECHO "$complete" | $GREP " "`
22724      if test "x$has_space" != x; then
22725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22727      fi
22728      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22729    fi
22730  fi
22731
22732  # Now new_path has a complete unix path to the binary
22733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22734    # Keep paths in /bin as-is, but remove trailing .exe if any
22735    new_path="${new_path/%.exe/}"
22736    # Do not save /bin paths to all_fixpath_prefixes!
22737  else
22738    # Not in mixed or Windows style, start by that.
22739    new_path=`cmd //c echo $new_path`
22740
22741  input_path="$new_path"
22742  # Check if we need to convert this using DOS-style short mode. If the path
22743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22744  # take no chances and rewrite it.
22745  # Note: m4 eats our [], so we need to use [ and ] instead.
22746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22747  if test "x$has_forbidden_chars" != x; then
22748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22750  fi
22751
22752    # Output is in $new_path
22753
22754  windows_path="$new_path"
22755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22756    unix_path=`$CYGPATH -u "$windows_path"`
22757    new_path="$unix_path"
22758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22760    new_path="$unix_path"
22761  fi
22762
22763    # remove trailing .exe if any
22764    new_path="${new_path/%.exe/}"
22765
22766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22768  fi
22769
22770  else
22771    # We're on a posix platform. Hooray! :)
22772    # First separate the path from the arguments. This will split at the first
22773    # space.
22774    complete="$AR"
22775    path="${complete%% *}"
22776    tmp="$complete EOL"
22777    arguments="${tmp#* }"
22778
22779    # Cannot rely on the command "which" here since it doesn't always work.
22780    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22781    if test -z "$is_absolute_path"; then
22782      # Path to executable is not absolute. Find it.
22783      IFS_save="$IFS"
22784      IFS=:
22785      for p in $PATH; do
22786        if test -f "$p/$path" && test -x "$p/$path"; then
22787          new_path="$p/$path"
22788          break
22789        fi
22790      done
22791      IFS="$IFS_save"
22792    else
22793      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22794$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22795      new_path="$path"
22796    fi
22797
22798    if test "x$new_path" = x; then
22799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22800$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22801      has_space=`$ECHO "$complete" | $GREP " "`
22802      if test "x$has_space" != x; then
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22804$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22805      fi
22806      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22807    fi
22808  fi
22809
22810  # Now join together the path and the arguments once again
22811  if test "x$arguments" != xEOL; then
22812    new_complete="$new_path ${arguments% *}"
22813  else
22814    new_complete="$new_path"
22815  fi
22816
22817  if test "x$complete" != "x$new_complete"; then
22818    AR="$new_complete"
22819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22820$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22821  fi
22822
22823  fi
22824  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22825    ARFLAGS="-r"
22826  else
22827    ARFLAGS=""
22828  fi
22829
22830
22831  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22832  HOTSPOT_CXX="$CXX"
22833  HOTSPOT_LD="$LD"
22834
22835
22836
22837  COMPILER_NAME=gcc
22838  COMPILER_TYPE=CC
22839  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22840
22841    # For now, assume that we are always compiling using cl.exe.
22842    CC_OUT_OPTION=-Fo
22843    EXE_OUT_OPTION=-out:
22844    LD_OUT_OPTION=-out:
22845    AR_OUT_OPTION=-out:
22846    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22847    # program for something completely different.
22848    # Extract the first word of "link", so it can be a program name with args.
22849set dummy link; ac_word=$2
22850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22851$as_echo_n "checking for $ac_word... " >&6; }
22852if ${ac_cv_prog_WINLD+:} false; then :
22853  $as_echo_n "(cached) " >&6
22854else
22855  if test -n "$WINLD"; then
22856  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22857else
22858  ac_prog_rejected=no
22859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22860for as_dir in $PATH
22861do
22862  IFS=$as_save_IFS
22863  test -z "$as_dir" && as_dir=.
22864    for ac_exec_ext in '' $ac_executable_extensions; do
22865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22866    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22867       ac_prog_rejected=yes
22868       continue
22869     fi
22870    ac_cv_prog_WINLD="link"
22871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22872    break 2
22873  fi
22874done
22875  done
22876IFS=$as_save_IFS
22877
22878if test $ac_prog_rejected = yes; then
22879  # We found a bogon in the path, so make sure we never use it.
22880  set dummy $ac_cv_prog_WINLD
22881  shift
22882  if test $# != 0; then
22883    # We chose a different compiler from the bogus one.
22884    # However, it has the same basename, so the bogon will be chosen
22885    # first if we set WINLD to just the basename; use the full file name.
22886    shift
22887    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22888  fi
22889fi
22890fi
22891fi
22892WINLD=$ac_cv_prog_WINLD
22893if test -n "$WINLD"; then
22894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22895$as_echo "$WINLD" >&6; }
22896else
22897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22898$as_echo "no" >&6; }
22899fi
22900
22901
22902    # Since we must ignore the first found link, WINLD will contain
22903    # the full path to the link.exe program.
22904
22905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22906
22907  # First separate the path from the arguments. This will split at the first
22908  # space.
22909  complete="$WINLD"
22910  path="${complete%% *}"
22911  tmp="$complete EOL"
22912  arguments="${tmp#* }"
22913
22914  # Input might be given as Windows format, start by converting to
22915  # unix format.
22916  new_path=`$CYGPATH -u "$path"`
22917
22918  # Now try to locate executable using which
22919  new_path=`$WHICH "$new_path" 2> /dev/null`
22920  # bat and cmd files are not always considered executable in cygwin causing which
22921  # to not find them
22922  if test "x$new_path" = x \
22923      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22924      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22925    new_path=`$CYGPATH -u "$path"`
22926  fi
22927  if test "x$new_path" = x; then
22928    # Oops. Which didn't find the executable.
22929    # The splitting of arguments from the executable at a space might have been incorrect,
22930    # since paths with space are more likely in Windows. Give it another try with the whole
22931    # argument.
22932    path="$complete"
22933    arguments="EOL"
22934    new_path=`$CYGPATH -u "$path"`
22935    new_path=`$WHICH "$new_path" 2> /dev/null`
22936    # bat and cmd files are not always considered executable in cygwin causing which
22937    # to not find them
22938    if test "x$new_path" = x \
22939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22941      new_path=`$CYGPATH -u "$path"`
22942    fi
22943    if test "x$new_path" = x; then
22944      # It's still not found. Now this is an unrecoverable error.
22945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22946$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22947      has_space=`$ECHO "$complete" | $GREP " "`
22948      if test "x$has_space" != x; then
22949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22951      fi
22952      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22953    fi
22954  fi
22955
22956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22959  # "foo.exe" is OK but "foo" is an error.
22960  #
22961  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22962  # It is also a way to make sure we got the proper file name for the real test later on.
22963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22964  if test "x$test_shortpath" = x; then
22965    # Short path failed, file does not exist as specified.
22966    # Try adding .exe or .cmd
22967    if test -f "${new_path}.exe"; then
22968      input_to_shortpath="${new_path}.exe"
22969    elif test -f "${new_path}.cmd"; then
22970      input_to_shortpath="${new_path}.cmd"
22971    else
22972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22973$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22976      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22977    fi
22978  else
22979    input_to_shortpath="$new_path"
22980  fi
22981
22982  # Call helper function which possibly converts this using DOS-style short mode.
22983  # If so, the updated path is stored in $new_path.
22984  new_path="$input_to_shortpath"
22985
22986  input_path="$input_to_shortpath"
22987  # Check if we need to convert this using DOS-style short mode. If the path
22988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22989  # take no chances and rewrite it.
22990  # Note: m4 eats our [], so we need to use [ and ] instead.
22991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22992  if test "x$has_forbidden_chars" != x; then
22993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22997      # Going to short mode and back again did indeed matter. Since short mode is
22998      # case insensitive, let's make it lowercase to improve readability.
22999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23000      # Now convert it back to Unix-stile (cygpath)
23001      input_path=`$CYGPATH -u "$shortmode_path"`
23002      new_path="$input_path"
23003    fi
23004  fi
23005
23006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23007  if test "x$test_cygdrive_prefix" = x; then
23008    # As a simple fix, exclude /usr/bin since it's not a real path.
23009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23011      # a path prefixed by /cygdrive for fixpath to work.
23012      new_path="$CYGWIN_ROOT_PATH$input_path"
23013    fi
23014  fi
23015
23016  # remove trailing .exe if any
23017  new_path="${new_path/%.exe/}"
23018
23019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23020
23021  # First separate the path from the arguments. This will split at the first
23022  # space.
23023  complete="$WINLD"
23024  path="${complete%% *}"
23025  tmp="$complete EOL"
23026  arguments="${tmp#* }"
23027
23028  # Input might be given as Windows format, start by converting to
23029  # unix format.
23030  new_path="$path"
23031
23032  windows_path="$new_path"
23033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23034    unix_path=`$CYGPATH -u "$windows_path"`
23035    new_path="$unix_path"
23036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23038    new_path="$unix_path"
23039  fi
23040
23041
23042  # Now try to locate executable using which
23043  new_path=`$WHICH "$new_path" 2> /dev/null`
23044
23045  if test "x$new_path" = x; then
23046    # Oops. Which didn't find the executable.
23047    # The splitting of arguments from the executable at a space might have been incorrect,
23048    # since paths with space are more likely in Windows. Give it another try with the whole
23049    # argument.
23050    path="$complete"
23051    arguments="EOL"
23052    new_path="$path"
23053
23054  windows_path="$new_path"
23055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23056    unix_path=`$CYGPATH -u "$windows_path"`
23057    new_path="$unix_path"
23058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23060    new_path="$unix_path"
23061  fi
23062
23063
23064    new_path=`$WHICH "$new_path" 2> /dev/null`
23065
23066    if test "x$new_path" = x; then
23067      # It's still not found. Now this is an unrecoverable error.
23068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23069$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23070      has_space=`$ECHO "$complete" | $GREP " "`
23071      if test "x$has_space" != x; then
23072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23074      fi
23075      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23076    fi
23077  fi
23078
23079  # Now new_path has a complete unix path to the binary
23080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23081    # Keep paths in /bin as-is, but remove trailing .exe if any
23082    new_path="${new_path/%.exe/}"
23083    # Do not save /bin paths to all_fixpath_prefixes!
23084  else
23085    # Not in mixed or Windows style, start by that.
23086    new_path=`cmd //c echo $new_path`
23087
23088  input_path="$new_path"
23089  # Check if we need to convert this using DOS-style short mode. If the path
23090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23091  # take no chances and rewrite it.
23092  # Note: m4 eats our [], so we need to use [ and ] instead.
23093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23094  if test "x$has_forbidden_chars" != x; then
23095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23097  fi
23098
23099    # Output is in $new_path
23100
23101  windows_path="$new_path"
23102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23103    unix_path=`$CYGPATH -u "$windows_path"`
23104    new_path="$unix_path"
23105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23107    new_path="$unix_path"
23108  fi
23109
23110    # remove trailing .exe if any
23111    new_path="${new_path/%.exe/}"
23112
23113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23115  fi
23116
23117  else
23118    # We're on a posix platform. Hooray! :)
23119    # First separate the path from the arguments. This will split at the first
23120    # space.
23121    complete="$WINLD"
23122    path="${complete%% *}"
23123    tmp="$complete EOL"
23124    arguments="${tmp#* }"
23125
23126    # Cannot rely on the command "which" here since it doesn't always work.
23127    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23128    if test -z "$is_absolute_path"; then
23129      # Path to executable is not absolute. Find it.
23130      IFS_save="$IFS"
23131      IFS=:
23132      for p in $PATH; do
23133        if test -f "$p/$path" && test -x "$p/$path"; then
23134          new_path="$p/$path"
23135          break
23136        fi
23137      done
23138      IFS="$IFS_save"
23139    else
23140      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23141$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23142      new_path="$path"
23143    fi
23144
23145    if test "x$new_path" = x; then
23146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23147$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23148      has_space=`$ECHO "$complete" | $GREP " "`
23149      if test "x$has_space" != x; then
23150        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23152      fi
23153      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23154    fi
23155  fi
23156
23157  # Now join together the path and the arguments once again
23158  if test "x$arguments" != xEOL; then
23159    new_complete="$new_path ${arguments% *}"
23160  else
23161    new_complete="$new_path"
23162  fi
23163
23164  if test "x$complete" != "x$new_complete"; then
23165    WINLD="$new_complete"
23166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23167$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23168  fi
23169
23170    printf "Windows linker was found at $WINLD\n"
23171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23172$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23173    "$WINLD" --version > /dev/null
23174    if test $? -eq 0 ; then
23175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23176$as_echo "no" >&6; }
23177      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23178    else
23179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23180$as_echo "yes" >&6; }
23181    fi
23182    LD="$WINLD"
23183    LDEXE="$WINLD"
23184    LDCXX="$WINLD"
23185    LDEXECXX="$WINLD"
23186
23187    # Extract the first word of "mt", so it can be a program name with args.
23188set dummy mt; ac_word=$2
23189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23190$as_echo_n "checking for $ac_word... " >&6; }
23191if ${ac_cv_prog_MT+:} false; then :
23192  $as_echo_n "(cached) " >&6
23193else
23194  if test -n "$MT"; then
23195  ac_cv_prog_MT="$MT" # Let the user override the test.
23196else
23197  ac_prog_rejected=no
23198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23199for as_dir in $PATH
23200do
23201  IFS=$as_save_IFS
23202  test -z "$as_dir" && as_dir=.
23203    for ac_exec_ext in '' $ac_executable_extensions; do
23204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23205    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23206       ac_prog_rejected=yes
23207       continue
23208     fi
23209    ac_cv_prog_MT="mt"
23210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23211    break 2
23212  fi
23213done
23214  done
23215IFS=$as_save_IFS
23216
23217if test $ac_prog_rejected = yes; then
23218  # We found a bogon in the path, so make sure we never use it.
23219  set dummy $ac_cv_prog_MT
23220  shift
23221  if test $# != 0; then
23222    # We chose a different compiler from the bogus one.
23223    # However, it has the same basename, so the bogon will be chosen
23224    # first if we set MT to just the basename; use the full file name.
23225    shift
23226    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23227  fi
23228fi
23229fi
23230fi
23231MT=$ac_cv_prog_MT
23232if test -n "$MT"; then
23233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23234$as_echo "$MT" >&6; }
23235else
23236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23237$as_echo "no" >&6; }
23238fi
23239
23240
23241
23242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23243
23244  # First separate the path from the arguments. This will split at the first
23245  # space.
23246  complete="$MT"
23247  path="${complete%% *}"
23248  tmp="$complete EOL"
23249  arguments="${tmp#* }"
23250
23251  # Input might be given as Windows format, start by converting to
23252  # unix format.
23253  new_path=`$CYGPATH -u "$path"`
23254
23255  # Now try to locate executable using which
23256  new_path=`$WHICH "$new_path" 2> /dev/null`
23257  # bat and cmd files are not always considered executable in cygwin causing which
23258  # to not find them
23259  if test "x$new_path" = x \
23260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23262    new_path=`$CYGPATH -u "$path"`
23263  fi
23264  if test "x$new_path" = x; then
23265    # Oops. Which didn't find the executable.
23266    # The splitting of arguments from the executable at a space might have been incorrect,
23267    # since paths with space are more likely in Windows. Give it another try with the whole
23268    # argument.
23269    path="$complete"
23270    arguments="EOL"
23271    new_path=`$CYGPATH -u "$path"`
23272    new_path=`$WHICH "$new_path" 2> /dev/null`
23273    # bat and cmd files are not always considered executable in cygwin causing which
23274    # to not find them
23275    if test "x$new_path" = x \
23276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23278      new_path=`$CYGPATH -u "$path"`
23279    fi
23280    if test "x$new_path" = x; then
23281      # It's still not found. Now this is an unrecoverable error.
23282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23283$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23284      has_space=`$ECHO "$complete" | $GREP " "`
23285      if test "x$has_space" != x; then
23286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23288      fi
23289      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23290    fi
23291  fi
23292
23293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23296  # "foo.exe" is OK but "foo" is an error.
23297  #
23298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23299  # It is also a way to make sure we got the proper file name for the real test later on.
23300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23301  if test "x$test_shortpath" = x; then
23302    # Short path failed, file does not exist as specified.
23303    # Try adding .exe or .cmd
23304    if test -f "${new_path}.exe"; then
23305      input_to_shortpath="${new_path}.exe"
23306    elif test -f "${new_path}.cmd"; then
23307      input_to_shortpath="${new_path}.cmd"
23308    else
23309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23310$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23313      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23314    fi
23315  else
23316    input_to_shortpath="$new_path"
23317  fi
23318
23319  # Call helper function which possibly converts this using DOS-style short mode.
23320  # If so, the updated path is stored in $new_path.
23321  new_path="$input_to_shortpath"
23322
23323  input_path="$input_to_shortpath"
23324  # Check if we need to convert this using DOS-style short mode. If the path
23325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23326  # take no chances and rewrite it.
23327  # Note: m4 eats our [], so we need to use [ and ] instead.
23328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23329  if test "x$has_forbidden_chars" != x; then
23330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23334      # Going to short mode and back again did indeed matter. Since short mode is
23335      # case insensitive, let's make it lowercase to improve readability.
23336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23337      # Now convert it back to Unix-stile (cygpath)
23338      input_path=`$CYGPATH -u "$shortmode_path"`
23339      new_path="$input_path"
23340    fi
23341  fi
23342
23343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23344  if test "x$test_cygdrive_prefix" = x; then
23345    # As a simple fix, exclude /usr/bin since it's not a real path.
23346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23348      # a path prefixed by /cygdrive for fixpath to work.
23349      new_path="$CYGWIN_ROOT_PATH$input_path"
23350    fi
23351  fi
23352
23353  # remove trailing .exe if any
23354  new_path="${new_path/%.exe/}"
23355
23356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23357
23358  # First separate the path from the arguments. This will split at the first
23359  # space.
23360  complete="$MT"
23361  path="${complete%% *}"
23362  tmp="$complete EOL"
23363  arguments="${tmp#* }"
23364
23365  # Input might be given as Windows format, start by converting to
23366  # unix format.
23367  new_path="$path"
23368
23369  windows_path="$new_path"
23370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23371    unix_path=`$CYGPATH -u "$windows_path"`
23372    new_path="$unix_path"
23373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23375    new_path="$unix_path"
23376  fi
23377
23378
23379  # Now try to locate executable using which
23380  new_path=`$WHICH "$new_path" 2> /dev/null`
23381
23382  if test "x$new_path" = x; then
23383    # Oops. Which didn't find the executable.
23384    # The splitting of arguments from the executable at a space might have been incorrect,
23385    # since paths with space are more likely in Windows. Give it another try with the whole
23386    # argument.
23387    path="$complete"
23388    arguments="EOL"
23389    new_path="$path"
23390
23391  windows_path="$new_path"
23392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23393    unix_path=`$CYGPATH -u "$windows_path"`
23394    new_path="$unix_path"
23395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23397    new_path="$unix_path"
23398  fi
23399
23400
23401    new_path=`$WHICH "$new_path" 2> /dev/null`
23402
23403    if test "x$new_path" = x; then
23404      # It's still not found. Now this is an unrecoverable error.
23405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23406$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23407      has_space=`$ECHO "$complete" | $GREP " "`
23408      if test "x$has_space" != x; then
23409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23411      fi
23412      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23413    fi
23414  fi
23415
23416  # Now new_path has a complete unix path to the binary
23417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23418    # Keep paths in /bin as-is, but remove trailing .exe if any
23419    new_path="${new_path/%.exe/}"
23420    # Do not save /bin paths to all_fixpath_prefixes!
23421  else
23422    # Not in mixed or Windows style, start by that.
23423    new_path=`cmd //c echo $new_path`
23424
23425  input_path="$new_path"
23426  # Check if we need to convert this using DOS-style short mode. If the path
23427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23428  # take no chances and rewrite it.
23429  # Note: m4 eats our [], so we need to use [ and ] instead.
23430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23431  if test "x$has_forbidden_chars" != x; then
23432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23434  fi
23435
23436    # Output is in $new_path
23437
23438  windows_path="$new_path"
23439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23440    unix_path=`$CYGPATH -u "$windows_path"`
23441    new_path="$unix_path"
23442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23444    new_path="$unix_path"
23445  fi
23446
23447    # remove trailing .exe if any
23448    new_path="${new_path/%.exe/}"
23449
23450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23452  fi
23453
23454  else
23455    # We're on a posix platform. Hooray! :)
23456    # First separate the path from the arguments. This will split at the first
23457    # space.
23458    complete="$MT"
23459    path="${complete%% *}"
23460    tmp="$complete EOL"
23461    arguments="${tmp#* }"
23462
23463    # Cannot rely on the command "which" here since it doesn't always work.
23464    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23465    if test -z "$is_absolute_path"; then
23466      # Path to executable is not absolute. Find it.
23467      IFS_save="$IFS"
23468      IFS=:
23469      for p in $PATH; do
23470        if test -f "$p/$path" && test -x "$p/$path"; then
23471          new_path="$p/$path"
23472          break
23473        fi
23474      done
23475      IFS="$IFS_save"
23476    else
23477      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23478$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23479      new_path="$path"
23480    fi
23481
23482    if test "x$new_path" = x; then
23483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23484$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23485      has_space=`$ECHO "$complete" | $GREP " "`
23486      if test "x$has_space" != x; then
23487        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23489      fi
23490      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23491    fi
23492  fi
23493
23494  # Now join together the path and the arguments once again
23495  if test "x$arguments" != xEOL; then
23496    new_complete="$new_path ${arguments% *}"
23497  else
23498    new_complete="$new_path"
23499  fi
23500
23501  if test "x$complete" != "x$new_complete"; then
23502    MT="$new_complete"
23503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23504$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23505  fi
23506
23507    # The resource compiler
23508    # Extract the first word of "rc", so it can be a program name with args.
23509set dummy rc; ac_word=$2
23510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23511$as_echo_n "checking for $ac_word... " >&6; }
23512if ${ac_cv_prog_RC+:} false; then :
23513  $as_echo_n "(cached) " >&6
23514else
23515  if test -n "$RC"; then
23516  ac_cv_prog_RC="$RC" # Let the user override the test.
23517else
23518  ac_prog_rejected=no
23519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23520for as_dir in $PATH
23521do
23522  IFS=$as_save_IFS
23523  test -z "$as_dir" && as_dir=.
23524    for ac_exec_ext in '' $ac_executable_extensions; do
23525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23526    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23527       ac_prog_rejected=yes
23528       continue
23529     fi
23530    ac_cv_prog_RC="rc"
23531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23532    break 2
23533  fi
23534done
23535  done
23536IFS=$as_save_IFS
23537
23538if test $ac_prog_rejected = yes; then
23539  # We found a bogon in the path, so make sure we never use it.
23540  set dummy $ac_cv_prog_RC
23541  shift
23542  if test $# != 0; then
23543    # We chose a different compiler from the bogus one.
23544    # However, it has the same basename, so the bogon will be chosen
23545    # first if we set RC to just the basename; use the full file name.
23546    shift
23547    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23548  fi
23549fi
23550fi
23551fi
23552RC=$ac_cv_prog_RC
23553if test -n "$RC"; then
23554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23555$as_echo "$RC" >&6; }
23556else
23557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23558$as_echo "no" >&6; }
23559fi
23560
23561
23562
23563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23564
23565  # First separate the path from the arguments. This will split at the first
23566  # space.
23567  complete="$RC"
23568  path="${complete%% *}"
23569  tmp="$complete EOL"
23570  arguments="${tmp#* }"
23571
23572  # Input might be given as Windows format, start by converting to
23573  # unix format.
23574  new_path=`$CYGPATH -u "$path"`
23575
23576  # Now try to locate executable using which
23577  new_path=`$WHICH "$new_path" 2> /dev/null`
23578  # bat and cmd files are not always considered executable in cygwin causing which
23579  # to not find them
23580  if test "x$new_path" = x \
23581      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23582      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23583    new_path=`$CYGPATH -u "$path"`
23584  fi
23585  if test "x$new_path" = x; then
23586    # Oops. Which didn't find the executable.
23587    # The splitting of arguments from the executable at a space might have been incorrect,
23588    # since paths with space are more likely in Windows. Give it another try with the whole
23589    # argument.
23590    path="$complete"
23591    arguments="EOL"
23592    new_path=`$CYGPATH -u "$path"`
23593    new_path=`$WHICH "$new_path" 2> /dev/null`
23594    # bat and cmd files are not always considered executable in cygwin causing which
23595    # to not find them
23596    if test "x$new_path" = x \
23597        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23598        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23599      new_path=`$CYGPATH -u "$path"`
23600    fi
23601    if test "x$new_path" = x; then
23602      # It's still not found. Now this is an unrecoverable error.
23603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23604$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23605      has_space=`$ECHO "$complete" | $GREP " "`
23606      if test "x$has_space" != x; then
23607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23609      fi
23610      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23611    fi
23612  fi
23613
23614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23617  # "foo.exe" is OK but "foo" is an error.
23618  #
23619  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23620  # It is also a way to make sure we got the proper file name for the real test later on.
23621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23622  if test "x$test_shortpath" = x; then
23623    # Short path failed, file does not exist as specified.
23624    # Try adding .exe or .cmd
23625    if test -f "${new_path}.exe"; then
23626      input_to_shortpath="${new_path}.exe"
23627    elif test -f "${new_path}.cmd"; then
23628      input_to_shortpath="${new_path}.cmd"
23629    else
23630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23631$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23632      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23633$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23634      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23635    fi
23636  else
23637    input_to_shortpath="$new_path"
23638  fi
23639
23640  # Call helper function which possibly converts this using DOS-style short mode.
23641  # If so, the updated path is stored in $new_path.
23642  new_path="$input_to_shortpath"
23643
23644  input_path="$input_to_shortpath"
23645  # Check if we need to convert this using DOS-style short mode. If the path
23646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23647  # take no chances and rewrite it.
23648  # Note: m4 eats our [], so we need to use [ and ] instead.
23649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23650  if test "x$has_forbidden_chars" != x; then
23651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23655      # Going to short mode and back again did indeed matter. Since short mode is
23656      # case insensitive, let's make it lowercase to improve readability.
23657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23658      # Now convert it back to Unix-stile (cygpath)
23659      input_path=`$CYGPATH -u "$shortmode_path"`
23660      new_path="$input_path"
23661    fi
23662  fi
23663
23664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23665  if test "x$test_cygdrive_prefix" = x; then
23666    # As a simple fix, exclude /usr/bin since it's not a real path.
23667    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23669      # a path prefixed by /cygdrive for fixpath to work.
23670      new_path="$CYGWIN_ROOT_PATH$input_path"
23671    fi
23672  fi
23673
23674  # remove trailing .exe if any
23675  new_path="${new_path/%.exe/}"
23676
23677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23678
23679  # First separate the path from the arguments. This will split at the first
23680  # space.
23681  complete="$RC"
23682  path="${complete%% *}"
23683  tmp="$complete EOL"
23684  arguments="${tmp#* }"
23685
23686  # Input might be given as Windows format, start by converting to
23687  # unix format.
23688  new_path="$path"
23689
23690  windows_path="$new_path"
23691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23692    unix_path=`$CYGPATH -u "$windows_path"`
23693    new_path="$unix_path"
23694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23696    new_path="$unix_path"
23697  fi
23698
23699
23700  # Now try to locate executable using which
23701  new_path=`$WHICH "$new_path" 2> /dev/null`
23702
23703  if test "x$new_path" = x; then
23704    # Oops. Which didn't find the executable.
23705    # The splitting of arguments from the executable at a space might have been incorrect,
23706    # since paths with space are more likely in Windows. Give it another try with the whole
23707    # argument.
23708    path="$complete"
23709    arguments="EOL"
23710    new_path="$path"
23711
23712  windows_path="$new_path"
23713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23714    unix_path=`$CYGPATH -u "$windows_path"`
23715    new_path="$unix_path"
23716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23718    new_path="$unix_path"
23719  fi
23720
23721
23722    new_path=`$WHICH "$new_path" 2> /dev/null`
23723
23724    if test "x$new_path" = x; then
23725      # It's still not found. Now this is an unrecoverable error.
23726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23727$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23728      has_space=`$ECHO "$complete" | $GREP " "`
23729      if test "x$has_space" != x; then
23730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23732      fi
23733      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23734    fi
23735  fi
23736
23737  # Now new_path has a complete unix path to the binary
23738  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23739    # Keep paths in /bin as-is, but remove trailing .exe if any
23740    new_path="${new_path/%.exe/}"
23741    # Do not save /bin paths to all_fixpath_prefixes!
23742  else
23743    # Not in mixed or Windows style, start by that.
23744    new_path=`cmd //c echo $new_path`
23745
23746  input_path="$new_path"
23747  # Check if we need to convert this using DOS-style short mode. If the path
23748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23749  # take no chances and rewrite it.
23750  # Note: m4 eats our [], so we need to use [ and ] instead.
23751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23752  if test "x$has_forbidden_chars" != x; then
23753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23755  fi
23756
23757    # Output is in $new_path
23758
23759  windows_path="$new_path"
23760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23761    unix_path=`$CYGPATH -u "$windows_path"`
23762    new_path="$unix_path"
23763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23765    new_path="$unix_path"
23766  fi
23767
23768    # remove trailing .exe if any
23769    new_path="${new_path/%.exe/}"
23770
23771    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23772    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23773  fi
23774
23775  else
23776    # We're on a posix platform. Hooray! :)
23777    # First separate the path from the arguments. This will split at the first
23778    # space.
23779    complete="$RC"
23780    path="${complete%% *}"
23781    tmp="$complete EOL"
23782    arguments="${tmp#* }"
23783
23784    # Cannot rely on the command "which" here since it doesn't always work.
23785    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23786    if test -z "$is_absolute_path"; then
23787      # Path to executable is not absolute. Find it.
23788      IFS_save="$IFS"
23789      IFS=:
23790      for p in $PATH; do
23791        if test -f "$p/$path" && test -x "$p/$path"; then
23792          new_path="$p/$path"
23793          break
23794        fi
23795      done
23796      IFS="$IFS_save"
23797    else
23798      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23799$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23800      new_path="$path"
23801    fi
23802
23803    if test "x$new_path" = x; then
23804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23805$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23806      has_space=`$ECHO "$complete" | $GREP " "`
23807      if test "x$has_space" != x; then
23808        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23809$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23810      fi
23811      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23812    fi
23813  fi
23814
23815  # Now join together the path and the arguments once again
23816  if test "x$arguments" != xEOL; then
23817    new_complete="$new_path ${arguments% *}"
23818  else
23819    new_complete="$new_path"
23820  fi
23821
23822  if test "x$complete" != "x$new_complete"; then
23823    RC="$new_complete"
23824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23825$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23826  fi
23827
23828
23829    # For hotspot, we need these in Windows mixed path,
23830    # so rewrite them all. Need added .exe suffix.
23831    HOTSPOT_CXX="$CXX.exe"
23832    HOTSPOT_LD="$LD.exe"
23833    HOTSPOT_MT="$MT.exe"
23834    HOTSPOT_RC="$RC.exe"
23835
23836  unix_path="$HOTSPOT_CXX"
23837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838    windows_path=`$CYGPATH -m "$unix_path"`
23839    HOTSPOT_CXX="$windows_path"
23840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841    windows_path=`cmd //c echo $unix_path`
23842    HOTSPOT_CXX="$windows_path"
23843  fi
23844
23845
23846  unix_path="$HOTSPOT_LD"
23847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23848    windows_path=`$CYGPATH -m "$unix_path"`
23849    HOTSPOT_LD="$windows_path"
23850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23851    windows_path=`cmd //c echo $unix_path`
23852    HOTSPOT_LD="$windows_path"
23853  fi
23854
23855
23856  unix_path="$HOTSPOT_MT"
23857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23858    windows_path=`$CYGPATH -m "$unix_path"`
23859    HOTSPOT_MT="$windows_path"
23860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23861    windows_path=`cmd //c echo $unix_path`
23862    HOTSPOT_MT="$windows_path"
23863  fi
23864
23865
23866  unix_path="$HOTSPOT_RC"
23867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23868    windows_path=`$CYGPATH -m "$unix_path"`
23869    HOTSPOT_RC="$windows_path"
23870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23871    windows_path=`cmd //c echo $unix_path`
23872    HOTSPOT_RC="$windows_path"
23873  fi
23874
23875
23876
23877
23878    RC_FLAGS="-nologo -l 0x409 -r"
23879    if test "x$VARIANT" = xOPT; then :
23880
23881    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23882
23883fi
23884
23885  # The version variables used to create RC_FLAGS may be overridden
23886  # in a custom configure script, or possibly the command line.
23887  # Let those variables be expanded at make time in spec.gmk.
23888  # The \$ are escaped to the shell, and the $(...) variables
23889  # are evaluated by make.
23890  RC_FLAGS="$RC_FLAGS \
23891      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23892      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23893      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23894      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23895      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23896      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23897      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23898
23899  # lib.exe is used to create static libraries.
23900  # Extract the first word of "lib", so it can be a program name with args.
23901set dummy lib; ac_word=$2
23902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23903$as_echo_n "checking for $ac_word... " >&6; }
23904if ${ac_cv_prog_WINAR+:} false; then :
23905  $as_echo_n "(cached) " >&6
23906else
23907  if test -n "$WINAR"; then
23908  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23909else
23910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23911for as_dir in $PATH
23912do
23913  IFS=$as_save_IFS
23914  test -z "$as_dir" && as_dir=.
23915    for ac_exec_ext in '' $ac_executable_extensions; do
23916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23917    ac_cv_prog_WINAR="lib"
23918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23919    break 2
23920  fi
23921done
23922  done
23923IFS=$as_save_IFS
23924
23925fi
23926fi
23927WINAR=$ac_cv_prog_WINAR
23928if test -n "$WINAR"; then
23929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23930$as_echo "$WINAR" >&6; }
23931else
23932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23933$as_echo "no" >&6; }
23934fi
23935
23936
23937
23938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23939
23940  # First separate the path from the arguments. This will split at the first
23941  # space.
23942  complete="$WINAR"
23943  path="${complete%% *}"
23944  tmp="$complete EOL"
23945  arguments="${tmp#* }"
23946
23947  # Input might be given as Windows format, start by converting to
23948  # unix format.
23949  new_path=`$CYGPATH -u "$path"`
23950
23951  # Now try to locate executable using which
23952  new_path=`$WHICH "$new_path" 2> /dev/null`
23953  # bat and cmd files are not always considered executable in cygwin causing which
23954  # to not find them
23955  if test "x$new_path" = x \
23956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23958    new_path=`$CYGPATH -u "$path"`
23959  fi
23960  if test "x$new_path" = x; then
23961    # Oops. Which didn't find the executable.
23962    # The splitting of arguments from the executable at a space might have been incorrect,
23963    # since paths with space are more likely in Windows. Give it another try with the whole
23964    # argument.
23965    path="$complete"
23966    arguments="EOL"
23967    new_path=`$CYGPATH -u "$path"`
23968    new_path=`$WHICH "$new_path" 2> /dev/null`
23969    # bat and cmd files are not always considered executable in cygwin causing which
23970    # to not find them
23971    if test "x$new_path" = x \
23972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23974      new_path=`$CYGPATH -u "$path"`
23975    fi
23976    if test "x$new_path" = x; then
23977      # It's still not found. Now this is an unrecoverable error.
23978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23979$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23980      has_space=`$ECHO "$complete" | $GREP " "`
23981      if test "x$has_space" != x; then
23982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23984      fi
23985      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23986    fi
23987  fi
23988
23989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23992  # "foo.exe" is OK but "foo" is an error.
23993  #
23994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23995  # It is also a way to make sure we got the proper file name for the real test later on.
23996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23997  if test "x$test_shortpath" = x; then
23998    # Short path failed, file does not exist as specified.
23999    # Try adding .exe or .cmd
24000    if test -f "${new_path}.exe"; then
24001      input_to_shortpath="${new_path}.exe"
24002    elif test -f "${new_path}.cmd"; then
24003      input_to_shortpath="${new_path}.cmd"
24004    else
24005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24006$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24009      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24010    fi
24011  else
24012    input_to_shortpath="$new_path"
24013  fi
24014
24015  # Call helper function which possibly converts this using DOS-style short mode.
24016  # If so, the updated path is stored in $new_path.
24017  new_path="$input_to_shortpath"
24018
24019  input_path="$input_to_shortpath"
24020  # Check if we need to convert this using DOS-style short mode. If the path
24021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24022  # take no chances and rewrite it.
24023  # Note: m4 eats our [], so we need to use [ and ] instead.
24024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24025  if test "x$has_forbidden_chars" != x; then
24026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24030      # Going to short mode and back again did indeed matter. Since short mode is
24031      # case insensitive, let's make it lowercase to improve readability.
24032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24033      # Now convert it back to Unix-stile (cygpath)
24034      input_path=`$CYGPATH -u "$shortmode_path"`
24035      new_path="$input_path"
24036    fi
24037  fi
24038
24039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24040  if test "x$test_cygdrive_prefix" = x; then
24041    # As a simple fix, exclude /usr/bin since it's not a real path.
24042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24044      # a path prefixed by /cygdrive for fixpath to work.
24045      new_path="$CYGWIN_ROOT_PATH$input_path"
24046    fi
24047  fi
24048
24049  # remove trailing .exe if any
24050  new_path="${new_path/%.exe/}"
24051
24052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053
24054  # First separate the path from the arguments. This will split at the first
24055  # space.
24056  complete="$WINAR"
24057  path="${complete%% *}"
24058  tmp="$complete EOL"
24059  arguments="${tmp#* }"
24060
24061  # Input might be given as Windows format, start by converting to
24062  # unix format.
24063  new_path="$path"
24064
24065  windows_path="$new_path"
24066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24067    unix_path=`$CYGPATH -u "$windows_path"`
24068    new_path="$unix_path"
24069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24071    new_path="$unix_path"
24072  fi
24073
24074
24075  # Now try to locate executable using which
24076  new_path=`$WHICH "$new_path" 2> /dev/null`
24077
24078  if test "x$new_path" = x; then
24079    # Oops. Which didn't find the executable.
24080    # The splitting of arguments from the executable at a space might have been incorrect,
24081    # since paths with space are more likely in Windows. Give it another try with the whole
24082    # argument.
24083    path="$complete"
24084    arguments="EOL"
24085    new_path="$path"
24086
24087  windows_path="$new_path"
24088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24089    unix_path=`$CYGPATH -u "$windows_path"`
24090    new_path="$unix_path"
24091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24093    new_path="$unix_path"
24094  fi
24095
24096
24097    new_path=`$WHICH "$new_path" 2> /dev/null`
24098
24099    if test "x$new_path" = x; then
24100      # It's still not found. Now this is an unrecoverable error.
24101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24102$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24103      has_space=`$ECHO "$complete" | $GREP " "`
24104      if test "x$has_space" != x; then
24105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24107      fi
24108      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24109    fi
24110  fi
24111
24112  # Now new_path has a complete unix path to the binary
24113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24114    # Keep paths in /bin as-is, but remove trailing .exe if any
24115    new_path="${new_path/%.exe/}"
24116    # Do not save /bin paths to all_fixpath_prefixes!
24117  else
24118    # Not in mixed or Windows style, start by that.
24119    new_path=`cmd //c echo $new_path`
24120
24121  input_path="$new_path"
24122  # Check if we need to convert this using DOS-style short mode. If the path
24123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24124  # take no chances and rewrite it.
24125  # Note: m4 eats our [], so we need to use [ and ] instead.
24126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24127  if test "x$has_forbidden_chars" != x; then
24128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24130  fi
24131
24132    # Output is in $new_path
24133
24134  windows_path="$new_path"
24135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24136    unix_path=`$CYGPATH -u "$windows_path"`
24137    new_path="$unix_path"
24138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24140    new_path="$unix_path"
24141  fi
24142
24143    # remove trailing .exe if any
24144    new_path="${new_path/%.exe/}"
24145
24146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24148  fi
24149
24150  else
24151    # We're on a posix platform. Hooray! :)
24152    # First separate the path from the arguments. This will split at the first
24153    # space.
24154    complete="$WINAR"
24155    path="${complete%% *}"
24156    tmp="$complete EOL"
24157    arguments="${tmp#* }"
24158
24159    # Cannot rely on the command "which" here since it doesn't always work.
24160    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24161    if test -z "$is_absolute_path"; then
24162      # Path to executable is not absolute. Find it.
24163      IFS_save="$IFS"
24164      IFS=:
24165      for p in $PATH; do
24166        if test -f "$p/$path" && test -x "$p/$path"; then
24167          new_path="$p/$path"
24168          break
24169        fi
24170      done
24171      IFS="$IFS_save"
24172    else
24173      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24174$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24175      new_path="$path"
24176    fi
24177
24178    if test "x$new_path" = x; then
24179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24180$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24181      has_space=`$ECHO "$complete" | $GREP " "`
24182      if test "x$has_space" != x; then
24183        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24185      fi
24186      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24187    fi
24188  fi
24189
24190  # Now join together the path and the arguments once again
24191  if test "x$arguments" != xEOL; then
24192    new_complete="$new_path ${arguments% *}"
24193  else
24194    new_complete="$new_path"
24195  fi
24196
24197  if test "x$complete" != "x$new_complete"; then
24198    WINAR="$new_complete"
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24200$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24201  fi
24202
24203  AR="$WINAR"
24204  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24205
24206  # Extract the first word of "dumpbin", so it can be a program name with args.
24207set dummy dumpbin; ac_word=$2
24208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24209$as_echo_n "checking for $ac_word... " >&6; }
24210if ${ac_cv_prog_DUMPBIN+:} false; then :
24211  $as_echo_n "(cached) " >&6
24212else
24213  if test -n "$DUMPBIN"; then
24214  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24215else
24216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24217for as_dir in $PATH
24218do
24219  IFS=$as_save_IFS
24220  test -z "$as_dir" && as_dir=.
24221    for ac_exec_ext in '' $ac_executable_extensions; do
24222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24223    ac_cv_prog_DUMPBIN="dumpbin"
24224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24225    break 2
24226  fi
24227done
24228  done
24229IFS=$as_save_IFS
24230
24231fi
24232fi
24233DUMPBIN=$ac_cv_prog_DUMPBIN
24234if test -n "$DUMPBIN"; then
24235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24236$as_echo "$DUMPBIN" >&6; }
24237else
24238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24239$as_echo "no" >&6; }
24240fi
24241
24242
24243
24244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24245
24246  # First separate the path from the arguments. This will split at the first
24247  # space.
24248  complete="$DUMPBIN"
24249  path="${complete%% *}"
24250  tmp="$complete EOL"
24251  arguments="${tmp#* }"
24252
24253  # Input might be given as Windows format, start by converting to
24254  # unix format.
24255  new_path=`$CYGPATH -u "$path"`
24256
24257  # Now try to locate executable using which
24258  new_path=`$WHICH "$new_path" 2> /dev/null`
24259  # bat and cmd files are not always considered executable in cygwin causing which
24260  # to not find them
24261  if test "x$new_path" = x \
24262      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24263      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24264    new_path=`$CYGPATH -u "$path"`
24265  fi
24266  if test "x$new_path" = x; then
24267    # Oops. Which didn't find the executable.
24268    # The splitting of arguments from the executable at a space might have been incorrect,
24269    # since paths with space are more likely in Windows. Give it another try with the whole
24270    # argument.
24271    path="$complete"
24272    arguments="EOL"
24273    new_path=`$CYGPATH -u "$path"`
24274    new_path=`$WHICH "$new_path" 2> /dev/null`
24275    # bat and cmd files are not always considered executable in cygwin causing which
24276    # to not find them
24277    if test "x$new_path" = x \
24278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24280      new_path=`$CYGPATH -u "$path"`
24281    fi
24282    if test "x$new_path" = x; then
24283      # It's still not found. Now this is an unrecoverable error.
24284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24285$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24286      has_space=`$ECHO "$complete" | $GREP " "`
24287      if test "x$has_space" != x; then
24288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24290      fi
24291      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24292    fi
24293  fi
24294
24295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24298  # "foo.exe" is OK but "foo" is an error.
24299  #
24300  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24301  # It is also a way to make sure we got the proper file name for the real test later on.
24302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24303  if test "x$test_shortpath" = x; then
24304    # Short path failed, file does not exist as specified.
24305    # Try adding .exe or .cmd
24306    if test -f "${new_path}.exe"; then
24307      input_to_shortpath="${new_path}.exe"
24308    elif test -f "${new_path}.cmd"; then
24309      input_to_shortpath="${new_path}.cmd"
24310    else
24311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24312$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24315      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24316    fi
24317  else
24318    input_to_shortpath="$new_path"
24319  fi
24320
24321  # Call helper function which possibly converts this using DOS-style short mode.
24322  # If so, the updated path is stored in $new_path.
24323  new_path="$input_to_shortpath"
24324
24325  input_path="$input_to_shortpath"
24326  # Check if we need to convert this using DOS-style short mode. If the path
24327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24328  # take no chances and rewrite it.
24329  # Note: m4 eats our [], so we need to use [ and ] instead.
24330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24331  if test "x$has_forbidden_chars" != x; then
24332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24336      # Going to short mode and back again did indeed matter. Since short mode is
24337      # case insensitive, let's make it lowercase to improve readability.
24338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24339      # Now convert it back to Unix-stile (cygpath)
24340      input_path=`$CYGPATH -u "$shortmode_path"`
24341      new_path="$input_path"
24342    fi
24343  fi
24344
24345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24346  if test "x$test_cygdrive_prefix" = x; then
24347    # As a simple fix, exclude /usr/bin since it's not a real path.
24348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24350      # a path prefixed by /cygdrive for fixpath to work.
24351      new_path="$CYGWIN_ROOT_PATH$input_path"
24352    fi
24353  fi
24354
24355  # remove trailing .exe if any
24356  new_path="${new_path/%.exe/}"
24357
24358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24359
24360  # First separate the path from the arguments. This will split at the first
24361  # space.
24362  complete="$DUMPBIN"
24363  path="${complete%% *}"
24364  tmp="$complete EOL"
24365  arguments="${tmp#* }"
24366
24367  # Input might be given as Windows format, start by converting to
24368  # unix format.
24369  new_path="$path"
24370
24371  windows_path="$new_path"
24372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24373    unix_path=`$CYGPATH -u "$windows_path"`
24374    new_path="$unix_path"
24375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24377    new_path="$unix_path"
24378  fi
24379
24380
24381  # Now try to locate executable using which
24382  new_path=`$WHICH "$new_path" 2> /dev/null`
24383
24384  if test "x$new_path" = x; then
24385    # Oops. Which didn't find the executable.
24386    # The splitting of arguments from the executable at a space might have been incorrect,
24387    # since paths with space are more likely in Windows. Give it another try with the whole
24388    # argument.
24389    path="$complete"
24390    arguments="EOL"
24391    new_path="$path"
24392
24393  windows_path="$new_path"
24394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24395    unix_path=`$CYGPATH -u "$windows_path"`
24396    new_path="$unix_path"
24397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24399    new_path="$unix_path"
24400  fi
24401
24402
24403    new_path=`$WHICH "$new_path" 2> /dev/null`
24404
24405    if test "x$new_path" = x; then
24406      # It's still not found. Now this is an unrecoverable error.
24407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24408$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24409      has_space=`$ECHO "$complete" | $GREP " "`
24410      if test "x$has_space" != x; then
24411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24413      fi
24414      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24415    fi
24416  fi
24417
24418  # Now new_path has a complete unix path to the binary
24419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24420    # Keep paths in /bin as-is, but remove trailing .exe if any
24421    new_path="${new_path/%.exe/}"
24422    # Do not save /bin paths to all_fixpath_prefixes!
24423  else
24424    # Not in mixed or Windows style, start by that.
24425    new_path=`cmd //c echo $new_path`
24426
24427  input_path="$new_path"
24428  # Check if we need to convert this using DOS-style short mode. If the path
24429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24430  # take no chances and rewrite it.
24431  # Note: m4 eats our [], so we need to use [ and ] instead.
24432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24433  if test "x$has_forbidden_chars" != x; then
24434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24436  fi
24437
24438    # Output is in $new_path
24439
24440  windows_path="$new_path"
24441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24442    unix_path=`$CYGPATH -u "$windows_path"`
24443    new_path="$unix_path"
24444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24446    new_path="$unix_path"
24447  fi
24448
24449    # remove trailing .exe if any
24450    new_path="${new_path/%.exe/}"
24451
24452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24454  fi
24455
24456  else
24457    # We're on a posix platform. Hooray! :)
24458    # First separate the path from the arguments. This will split at the first
24459    # space.
24460    complete="$DUMPBIN"
24461    path="${complete%% *}"
24462    tmp="$complete EOL"
24463    arguments="${tmp#* }"
24464
24465    # Cannot rely on the command "which" here since it doesn't always work.
24466    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24467    if test -z "$is_absolute_path"; then
24468      # Path to executable is not absolute. Find it.
24469      IFS_save="$IFS"
24470      IFS=:
24471      for p in $PATH; do
24472        if test -f "$p/$path" && test -x "$p/$path"; then
24473          new_path="$p/$path"
24474          break
24475        fi
24476      done
24477      IFS="$IFS_save"
24478    else
24479      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24480$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24481      new_path="$path"
24482    fi
24483
24484    if test "x$new_path" = x; then
24485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24486$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24487      has_space=`$ECHO "$complete" | $GREP " "`
24488      if test "x$has_space" != x; then
24489        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24491      fi
24492      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24493    fi
24494  fi
24495
24496  # Now join together the path and the arguments once again
24497  if test "x$arguments" != xEOL; then
24498    new_complete="$new_path ${arguments% *}"
24499  else
24500    new_complete="$new_path"
24501  fi
24502
24503  if test "x$complete" != "x$new_complete"; then
24504    DUMPBIN="$new_complete"
24505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24506$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24507  fi
24508
24509
24510      COMPILER_TYPE=CL
24511      CCXXFLAGS="$CCXXFLAGS -nologo"
24512
24513fi
24514
24515
24516
24517  ac_ext=c
24518ac_cpp='$CPP $CPPFLAGS'
24519ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24520ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24521ac_compiler_gnu=$ac_cv_c_compiler_gnu
24522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24523$as_echo_n "checking how to run the C preprocessor... " >&6; }
24524# On Suns, sometimes $CPP names a directory.
24525if test -n "$CPP" && test -d "$CPP"; then
24526  CPP=
24527fi
24528if test -z "$CPP"; then
24529  if ${ac_cv_prog_CPP+:} false; then :
24530  $as_echo_n "(cached) " >&6
24531else
24532      # Double quotes because CPP needs to be expanded
24533    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24534    do
24535      ac_preproc_ok=false
24536for ac_c_preproc_warn_flag in '' yes
24537do
24538  # Use a header file that comes with gcc, so configuring glibc
24539  # with a fresh cross-compiler works.
24540  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24541  # <limits.h> exists even on freestanding compilers.
24542  # On the NeXT, cc -E runs the code through the compiler's parser,
24543  # not just through cpp. "Syntax error" is here to catch this case.
24544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24545/* end confdefs.h.  */
24546#ifdef __STDC__
24547# include <limits.h>
24548#else
24549# include <assert.h>
24550#endif
24551		     Syntax error
24552_ACEOF
24553if ac_fn_c_try_cpp "$LINENO"; then :
24554
24555else
24556  # Broken: fails on valid input.
24557continue
24558fi
24559rm -f conftest.err conftest.i conftest.$ac_ext
24560
24561  # OK, works on sane cases.  Now check whether nonexistent headers
24562  # can be detected and how.
24563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24564/* end confdefs.h.  */
24565#include <ac_nonexistent.h>
24566_ACEOF
24567if ac_fn_c_try_cpp "$LINENO"; then :
24568  # Broken: success on invalid input.
24569continue
24570else
24571  # Passes both tests.
24572ac_preproc_ok=:
24573break
24574fi
24575rm -f conftest.err conftest.i conftest.$ac_ext
24576
24577done
24578# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24579rm -f conftest.i conftest.err conftest.$ac_ext
24580if $ac_preproc_ok; then :
24581  break
24582fi
24583
24584    done
24585    ac_cv_prog_CPP=$CPP
24586
24587fi
24588  CPP=$ac_cv_prog_CPP
24589else
24590  ac_cv_prog_CPP=$CPP
24591fi
24592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24593$as_echo "$CPP" >&6; }
24594ac_preproc_ok=false
24595for ac_c_preproc_warn_flag in '' yes
24596do
24597  # Use a header file that comes with gcc, so configuring glibc
24598  # with a fresh cross-compiler works.
24599  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24600  # <limits.h> exists even on freestanding compilers.
24601  # On the NeXT, cc -E runs the code through the compiler's parser,
24602  # not just through cpp. "Syntax error" is here to catch this case.
24603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24604/* end confdefs.h.  */
24605#ifdef __STDC__
24606# include <limits.h>
24607#else
24608# include <assert.h>
24609#endif
24610		     Syntax error
24611_ACEOF
24612if ac_fn_c_try_cpp "$LINENO"; then :
24613
24614else
24615  # Broken: fails on valid input.
24616continue
24617fi
24618rm -f conftest.err conftest.i conftest.$ac_ext
24619
24620  # OK, works on sane cases.  Now check whether nonexistent headers
24621  # can be detected and how.
24622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24623/* end confdefs.h.  */
24624#include <ac_nonexistent.h>
24625_ACEOF
24626if ac_fn_c_try_cpp "$LINENO"; then :
24627  # Broken: success on invalid input.
24628continue
24629else
24630  # Passes both tests.
24631ac_preproc_ok=:
24632break
24633fi
24634rm -f conftest.err conftest.i conftest.$ac_ext
24635
24636done
24637# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24638rm -f conftest.i conftest.err conftest.$ac_ext
24639if $ac_preproc_ok; then :
24640
24641else
24642  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24644as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24645See \`config.log' for more details" "$LINENO" 5; }
24646fi
24647
24648ac_ext=cpp
24649ac_cpp='$CXXCPP $CPPFLAGS'
24650ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24651ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24652ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24653
24654
24655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24656
24657  # First separate the path from the arguments. This will split at the first
24658  # space.
24659  complete="$CPP"
24660  path="${complete%% *}"
24661  tmp="$complete EOL"
24662  arguments="${tmp#* }"
24663
24664  # Input might be given as Windows format, start by converting to
24665  # unix format.
24666  new_path=`$CYGPATH -u "$path"`
24667
24668  # Now try to locate executable using which
24669  new_path=`$WHICH "$new_path" 2> /dev/null`
24670  # bat and cmd files are not always considered executable in cygwin causing which
24671  # to not find them
24672  if test "x$new_path" = x \
24673      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24674      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24675    new_path=`$CYGPATH -u "$path"`
24676  fi
24677  if test "x$new_path" = x; then
24678    # Oops. Which didn't find the executable.
24679    # The splitting of arguments from the executable at a space might have been incorrect,
24680    # since paths with space are more likely in Windows. Give it another try with the whole
24681    # argument.
24682    path="$complete"
24683    arguments="EOL"
24684    new_path=`$CYGPATH -u "$path"`
24685    new_path=`$WHICH "$new_path" 2> /dev/null`
24686    # bat and cmd files are not always considered executable in cygwin causing which
24687    # to not find them
24688    if test "x$new_path" = x \
24689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24691      new_path=`$CYGPATH -u "$path"`
24692    fi
24693    if test "x$new_path" = x; then
24694      # It's still not found. Now this is an unrecoverable error.
24695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24696$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24697      has_space=`$ECHO "$complete" | $GREP " "`
24698      if test "x$has_space" != x; then
24699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24701      fi
24702      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24703    fi
24704  fi
24705
24706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24709  # "foo.exe" is OK but "foo" is an error.
24710  #
24711  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24712  # It is also a way to make sure we got the proper file name for the real test later on.
24713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24714  if test "x$test_shortpath" = x; then
24715    # Short path failed, file does not exist as specified.
24716    # Try adding .exe or .cmd
24717    if test -f "${new_path}.exe"; then
24718      input_to_shortpath="${new_path}.exe"
24719    elif test -f "${new_path}.cmd"; then
24720      input_to_shortpath="${new_path}.cmd"
24721    else
24722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24723$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24726      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24727    fi
24728  else
24729    input_to_shortpath="$new_path"
24730  fi
24731
24732  # Call helper function which possibly converts this using DOS-style short mode.
24733  # If so, the updated path is stored in $new_path.
24734  new_path="$input_to_shortpath"
24735
24736  input_path="$input_to_shortpath"
24737  # Check if we need to convert this using DOS-style short mode. If the path
24738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24739  # take no chances and rewrite it.
24740  # Note: m4 eats our [], so we need to use [ and ] instead.
24741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24742  if test "x$has_forbidden_chars" != x; then
24743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24747      # Going to short mode and back again did indeed matter. Since short mode is
24748      # case insensitive, let's make it lowercase to improve readability.
24749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24750      # Now convert it back to Unix-stile (cygpath)
24751      input_path=`$CYGPATH -u "$shortmode_path"`
24752      new_path="$input_path"
24753    fi
24754  fi
24755
24756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24757  if test "x$test_cygdrive_prefix" = x; then
24758    # As a simple fix, exclude /usr/bin since it's not a real path.
24759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24761      # a path prefixed by /cygdrive for fixpath to work.
24762      new_path="$CYGWIN_ROOT_PATH$input_path"
24763    fi
24764  fi
24765
24766  # remove trailing .exe if any
24767  new_path="${new_path/%.exe/}"
24768
24769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24770
24771  # First separate the path from the arguments. This will split at the first
24772  # space.
24773  complete="$CPP"
24774  path="${complete%% *}"
24775  tmp="$complete EOL"
24776  arguments="${tmp#* }"
24777
24778  # Input might be given as Windows format, start by converting to
24779  # unix format.
24780  new_path="$path"
24781
24782  windows_path="$new_path"
24783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24784    unix_path=`$CYGPATH -u "$windows_path"`
24785    new_path="$unix_path"
24786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24788    new_path="$unix_path"
24789  fi
24790
24791
24792  # Now try to locate executable using which
24793  new_path=`$WHICH "$new_path" 2> /dev/null`
24794
24795  if test "x$new_path" = x; then
24796    # Oops. Which didn't find the executable.
24797    # The splitting of arguments from the executable at a space might have been incorrect,
24798    # since paths with space are more likely in Windows. Give it another try with the whole
24799    # argument.
24800    path="$complete"
24801    arguments="EOL"
24802    new_path="$path"
24803
24804  windows_path="$new_path"
24805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24806    unix_path=`$CYGPATH -u "$windows_path"`
24807    new_path="$unix_path"
24808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24810    new_path="$unix_path"
24811  fi
24812
24813
24814    new_path=`$WHICH "$new_path" 2> /dev/null`
24815
24816    if test "x$new_path" = x; then
24817      # It's still not found. Now this is an unrecoverable error.
24818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24819$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24820      has_space=`$ECHO "$complete" | $GREP " "`
24821      if test "x$has_space" != x; then
24822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24824      fi
24825      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24826    fi
24827  fi
24828
24829  # Now new_path has a complete unix path to the binary
24830  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24831    # Keep paths in /bin as-is, but remove trailing .exe if any
24832    new_path="${new_path/%.exe/}"
24833    # Do not save /bin paths to all_fixpath_prefixes!
24834  else
24835    # Not in mixed or Windows style, start by that.
24836    new_path=`cmd //c echo $new_path`
24837
24838  input_path="$new_path"
24839  # Check if we need to convert this using DOS-style short mode. If the path
24840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24841  # take no chances and rewrite it.
24842  # Note: m4 eats our [], so we need to use [ and ] instead.
24843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24844  if test "x$has_forbidden_chars" != x; then
24845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24847  fi
24848
24849    # Output is in $new_path
24850
24851  windows_path="$new_path"
24852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24853    unix_path=`$CYGPATH -u "$windows_path"`
24854    new_path="$unix_path"
24855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24857    new_path="$unix_path"
24858  fi
24859
24860    # remove trailing .exe if any
24861    new_path="${new_path/%.exe/}"
24862
24863    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24864    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24865  fi
24866
24867  else
24868    # We're on a posix platform. Hooray! :)
24869    # First separate the path from the arguments. This will split at the first
24870    # space.
24871    complete="$CPP"
24872    path="${complete%% *}"
24873    tmp="$complete EOL"
24874    arguments="${tmp#* }"
24875
24876    # Cannot rely on the command "which" here since it doesn't always work.
24877    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24878    if test -z "$is_absolute_path"; then
24879      # Path to executable is not absolute. Find it.
24880      IFS_save="$IFS"
24881      IFS=:
24882      for p in $PATH; do
24883        if test -f "$p/$path" && test -x "$p/$path"; then
24884          new_path="$p/$path"
24885          break
24886        fi
24887      done
24888      IFS="$IFS_save"
24889    else
24890      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24891$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24892      new_path="$path"
24893    fi
24894
24895    if test "x$new_path" = x; then
24896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24897$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24898      has_space=`$ECHO "$complete" | $GREP " "`
24899      if test "x$has_space" != x; then
24900        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24901$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24902      fi
24903      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24904    fi
24905  fi
24906
24907  # Now join together the path and the arguments once again
24908  if test "x$arguments" != xEOL; then
24909    new_complete="$new_path ${arguments% *}"
24910  else
24911    new_complete="$new_path"
24912  fi
24913
24914  if test "x$complete" != "x$new_complete"; then
24915    CPP="$new_complete"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24917$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24918  fi
24919
24920
24921  ac_ext=cpp
24922ac_cpp='$CXXCPP $CPPFLAGS'
24923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24927$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24928if test -z "$CXXCPP"; then
24929  if ${ac_cv_prog_CXXCPP+:} false; then :
24930  $as_echo_n "(cached) " >&6
24931else
24932      # Double quotes because CXXCPP needs to be expanded
24933    for CXXCPP in "$CXX -E" "/lib/cpp"
24934    do
24935      ac_preproc_ok=false
24936for ac_cxx_preproc_warn_flag in '' yes
24937do
24938  # Use a header file that comes with gcc, so configuring glibc
24939  # with a fresh cross-compiler works.
24940  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24941  # <limits.h> exists even on freestanding compilers.
24942  # On the NeXT, cc -E runs the code through the compiler's parser,
24943  # not just through cpp. "Syntax error" is here to catch this case.
24944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24945/* end confdefs.h.  */
24946#ifdef __STDC__
24947# include <limits.h>
24948#else
24949# include <assert.h>
24950#endif
24951		     Syntax error
24952_ACEOF
24953if ac_fn_cxx_try_cpp "$LINENO"; then :
24954
24955else
24956  # Broken: fails on valid input.
24957continue
24958fi
24959rm -f conftest.err conftest.i conftest.$ac_ext
24960
24961  # OK, works on sane cases.  Now check whether nonexistent headers
24962  # can be detected and how.
24963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24964/* end confdefs.h.  */
24965#include <ac_nonexistent.h>
24966_ACEOF
24967if ac_fn_cxx_try_cpp "$LINENO"; then :
24968  # Broken: success on invalid input.
24969continue
24970else
24971  # Passes both tests.
24972ac_preproc_ok=:
24973break
24974fi
24975rm -f conftest.err conftest.i conftest.$ac_ext
24976
24977done
24978# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24979rm -f conftest.i conftest.err conftest.$ac_ext
24980if $ac_preproc_ok; then :
24981  break
24982fi
24983
24984    done
24985    ac_cv_prog_CXXCPP=$CXXCPP
24986
24987fi
24988  CXXCPP=$ac_cv_prog_CXXCPP
24989else
24990  ac_cv_prog_CXXCPP=$CXXCPP
24991fi
24992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24993$as_echo "$CXXCPP" >&6; }
24994ac_preproc_ok=false
24995for ac_cxx_preproc_warn_flag in '' yes
24996do
24997  # Use a header file that comes with gcc, so configuring glibc
24998  # with a fresh cross-compiler works.
24999  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25000  # <limits.h> exists even on freestanding compilers.
25001  # On the NeXT, cc -E runs the code through the compiler's parser,
25002  # not just through cpp. "Syntax error" is here to catch this case.
25003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25004/* end confdefs.h.  */
25005#ifdef __STDC__
25006# include <limits.h>
25007#else
25008# include <assert.h>
25009#endif
25010		     Syntax error
25011_ACEOF
25012if ac_fn_cxx_try_cpp "$LINENO"; then :
25013
25014else
25015  # Broken: fails on valid input.
25016continue
25017fi
25018rm -f conftest.err conftest.i conftest.$ac_ext
25019
25020  # OK, works on sane cases.  Now check whether nonexistent headers
25021  # can be detected and how.
25022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25023/* end confdefs.h.  */
25024#include <ac_nonexistent.h>
25025_ACEOF
25026if ac_fn_cxx_try_cpp "$LINENO"; then :
25027  # Broken: success on invalid input.
25028continue
25029else
25030  # Passes both tests.
25031ac_preproc_ok=:
25032break
25033fi
25034rm -f conftest.err conftest.i conftest.$ac_ext
25035
25036done
25037# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25038rm -f conftest.i conftest.err conftest.$ac_ext
25039if $ac_preproc_ok; then :
25040
25041else
25042  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25044as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25045See \`config.log' for more details" "$LINENO" 5; }
25046fi
25047
25048ac_ext=cpp
25049ac_cpp='$CXXCPP $CPPFLAGS'
25050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25053
25054
25055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25056
25057  # First separate the path from the arguments. This will split at the first
25058  # space.
25059  complete="$CXXCPP"
25060  path="${complete%% *}"
25061  tmp="$complete EOL"
25062  arguments="${tmp#* }"
25063
25064  # Input might be given as Windows format, start by converting to
25065  # unix format.
25066  new_path=`$CYGPATH -u "$path"`
25067
25068  # Now try to locate executable using which
25069  new_path=`$WHICH "$new_path" 2> /dev/null`
25070  # bat and cmd files are not always considered executable in cygwin causing which
25071  # to not find them
25072  if test "x$new_path" = x \
25073      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25074      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25075    new_path=`$CYGPATH -u "$path"`
25076  fi
25077  if test "x$new_path" = x; then
25078    # Oops. Which didn't find the executable.
25079    # The splitting of arguments from the executable at a space might have been incorrect,
25080    # since paths with space are more likely in Windows. Give it another try with the whole
25081    # argument.
25082    path="$complete"
25083    arguments="EOL"
25084    new_path=`$CYGPATH -u "$path"`
25085    new_path=`$WHICH "$new_path" 2> /dev/null`
25086    # bat and cmd files are not always considered executable in cygwin causing which
25087    # to not find them
25088    if test "x$new_path" = x \
25089        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25090        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25091      new_path=`$CYGPATH -u "$path"`
25092    fi
25093    if test "x$new_path" = x; then
25094      # It's still not found. Now this is an unrecoverable error.
25095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25096$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25097      has_space=`$ECHO "$complete" | $GREP " "`
25098      if test "x$has_space" != x; then
25099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25101      fi
25102      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25103    fi
25104  fi
25105
25106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25109  # "foo.exe" is OK but "foo" is an error.
25110  #
25111  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25112  # It is also a way to make sure we got the proper file name for the real test later on.
25113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25114  if test "x$test_shortpath" = x; then
25115    # Short path failed, file does not exist as specified.
25116    # Try adding .exe or .cmd
25117    if test -f "${new_path}.exe"; then
25118      input_to_shortpath="${new_path}.exe"
25119    elif test -f "${new_path}.cmd"; then
25120      input_to_shortpath="${new_path}.cmd"
25121    else
25122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25123$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25124      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25125$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25126      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25127    fi
25128  else
25129    input_to_shortpath="$new_path"
25130  fi
25131
25132  # Call helper function which possibly converts this using DOS-style short mode.
25133  # If so, the updated path is stored in $new_path.
25134  new_path="$input_to_shortpath"
25135
25136  input_path="$input_to_shortpath"
25137  # Check if we need to convert this using DOS-style short mode. If the path
25138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25139  # take no chances and rewrite it.
25140  # Note: m4 eats our [], so we need to use [ and ] instead.
25141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25142  if test "x$has_forbidden_chars" != x; then
25143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25147      # Going to short mode and back again did indeed matter. Since short mode is
25148      # case insensitive, let's make it lowercase to improve readability.
25149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25150      # Now convert it back to Unix-stile (cygpath)
25151      input_path=`$CYGPATH -u "$shortmode_path"`
25152      new_path="$input_path"
25153    fi
25154  fi
25155
25156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25157  if test "x$test_cygdrive_prefix" = x; then
25158    # As a simple fix, exclude /usr/bin since it's not a real path.
25159    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25161      # a path prefixed by /cygdrive for fixpath to work.
25162      new_path="$CYGWIN_ROOT_PATH$input_path"
25163    fi
25164  fi
25165
25166  # remove trailing .exe if any
25167  new_path="${new_path/%.exe/}"
25168
25169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25170
25171  # First separate the path from the arguments. This will split at the first
25172  # space.
25173  complete="$CXXCPP"
25174  path="${complete%% *}"
25175  tmp="$complete EOL"
25176  arguments="${tmp#* }"
25177
25178  # Input might be given as Windows format, start by converting to
25179  # unix format.
25180  new_path="$path"
25181
25182  windows_path="$new_path"
25183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25184    unix_path=`$CYGPATH -u "$windows_path"`
25185    new_path="$unix_path"
25186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25188    new_path="$unix_path"
25189  fi
25190
25191
25192  # Now try to locate executable using which
25193  new_path=`$WHICH "$new_path" 2> /dev/null`
25194
25195  if test "x$new_path" = x; then
25196    # Oops. Which didn't find the executable.
25197    # The splitting of arguments from the executable at a space might have been incorrect,
25198    # since paths with space are more likely in Windows. Give it another try with the whole
25199    # argument.
25200    path="$complete"
25201    arguments="EOL"
25202    new_path="$path"
25203
25204  windows_path="$new_path"
25205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25206    unix_path=`$CYGPATH -u "$windows_path"`
25207    new_path="$unix_path"
25208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25210    new_path="$unix_path"
25211  fi
25212
25213
25214    new_path=`$WHICH "$new_path" 2> /dev/null`
25215
25216    if test "x$new_path" = x; then
25217      # It's still not found. Now this is an unrecoverable error.
25218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25219$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25220      has_space=`$ECHO "$complete" | $GREP " "`
25221      if test "x$has_space" != x; then
25222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25224      fi
25225      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25226    fi
25227  fi
25228
25229  # Now new_path has a complete unix path to the binary
25230  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25231    # Keep paths in /bin as-is, but remove trailing .exe if any
25232    new_path="${new_path/%.exe/}"
25233    # Do not save /bin paths to all_fixpath_prefixes!
25234  else
25235    # Not in mixed or Windows style, start by that.
25236    new_path=`cmd //c echo $new_path`
25237
25238  input_path="$new_path"
25239  # Check if we need to convert this using DOS-style short mode. If the path
25240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25241  # take no chances and rewrite it.
25242  # Note: m4 eats our [], so we need to use [ and ] instead.
25243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25244  if test "x$has_forbidden_chars" != x; then
25245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25247  fi
25248
25249    # Output is in $new_path
25250
25251  windows_path="$new_path"
25252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25253    unix_path=`$CYGPATH -u "$windows_path"`
25254    new_path="$unix_path"
25255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25257    new_path="$unix_path"
25258  fi
25259
25260    # remove trailing .exe if any
25261    new_path="${new_path/%.exe/}"
25262
25263    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25264    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25265  fi
25266
25267  else
25268    # We're on a posix platform. Hooray! :)
25269    # First separate the path from the arguments. This will split at the first
25270    # space.
25271    complete="$CXXCPP"
25272    path="${complete%% *}"
25273    tmp="$complete EOL"
25274    arguments="${tmp#* }"
25275
25276    # Cannot rely on the command "which" here since it doesn't always work.
25277    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25278    if test -z "$is_absolute_path"; then
25279      # Path to executable is not absolute. Find it.
25280      IFS_save="$IFS"
25281      IFS=:
25282      for p in $PATH; do
25283        if test -f "$p/$path" && test -x "$p/$path"; then
25284          new_path="$p/$path"
25285          break
25286        fi
25287      done
25288      IFS="$IFS_save"
25289    else
25290      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25291$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25292      new_path="$path"
25293    fi
25294
25295    if test "x$new_path" = x; then
25296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25297$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25298      has_space=`$ECHO "$complete" | $GREP " "`
25299      if test "x$has_space" != x; then
25300        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25301$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25302      fi
25303      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25304    fi
25305  fi
25306
25307  # Now join together the path and the arguments once again
25308  if test "x$arguments" != xEOL; then
25309    new_complete="$new_path ${arguments% *}"
25310  else
25311    new_complete="$new_path"
25312  fi
25313
25314  if test "x$complete" != "x$new_complete"; then
25315    CXXCPP="$new_complete"
25316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25317$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25318  fi
25319
25320
25321  if test "x$COMPILE_TYPE" != "xcross"; then
25322    # If we are not cross compiling, use the same compilers for
25323    # building the build platform executables. The cross-compilation
25324    # case needed to be done earlier, but this can only be done after
25325    # the native tools have been localized.
25326    BUILD_CC="$CC"
25327    BUILD_CXX="$CXX"
25328    BUILD_LD="$LD"
25329  fi
25330
25331  # for solaris we really need solaris tools, and not gnu equivalent
25332  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25333  #   starting to probe
25334  #
25335  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25336  #         so that it can be overriden --with-tools-dir
25337  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25338    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25339  fi
25340
25341  # Find the right assembler.
25342  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25343    # Extract the first word of "as", so it can be a program name with args.
25344set dummy as; ac_word=$2
25345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25346$as_echo_n "checking for $ac_word... " >&6; }
25347if ${ac_cv_path_AS+:} false; then :
25348  $as_echo_n "(cached) " >&6
25349else
25350  case $AS in
25351  [\\/]* | ?:[\\/]*)
25352  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25353  ;;
25354  *)
25355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25356for as_dir in $PATH
25357do
25358  IFS=$as_save_IFS
25359  test -z "$as_dir" && as_dir=.
25360    for ac_exec_ext in '' $ac_executable_extensions; do
25361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25362    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25364    break 2
25365  fi
25366done
25367  done
25368IFS=$as_save_IFS
25369
25370  ;;
25371esac
25372fi
25373AS=$ac_cv_path_AS
25374if test -n "$AS"; then
25375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25376$as_echo "$AS" >&6; }
25377else
25378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25379$as_echo "no" >&6; }
25380fi
25381
25382
25383
25384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25385
25386  # First separate the path from the arguments. This will split at the first
25387  # space.
25388  complete="$AS"
25389  path="${complete%% *}"
25390  tmp="$complete EOL"
25391  arguments="${tmp#* }"
25392
25393  # Input might be given as Windows format, start by converting to
25394  # unix format.
25395  new_path=`$CYGPATH -u "$path"`
25396
25397  # Now try to locate executable using which
25398  new_path=`$WHICH "$new_path" 2> /dev/null`
25399  # bat and cmd files are not always considered executable in cygwin causing which
25400  # to not find them
25401  if test "x$new_path" = x \
25402      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25403      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25404    new_path=`$CYGPATH -u "$path"`
25405  fi
25406  if test "x$new_path" = x; then
25407    # Oops. Which didn't find the executable.
25408    # The splitting of arguments from the executable at a space might have been incorrect,
25409    # since paths with space are more likely in Windows. Give it another try with the whole
25410    # argument.
25411    path="$complete"
25412    arguments="EOL"
25413    new_path=`$CYGPATH -u "$path"`
25414    new_path=`$WHICH "$new_path" 2> /dev/null`
25415    # bat and cmd files are not always considered executable in cygwin causing which
25416    # to not find them
25417    if test "x$new_path" = x \
25418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25420      new_path=`$CYGPATH -u "$path"`
25421    fi
25422    if test "x$new_path" = x; then
25423      # It's still not found. Now this is an unrecoverable error.
25424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25425$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25426      has_space=`$ECHO "$complete" | $GREP " "`
25427      if test "x$has_space" != x; then
25428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25430      fi
25431      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25432    fi
25433  fi
25434
25435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25438  # "foo.exe" is OK but "foo" is an error.
25439  #
25440  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25441  # It is also a way to make sure we got the proper file name for the real test later on.
25442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25443  if test "x$test_shortpath" = x; then
25444    # Short path failed, file does not exist as specified.
25445    # Try adding .exe or .cmd
25446    if test -f "${new_path}.exe"; then
25447      input_to_shortpath="${new_path}.exe"
25448    elif test -f "${new_path}.cmd"; then
25449      input_to_shortpath="${new_path}.cmd"
25450    else
25451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25452$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25453      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25454$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25455      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25456    fi
25457  else
25458    input_to_shortpath="$new_path"
25459  fi
25460
25461  # Call helper function which possibly converts this using DOS-style short mode.
25462  # If so, the updated path is stored in $new_path.
25463  new_path="$input_to_shortpath"
25464
25465  input_path="$input_to_shortpath"
25466  # Check if we need to convert this using DOS-style short mode. If the path
25467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25468  # take no chances and rewrite it.
25469  # Note: m4 eats our [], so we need to use [ and ] instead.
25470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25471  if test "x$has_forbidden_chars" != x; then
25472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25476      # Going to short mode and back again did indeed matter. Since short mode is
25477      # case insensitive, let's make it lowercase to improve readability.
25478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25479      # Now convert it back to Unix-stile (cygpath)
25480      input_path=`$CYGPATH -u "$shortmode_path"`
25481      new_path="$input_path"
25482    fi
25483  fi
25484
25485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25486  if test "x$test_cygdrive_prefix" = x; then
25487    # As a simple fix, exclude /usr/bin since it's not a real path.
25488    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25490      # a path prefixed by /cygdrive for fixpath to work.
25491      new_path="$CYGWIN_ROOT_PATH$input_path"
25492    fi
25493  fi
25494
25495  # remove trailing .exe if any
25496  new_path="${new_path/%.exe/}"
25497
25498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25499
25500  # First separate the path from the arguments. This will split at the first
25501  # space.
25502  complete="$AS"
25503  path="${complete%% *}"
25504  tmp="$complete EOL"
25505  arguments="${tmp#* }"
25506
25507  # Input might be given as Windows format, start by converting to
25508  # unix format.
25509  new_path="$path"
25510
25511  windows_path="$new_path"
25512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25513    unix_path=`$CYGPATH -u "$windows_path"`
25514    new_path="$unix_path"
25515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25517    new_path="$unix_path"
25518  fi
25519
25520
25521  # Now try to locate executable using which
25522  new_path=`$WHICH "$new_path" 2> /dev/null`
25523
25524  if test "x$new_path" = x; then
25525    # Oops. Which didn't find the executable.
25526    # The splitting of arguments from the executable at a space might have been incorrect,
25527    # since paths with space are more likely in Windows. Give it another try with the whole
25528    # argument.
25529    path="$complete"
25530    arguments="EOL"
25531    new_path="$path"
25532
25533  windows_path="$new_path"
25534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25535    unix_path=`$CYGPATH -u "$windows_path"`
25536    new_path="$unix_path"
25537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25539    new_path="$unix_path"
25540  fi
25541
25542
25543    new_path=`$WHICH "$new_path" 2> /dev/null`
25544
25545    if test "x$new_path" = x; then
25546      # It's still not found. Now this is an unrecoverable error.
25547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25548$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25549      has_space=`$ECHO "$complete" | $GREP " "`
25550      if test "x$has_space" != x; then
25551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25553      fi
25554      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25555    fi
25556  fi
25557
25558  # Now new_path has a complete unix path to the binary
25559  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25560    # Keep paths in /bin as-is, but remove trailing .exe if any
25561    new_path="${new_path/%.exe/}"
25562    # Do not save /bin paths to all_fixpath_prefixes!
25563  else
25564    # Not in mixed or Windows style, start by that.
25565    new_path=`cmd //c echo $new_path`
25566
25567  input_path="$new_path"
25568  # Check if we need to convert this using DOS-style short mode. If the path
25569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25570  # take no chances and rewrite it.
25571  # Note: m4 eats our [], so we need to use [ and ] instead.
25572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25573  if test "x$has_forbidden_chars" != x; then
25574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25576  fi
25577
25578    # Output is in $new_path
25579
25580  windows_path="$new_path"
25581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25582    unix_path=`$CYGPATH -u "$windows_path"`
25583    new_path="$unix_path"
25584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25586    new_path="$unix_path"
25587  fi
25588
25589    # remove trailing .exe if any
25590    new_path="${new_path/%.exe/}"
25591
25592    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25593    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25594  fi
25595
25596  else
25597    # We're on a posix platform. Hooray! :)
25598    # First separate the path from the arguments. This will split at the first
25599    # space.
25600    complete="$AS"
25601    path="${complete%% *}"
25602    tmp="$complete EOL"
25603    arguments="${tmp#* }"
25604
25605    # Cannot rely on the command "which" here since it doesn't always work.
25606    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25607    if test -z "$is_absolute_path"; then
25608      # Path to executable is not absolute. Find it.
25609      IFS_save="$IFS"
25610      IFS=:
25611      for p in $PATH; do
25612        if test -f "$p/$path" && test -x "$p/$path"; then
25613          new_path="$p/$path"
25614          break
25615        fi
25616      done
25617      IFS="$IFS_save"
25618    else
25619      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25620$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25621      new_path="$path"
25622    fi
25623
25624    if test "x$new_path" = x; then
25625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25626$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25627      has_space=`$ECHO "$complete" | $GREP " "`
25628      if test "x$has_space" != x; then
25629        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25630$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25631      fi
25632      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25633    fi
25634  fi
25635
25636  # Now join together the path and the arguments once again
25637  if test "x$arguments" != xEOL; then
25638    new_complete="$new_path ${arguments% *}"
25639  else
25640    new_complete="$new_path"
25641  fi
25642
25643  if test "x$complete" != "x$new_complete"; then
25644    AS="$new_complete"
25645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25646$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25647  fi
25648
25649  else
25650    AS="$CC -c"
25651  fi
25652
25653
25654  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25655    # Extract the first word of "nm", so it can be a program name with args.
25656set dummy nm; ac_word=$2
25657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25658$as_echo_n "checking for $ac_word... " >&6; }
25659if ${ac_cv_path_NM+:} false; then :
25660  $as_echo_n "(cached) " >&6
25661else
25662  case $NM in
25663  [\\/]* | ?:[\\/]*)
25664  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25665  ;;
25666  *)
25667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25668for as_dir in $PATH
25669do
25670  IFS=$as_save_IFS
25671  test -z "$as_dir" && as_dir=.
25672    for ac_exec_ext in '' $ac_executable_extensions; do
25673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25674    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25676    break 2
25677  fi
25678done
25679  done
25680IFS=$as_save_IFS
25681
25682  ;;
25683esac
25684fi
25685NM=$ac_cv_path_NM
25686if test -n "$NM"; then
25687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25688$as_echo "$NM" >&6; }
25689else
25690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25691$as_echo "no" >&6; }
25692fi
25693
25694
25695
25696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25697
25698  # First separate the path from the arguments. This will split at the first
25699  # space.
25700  complete="$NM"
25701  path="${complete%% *}"
25702  tmp="$complete EOL"
25703  arguments="${tmp#* }"
25704
25705  # Input might be given as Windows format, start by converting to
25706  # unix format.
25707  new_path=`$CYGPATH -u "$path"`
25708
25709  # Now try to locate executable using which
25710  new_path=`$WHICH "$new_path" 2> /dev/null`
25711  # bat and cmd files are not always considered executable in cygwin causing which
25712  # to not find them
25713  if test "x$new_path" = x \
25714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25716    new_path=`$CYGPATH -u "$path"`
25717  fi
25718  if test "x$new_path" = x; then
25719    # Oops. Which didn't find the executable.
25720    # The splitting of arguments from the executable at a space might have been incorrect,
25721    # since paths with space are more likely in Windows. Give it another try with the whole
25722    # argument.
25723    path="$complete"
25724    arguments="EOL"
25725    new_path=`$CYGPATH -u "$path"`
25726    new_path=`$WHICH "$new_path" 2> /dev/null`
25727    # bat and cmd files are not always considered executable in cygwin causing which
25728    # to not find them
25729    if test "x$new_path" = x \
25730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25732      new_path=`$CYGPATH -u "$path"`
25733    fi
25734    if test "x$new_path" = x; then
25735      # It's still not found. Now this is an unrecoverable error.
25736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25737$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25738      has_space=`$ECHO "$complete" | $GREP " "`
25739      if test "x$has_space" != x; then
25740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25742      fi
25743      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25744    fi
25745  fi
25746
25747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25750  # "foo.exe" is OK but "foo" is an error.
25751  #
25752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25753  # It is also a way to make sure we got the proper file name for the real test later on.
25754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25755  if test "x$test_shortpath" = x; then
25756    # Short path failed, file does not exist as specified.
25757    # Try adding .exe or .cmd
25758    if test -f "${new_path}.exe"; then
25759      input_to_shortpath="${new_path}.exe"
25760    elif test -f "${new_path}.cmd"; then
25761      input_to_shortpath="${new_path}.cmd"
25762    else
25763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25764$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25767      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25768    fi
25769  else
25770    input_to_shortpath="$new_path"
25771  fi
25772
25773  # Call helper function which possibly converts this using DOS-style short mode.
25774  # If so, the updated path is stored in $new_path.
25775  new_path="$input_to_shortpath"
25776
25777  input_path="$input_to_shortpath"
25778  # Check if we need to convert this using DOS-style short mode. If the path
25779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25780  # take no chances and rewrite it.
25781  # Note: m4 eats our [], so we need to use [ and ] instead.
25782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25783  if test "x$has_forbidden_chars" != x; then
25784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25788      # Going to short mode and back again did indeed matter. Since short mode is
25789      # case insensitive, let's make it lowercase to improve readability.
25790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25791      # Now convert it back to Unix-stile (cygpath)
25792      input_path=`$CYGPATH -u "$shortmode_path"`
25793      new_path="$input_path"
25794    fi
25795  fi
25796
25797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25798  if test "x$test_cygdrive_prefix" = x; then
25799    # As a simple fix, exclude /usr/bin since it's not a real path.
25800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25802      # a path prefixed by /cygdrive for fixpath to work.
25803      new_path="$CYGWIN_ROOT_PATH$input_path"
25804    fi
25805  fi
25806
25807  # remove trailing .exe if any
25808  new_path="${new_path/%.exe/}"
25809
25810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25811
25812  # First separate the path from the arguments. This will split at the first
25813  # space.
25814  complete="$NM"
25815  path="${complete%% *}"
25816  tmp="$complete EOL"
25817  arguments="${tmp#* }"
25818
25819  # Input might be given as Windows format, start by converting to
25820  # unix format.
25821  new_path="$path"
25822
25823  windows_path="$new_path"
25824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25825    unix_path=`$CYGPATH -u "$windows_path"`
25826    new_path="$unix_path"
25827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25829    new_path="$unix_path"
25830  fi
25831
25832
25833  # Now try to locate executable using which
25834  new_path=`$WHICH "$new_path" 2> /dev/null`
25835
25836  if test "x$new_path" = x; then
25837    # Oops. Which didn't find the executable.
25838    # The splitting of arguments from the executable at a space might have been incorrect,
25839    # since paths with space are more likely in Windows. Give it another try with the whole
25840    # argument.
25841    path="$complete"
25842    arguments="EOL"
25843    new_path="$path"
25844
25845  windows_path="$new_path"
25846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25847    unix_path=`$CYGPATH -u "$windows_path"`
25848    new_path="$unix_path"
25849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25851    new_path="$unix_path"
25852  fi
25853
25854
25855    new_path=`$WHICH "$new_path" 2> /dev/null`
25856
25857    if test "x$new_path" = x; then
25858      # It's still not found. Now this is an unrecoverable error.
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25860$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25861      has_space=`$ECHO "$complete" | $GREP " "`
25862      if test "x$has_space" != x; then
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25865      fi
25866      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25867    fi
25868  fi
25869
25870  # Now new_path has a complete unix path to the binary
25871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25872    # Keep paths in /bin as-is, but remove trailing .exe if any
25873    new_path="${new_path/%.exe/}"
25874    # Do not save /bin paths to all_fixpath_prefixes!
25875  else
25876    # Not in mixed or Windows style, start by that.
25877    new_path=`cmd //c echo $new_path`
25878
25879  input_path="$new_path"
25880  # Check if we need to convert this using DOS-style short mode. If the path
25881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25882  # take no chances and rewrite it.
25883  # Note: m4 eats our [], so we need to use [ and ] instead.
25884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25885  if test "x$has_forbidden_chars" != x; then
25886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25888  fi
25889
25890    # Output is in $new_path
25891
25892  windows_path="$new_path"
25893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25894    unix_path=`$CYGPATH -u "$windows_path"`
25895    new_path="$unix_path"
25896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25898    new_path="$unix_path"
25899  fi
25900
25901    # remove trailing .exe if any
25902    new_path="${new_path/%.exe/}"
25903
25904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25906  fi
25907
25908  else
25909    # We're on a posix platform. Hooray! :)
25910    # First separate the path from the arguments. This will split at the first
25911    # space.
25912    complete="$NM"
25913    path="${complete%% *}"
25914    tmp="$complete EOL"
25915    arguments="${tmp#* }"
25916
25917    # Cannot rely on the command "which" here since it doesn't always work.
25918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25919    if test -z "$is_absolute_path"; then
25920      # Path to executable is not absolute. Find it.
25921      IFS_save="$IFS"
25922      IFS=:
25923      for p in $PATH; do
25924        if test -f "$p/$path" && test -x "$p/$path"; then
25925          new_path="$p/$path"
25926          break
25927        fi
25928      done
25929      IFS="$IFS_save"
25930    else
25931      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25932$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25933      new_path="$path"
25934    fi
25935
25936    if test "x$new_path" = x; then
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25938$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25939      has_space=`$ECHO "$complete" | $GREP " "`
25940      if test "x$has_space" != x; then
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25943      fi
25944      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25945    fi
25946  fi
25947
25948  # Now join together the path and the arguments once again
25949  if test "x$arguments" != xEOL; then
25950    new_complete="$new_path ${arguments% *}"
25951  else
25952    new_complete="$new_path"
25953  fi
25954
25955  if test "x$complete" != "x$new_complete"; then
25956    NM="$new_complete"
25957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25958$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25959  fi
25960
25961    # Extract the first word of "gnm", so it can be a program name with args.
25962set dummy gnm; ac_word=$2
25963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25964$as_echo_n "checking for $ac_word... " >&6; }
25965if ${ac_cv_path_GNM+:} false; then :
25966  $as_echo_n "(cached) " >&6
25967else
25968  case $GNM in
25969  [\\/]* | ?:[\\/]*)
25970  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25971  ;;
25972  *)
25973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25974for as_dir in $PATH
25975do
25976  IFS=$as_save_IFS
25977  test -z "$as_dir" && as_dir=.
25978    for ac_exec_ext in '' $ac_executable_extensions; do
25979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25980    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25982    break 2
25983  fi
25984done
25985  done
25986IFS=$as_save_IFS
25987
25988  ;;
25989esac
25990fi
25991GNM=$ac_cv_path_GNM
25992if test -n "$GNM"; then
25993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25994$as_echo "$GNM" >&6; }
25995else
25996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25997$as_echo "no" >&6; }
25998fi
25999
26000
26001
26002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26003
26004  # First separate the path from the arguments. This will split at the first
26005  # space.
26006  complete="$GNM"
26007  path="${complete%% *}"
26008  tmp="$complete EOL"
26009  arguments="${tmp#* }"
26010
26011  # Input might be given as Windows format, start by converting to
26012  # unix format.
26013  new_path=`$CYGPATH -u "$path"`
26014
26015  # Now try to locate executable using which
26016  new_path=`$WHICH "$new_path" 2> /dev/null`
26017  # bat and cmd files are not always considered executable in cygwin causing which
26018  # to not find them
26019  if test "x$new_path" = x \
26020      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26021      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26022    new_path=`$CYGPATH -u "$path"`
26023  fi
26024  if test "x$new_path" = x; then
26025    # Oops. Which didn't find the executable.
26026    # The splitting of arguments from the executable at a space might have been incorrect,
26027    # since paths with space are more likely in Windows. Give it another try with the whole
26028    # argument.
26029    path="$complete"
26030    arguments="EOL"
26031    new_path=`$CYGPATH -u "$path"`
26032    new_path=`$WHICH "$new_path" 2> /dev/null`
26033    # bat and cmd files are not always considered executable in cygwin causing which
26034    # to not find them
26035    if test "x$new_path" = x \
26036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26038      new_path=`$CYGPATH -u "$path"`
26039    fi
26040    if test "x$new_path" = x; then
26041      # It's still not found. Now this is an unrecoverable error.
26042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26043$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26044      has_space=`$ECHO "$complete" | $GREP " "`
26045      if test "x$has_space" != x; then
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26048      fi
26049      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26050    fi
26051  fi
26052
26053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26056  # "foo.exe" is OK but "foo" is an error.
26057  #
26058  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26059  # It is also a way to make sure we got the proper file name for the real test later on.
26060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26061  if test "x$test_shortpath" = x; then
26062    # Short path failed, file does not exist as specified.
26063    # Try adding .exe or .cmd
26064    if test -f "${new_path}.exe"; then
26065      input_to_shortpath="${new_path}.exe"
26066    elif test -f "${new_path}.cmd"; then
26067      input_to_shortpath="${new_path}.cmd"
26068    else
26069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26070$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26073      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26074    fi
26075  else
26076    input_to_shortpath="$new_path"
26077  fi
26078
26079  # Call helper function which possibly converts this using DOS-style short mode.
26080  # If so, the updated path is stored in $new_path.
26081  new_path="$input_to_shortpath"
26082
26083  input_path="$input_to_shortpath"
26084  # Check if we need to convert this using DOS-style short mode. If the path
26085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26086  # take no chances and rewrite it.
26087  # Note: m4 eats our [], so we need to use [ and ] instead.
26088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26089  if test "x$has_forbidden_chars" != x; then
26090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26094      # Going to short mode and back again did indeed matter. Since short mode is
26095      # case insensitive, let's make it lowercase to improve readability.
26096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26097      # Now convert it back to Unix-stile (cygpath)
26098      input_path=`$CYGPATH -u "$shortmode_path"`
26099      new_path="$input_path"
26100    fi
26101  fi
26102
26103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26104  if test "x$test_cygdrive_prefix" = x; then
26105    # As a simple fix, exclude /usr/bin since it's not a real path.
26106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26108      # a path prefixed by /cygdrive for fixpath to work.
26109      new_path="$CYGWIN_ROOT_PATH$input_path"
26110    fi
26111  fi
26112
26113  # remove trailing .exe if any
26114  new_path="${new_path/%.exe/}"
26115
26116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26117
26118  # First separate the path from the arguments. This will split at the first
26119  # space.
26120  complete="$GNM"
26121  path="${complete%% *}"
26122  tmp="$complete EOL"
26123  arguments="${tmp#* }"
26124
26125  # Input might be given as Windows format, start by converting to
26126  # unix format.
26127  new_path="$path"
26128
26129  windows_path="$new_path"
26130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26131    unix_path=`$CYGPATH -u "$windows_path"`
26132    new_path="$unix_path"
26133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26135    new_path="$unix_path"
26136  fi
26137
26138
26139  # Now try to locate executable using which
26140  new_path=`$WHICH "$new_path" 2> /dev/null`
26141
26142  if test "x$new_path" = x; then
26143    # Oops. Which didn't find the executable.
26144    # The splitting of arguments from the executable at a space might have been incorrect,
26145    # since paths with space are more likely in Windows. Give it another try with the whole
26146    # argument.
26147    path="$complete"
26148    arguments="EOL"
26149    new_path="$path"
26150
26151  windows_path="$new_path"
26152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153    unix_path=`$CYGPATH -u "$windows_path"`
26154    new_path="$unix_path"
26155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26157    new_path="$unix_path"
26158  fi
26159
26160
26161    new_path=`$WHICH "$new_path" 2> /dev/null`
26162
26163    if test "x$new_path" = x; then
26164      # It's still not found. Now this is an unrecoverable error.
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26166$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26167      has_space=`$ECHO "$complete" | $GREP " "`
26168      if test "x$has_space" != x; then
26169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26171      fi
26172      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26173    fi
26174  fi
26175
26176  # Now new_path has a complete unix path to the binary
26177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26178    # Keep paths in /bin as-is, but remove trailing .exe if any
26179    new_path="${new_path/%.exe/}"
26180    # Do not save /bin paths to all_fixpath_prefixes!
26181  else
26182    # Not in mixed or Windows style, start by that.
26183    new_path=`cmd //c echo $new_path`
26184
26185  input_path="$new_path"
26186  # Check if we need to convert this using DOS-style short mode. If the path
26187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26188  # take no chances and rewrite it.
26189  # Note: m4 eats our [], so we need to use [ and ] instead.
26190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26191  if test "x$has_forbidden_chars" != x; then
26192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26194  fi
26195
26196    # Output is in $new_path
26197
26198  windows_path="$new_path"
26199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26200    unix_path=`$CYGPATH -u "$windows_path"`
26201    new_path="$unix_path"
26202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26204    new_path="$unix_path"
26205  fi
26206
26207    # remove trailing .exe if any
26208    new_path="${new_path/%.exe/}"
26209
26210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26212  fi
26213
26214  else
26215    # We're on a posix platform. Hooray! :)
26216    # First separate the path from the arguments. This will split at the first
26217    # space.
26218    complete="$GNM"
26219    path="${complete%% *}"
26220    tmp="$complete EOL"
26221    arguments="${tmp#* }"
26222
26223    # Cannot rely on the command "which" here since it doesn't always work.
26224    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26225    if test -z "$is_absolute_path"; then
26226      # Path to executable is not absolute. Find it.
26227      IFS_save="$IFS"
26228      IFS=:
26229      for p in $PATH; do
26230        if test -f "$p/$path" && test -x "$p/$path"; then
26231          new_path="$p/$path"
26232          break
26233        fi
26234      done
26235      IFS="$IFS_save"
26236    else
26237      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26238$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26239      new_path="$path"
26240    fi
26241
26242    if test "x$new_path" = x; then
26243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26244$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26245      has_space=`$ECHO "$complete" | $GREP " "`
26246      if test "x$has_space" != x; then
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26249      fi
26250      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26251    fi
26252  fi
26253
26254  # Now join together the path and the arguments once again
26255  if test "x$arguments" != xEOL; then
26256    new_complete="$new_path ${arguments% *}"
26257  else
26258    new_complete="$new_path"
26259  fi
26260
26261  if test "x$complete" != "x$new_complete"; then
26262    GNM="$new_complete"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26264$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26265  fi
26266
26267    # Extract the first word of "strip", so it can be a program name with args.
26268set dummy strip; ac_word=$2
26269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26270$as_echo_n "checking for $ac_word... " >&6; }
26271if ${ac_cv_path_STRIP+:} false; then :
26272  $as_echo_n "(cached) " >&6
26273else
26274  case $STRIP in
26275  [\\/]* | ?:[\\/]*)
26276  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26277  ;;
26278  *)
26279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26280for as_dir in $PATH
26281do
26282  IFS=$as_save_IFS
26283  test -z "$as_dir" && as_dir=.
26284    for ac_exec_ext in '' $ac_executable_extensions; do
26285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26286    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26288    break 2
26289  fi
26290done
26291  done
26292IFS=$as_save_IFS
26293
26294  ;;
26295esac
26296fi
26297STRIP=$ac_cv_path_STRIP
26298if test -n "$STRIP"; then
26299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26300$as_echo "$STRIP" >&6; }
26301else
26302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26303$as_echo "no" >&6; }
26304fi
26305
26306
26307
26308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26309
26310  # First separate the path from the arguments. This will split at the first
26311  # space.
26312  complete="$STRIP"
26313  path="${complete%% *}"
26314  tmp="$complete EOL"
26315  arguments="${tmp#* }"
26316
26317  # Input might be given as Windows format, start by converting to
26318  # unix format.
26319  new_path=`$CYGPATH -u "$path"`
26320
26321  # Now try to locate executable using which
26322  new_path=`$WHICH "$new_path" 2> /dev/null`
26323  # bat and cmd files are not always considered executable in cygwin causing which
26324  # to not find them
26325  if test "x$new_path" = x \
26326      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26327      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26328    new_path=`$CYGPATH -u "$path"`
26329  fi
26330  if test "x$new_path" = x; then
26331    # Oops. Which didn't find the executable.
26332    # The splitting of arguments from the executable at a space might have been incorrect,
26333    # since paths with space are more likely in Windows. Give it another try with the whole
26334    # argument.
26335    path="$complete"
26336    arguments="EOL"
26337    new_path=`$CYGPATH -u "$path"`
26338    new_path=`$WHICH "$new_path" 2> /dev/null`
26339    # bat and cmd files are not always considered executable in cygwin causing which
26340    # to not find them
26341    if test "x$new_path" = x \
26342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26344      new_path=`$CYGPATH -u "$path"`
26345    fi
26346    if test "x$new_path" = x; then
26347      # It's still not found. Now this is an unrecoverable error.
26348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26349$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26350      has_space=`$ECHO "$complete" | $GREP " "`
26351      if test "x$has_space" != x; then
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26354      fi
26355      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26356    fi
26357  fi
26358
26359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26362  # "foo.exe" is OK but "foo" is an error.
26363  #
26364  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26365  # It is also a way to make sure we got the proper file name for the real test later on.
26366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26367  if test "x$test_shortpath" = x; then
26368    # Short path failed, file does not exist as specified.
26369    # Try adding .exe or .cmd
26370    if test -f "${new_path}.exe"; then
26371      input_to_shortpath="${new_path}.exe"
26372    elif test -f "${new_path}.cmd"; then
26373      input_to_shortpath="${new_path}.cmd"
26374    else
26375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26376$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26379      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26380    fi
26381  else
26382    input_to_shortpath="$new_path"
26383  fi
26384
26385  # Call helper function which possibly converts this using DOS-style short mode.
26386  # If so, the updated path is stored in $new_path.
26387  new_path="$input_to_shortpath"
26388
26389  input_path="$input_to_shortpath"
26390  # Check if we need to convert this using DOS-style short mode. If the path
26391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26392  # take no chances and rewrite it.
26393  # Note: m4 eats our [], so we need to use [ and ] instead.
26394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26395  if test "x$has_forbidden_chars" != x; then
26396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26400      # Going to short mode and back again did indeed matter. Since short mode is
26401      # case insensitive, let's make it lowercase to improve readability.
26402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26403      # Now convert it back to Unix-stile (cygpath)
26404      input_path=`$CYGPATH -u "$shortmode_path"`
26405      new_path="$input_path"
26406    fi
26407  fi
26408
26409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26410  if test "x$test_cygdrive_prefix" = x; then
26411    # As a simple fix, exclude /usr/bin since it's not a real path.
26412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26414      # a path prefixed by /cygdrive for fixpath to work.
26415      new_path="$CYGWIN_ROOT_PATH$input_path"
26416    fi
26417  fi
26418
26419  # remove trailing .exe if any
26420  new_path="${new_path/%.exe/}"
26421
26422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26423
26424  # First separate the path from the arguments. This will split at the first
26425  # space.
26426  complete="$STRIP"
26427  path="${complete%% *}"
26428  tmp="$complete EOL"
26429  arguments="${tmp#* }"
26430
26431  # Input might be given as Windows format, start by converting to
26432  # unix format.
26433  new_path="$path"
26434
26435  windows_path="$new_path"
26436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26437    unix_path=`$CYGPATH -u "$windows_path"`
26438    new_path="$unix_path"
26439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26441    new_path="$unix_path"
26442  fi
26443
26444
26445  # Now try to locate executable using which
26446  new_path=`$WHICH "$new_path" 2> /dev/null`
26447
26448  if test "x$new_path" = x; then
26449    # Oops. Which didn't find the executable.
26450    # The splitting of arguments from the executable at a space might have been incorrect,
26451    # since paths with space are more likely in Windows. Give it another try with the whole
26452    # argument.
26453    path="$complete"
26454    arguments="EOL"
26455    new_path="$path"
26456
26457  windows_path="$new_path"
26458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26459    unix_path=`$CYGPATH -u "$windows_path"`
26460    new_path="$unix_path"
26461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26463    new_path="$unix_path"
26464  fi
26465
26466
26467    new_path=`$WHICH "$new_path" 2> /dev/null`
26468
26469    if test "x$new_path" = x; then
26470      # It's still not found. Now this is an unrecoverable error.
26471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26472$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26473      has_space=`$ECHO "$complete" | $GREP " "`
26474      if test "x$has_space" != x; then
26475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26477      fi
26478      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26479    fi
26480  fi
26481
26482  # Now new_path has a complete unix path to the binary
26483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26484    # Keep paths in /bin as-is, but remove trailing .exe if any
26485    new_path="${new_path/%.exe/}"
26486    # Do not save /bin paths to all_fixpath_prefixes!
26487  else
26488    # Not in mixed or Windows style, start by that.
26489    new_path=`cmd //c echo $new_path`
26490
26491  input_path="$new_path"
26492  # Check if we need to convert this using DOS-style short mode. If the path
26493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26494  # take no chances and rewrite it.
26495  # Note: m4 eats our [], so we need to use [ and ] instead.
26496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26497  if test "x$has_forbidden_chars" != x; then
26498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26500  fi
26501
26502    # Output is in $new_path
26503
26504  windows_path="$new_path"
26505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26506    unix_path=`$CYGPATH -u "$windows_path"`
26507    new_path="$unix_path"
26508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26510    new_path="$unix_path"
26511  fi
26512
26513    # remove trailing .exe if any
26514    new_path="${new_path/%.exe/}"
26515
26516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26518  fi
26519
26520  else
26521    # We're on a posix platform. Hooray! :)
26522    # First separate the path from the arguments. This will split at the first
26523    # space.
26524    complete="$STRIP"
26525    path="${complete%% *}"
26526    tmp="$complete EOL"
26527    arguments="${tmp#* }"
26528
26529    # Cannot rely on the command "which" here since it doesn't always work.
26530    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26531    if test -z "$is_absolute_path"; then
26532      # Path to executable is not absolute. Find it.
26533      IFS_save="$IFS"
26534      IFS=:
26535      for p in $PATH; do
26536        if test -f "$p/$path" && test -x "$p/$path"; then
26537          new_path="$p/$path"
26538          break
26539        fi
26540      done
26541      IFS="$IFS_save"
26542    else
26543      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26544$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26545      new_path="$path"
26546    fi
26547
26548    if test "x$new_path" = x; then
26549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26550$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26551      has_space=`$ECHO "$complete" | $GREP " "`
26552      if test "x$has_space" != x; then
26553        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26555      fi
26556      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26557    fi
26558  fi
26559
26560  # Now join together the path and the arguments once again
26561  if test "x$arguments" != xEOL; then
26562    new_complete="$new_path ${arguments% *}"
26563  else
26564    new_complete="$new_path"
26565  fi
26566
26567  if test "x$complete" != "x$new_complete"; then
26568    STRIP="$new_complete"
26569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26570$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26571  fi
26572
26573    # Extract the first word of "mcs", so it can be a program name with args.
26574set dummy mcs; ac_word=$2
26575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26576$as_echo_n "checking for $ac_word... " >&6; }
26577if ${ac_cv_path_MCS+:} false; then :
26578  $as_echo_n "(cached) " >&6
26579else
26580  case $MCS in
26581  [\\/]* | ?:[\\/]*)
26582  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26583  ;;
26584  *)
26585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26586for as_dir in $PATH
26587do
26588  IFS=$as_save_IFS
26589  test -z "$as_dir" && as_dir=.
26590    for ac_exec_ext in '' $ac_executable_extensions; do
26591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26592    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26594    break 2
26595  fi
26596done
26597  done
26598IFS=$as_save_IFS
26599
26600  ;;
26601esac
26602fi
26603MCS=$ac_cv_path_MCS
26604if test -n "$MCS"; then
26605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26606$as_echo "$MCS" >&6; }
26607else
26608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26609$as_echo "no" >&6; }
26610fi
26611
26612
26613
26614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26615
26616  # First separate the path from the arguments. This will split at the first
26617  # space.
26618  complete="$MCS"
26619  path="${complete%% *}"
26620  tmp="$complete EOL"
26621  arguments="${tmp#* }"
26622
26623  # Input might be given as Windows format, start by converting to
26624  # unix format.
26625  new_path=`$CYGPATH -u "$path"`
26626
26627  # Now try to locate executable using which
26628  new_path=`$WHICH "$new_path" 2> /dev/null`
26629  # bat and cmd files are not always considered executable in cygwin causing which
26630  # to not find them
26631  if test "x$new_path" = x \
26632      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26633      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26634    new_path=`$CYGPATH -u "$path"`
26635  fi
26636  if test "x$new_path" = x; then
26637    # Oops. Which didn't find the executable.
26638    # The splitting of arguments from the executable at a space might have been incorrect,
26639    # since paths with space are more likely in Windows. Give it another try with the whole
26640    # argument.
26641    path="$complete"
26642    arguments="EOL"
26643    new_path=`$CYGPATH -u "$path"`
26644    new_path=`$WHICH "$new_path" 2> /dev/null`
26645    # bat and cmd files are not always considered executable in cygwin causing which
26646    # to not find them
26647    if test "x$new_path" = x \
26648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26650      new_path=`$CYGPATH -u "$path"`
26651    fi
26652    if test "x$new_path" = x; then
26653      # It's still not found. Now this is an unrecoverable error.
26654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26655$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26656      has_space=`$ECHO "$complete" | $GREP " "`
26657      if test "x$has_space" != x; then
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26660      fi
26661      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26662    fi
26663  fi
26664
26665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26668  # "foo.exe" is OK but "foo" is an error.
26669  #
26670  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26671  # It is also a way to make sure we got the proper file name for the real test later on.
26672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26673  if test "x$test_shortpath" = x; then
26674    # Short path failed, file does not exist as specified.
26675    # Try adding .exe or .cmd
26676    if test -f "${new_path}.exe"; then
26677      input_to_shortpath="${new_path}.exe"
26678    elif test -f "${new_path}.cmd"; then
26679      input_to_shortpath="${new_path}.cmd"
26680    else
26681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26682$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26683      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26684$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26685      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26686    fi
26687  else
26688    input_to_shortpath="$new_path"
26689  fi
26690
26691  # Call helper function which possibly converts this using DOS-style short mode.
26692  # If so, the updated path is stored in $new_path.
26693  new_path="$input_to_shortpath"
26694
26695  input_path="$input_to_shortpath"
26696  # Check if we need to convert this using DOS-style short mode. If the path
26697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26698  # take no chances and rewrite it.
26699  # Note: m4 eats our [], so we need to use [ and ] instead.
26700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26701  if test "x$has_forbidden_chars" != x; then
26702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26706      # Going to short mode and back again did indeed matter. Since short mode is
26707      # case insensitive, let's make it lowercase to improve readability.
26708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26709      # Now convert it back to Unix-stile (cygpath)
26710      input_path=`$CYGPATH -u "$shortmode_path"`
26711      new_path="$input_path"
26712    fi
26713  fi
26714
26715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26716  if test "x$test_cygdrive_prefix" = x; then
26717    # As a simple fix, exclude /usr/bin since it's not a real path.
26718    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26720      # a path prefixed by /cygdrive for fixpath to work.
26721      new_path="$CYGWIN_ROOT_PATH$input_path"
26722    fi
26723  fi
26724
26725  # remove trailing .exe if any
26726  new_path="${new_path/%.exe/}"
26727
26728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26729
26730  # First separate the path from the arguments. This will split at the first
26731  # space.
26732  complete="$MCS"
26733  path="${complete%% *}"
26734  tmp="$complete EOL"
26735  arguments="${tmp#* }"
26736
26737  # Input might be given as Windows format, start by converting to
26738  # unix format.
26739  new_path="$path"
26740
26741  windows_path="$new_path"
26742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26743    unix_path=`$CYGPATH -u "$windows_path"`
26744    new_path="$unix_path"
26745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26747    new_path="$unix_path"
26748  fi
26749
26750
26751  # Now try to locate executable using which
26752  new_path=`$WHICH "$new_path" 2> /dev/null`
26753
26754  if test "x$new_path" = x; then
26755    # Oops. Which didn't find the executable.
26756    # The splitting of arguments from the executable at a space might have been incorrect,
26757    # since paths with space are more likely in Windows. Give it another try with the whole
26758    # argument.
26759    path="$complete"
26760    arguments="EOL"
26761    new_path="$path"
26762
26763  windows_path="$new_path"
26764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26765    unix_path=`$CYGPATH -u "$windows_path"`
26766    new_path="$unix_path"
26767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26769    new_path="$unix_path"
26770  fi
26771
26772
26773    new_path=`$WHICH "$new_path" 2> /dev/null`
26774
26775    if test "x$new_path" = x; then
26776      # It's still not found. Now this is an unrecoverable error.
26777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26778$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26779      has_space=`$ECHO "$complete" | $GREP " "`
26780      if test "x$has_space" != x; then
26781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26783      fi
26784      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26785    fi
26786  fi
26787
26788  # Now new_path has a complete unix path to the binary
26789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26790    # Keep paths in /bin as-is, but remove trailing .exe if any
26791    new_path="${new_path/%.exe/}"
26792    # Do not save /bin paths to all_fixpath_prefixes!
26793  else
26794    # Not in mixed or Windows style, start by that.
26795    new_path=`cmd //c echo $new_path`
26796
26797  input_path="$new_path"
26798  # Check if we need to convert this using DOS-style short mode. If the path
26799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26800  # take no chances and rewrite it.
26801  # Note: m4 eats our [], so we need to use [ and ] instead.
26802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26803  if test "x$has_forbidden_chars" != x; then
26804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26806  fi
26807
26808    # Output is in $new_path
26809
26810  windows_path="$new_path"
26811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26812    unix_path=`$CYGPATH -u "$windows_path"`
26813    new_path="$unix_path"
26814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26816    new_path="$unix_path"
26817  fi
26818
26819    # remove trailing .exe if any
26820    new_path="${new_path/%.exe/}"
26821
26822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26824  fi
26825
26826  else
26827    # We're on a posix platform. Hooray! :)
26828    # First separate the path from the arguments. This will split at the first
26829    # space.
26830    complete="$MCS"
26831    path="${complete%% *}"
26832    tmp="$complete EOL"
26833    arguments="${tmp#* }"
26834
26835    # Cannot rely on the command "which" here since it doesn't always work.
26836    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26837    if test -z "$is_absolute_path"; then
26838      # Path to executable is not absolute. Find it.
26839      IFS_save="$IFS"
26840      IFS=:
26841      for p in $PATH; do
26842        if test -f "$p/$path" && test -x "$p/$path"; then
26843          new_path="$p/$path"
26844          break
26845        fi
26846      done
26847      IFS="$IFS_save"
26848    else
26849      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26850$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26851      new_path="$path"
26852    fi
26853
26854    if test "x$new_path" = x; then
26855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26856$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26857      has_space=`$ECHO "$complete" | $GREP " "`
26858      if test "x$has_space" != x; then
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26861      fi
26862      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26863    fi
26864  fi
26865
26866  # Now join together the path and the arguments once again
26867  if test "x$arguments" != xEOL; then
26868    new_complete="$new_path ${arguments% *}"
26869  else
26870    new_complete="$new_path"
26871  fi
26872
26873  if test "x$complete" != "x$new_complete"; then
26874    MCS="$new_complete"
26875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26876$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26877  fi
26878
26879  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26880    if test -n "$ac_tool_prefix"; then
26881  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26882set dummy ${ac_tool_prefix}nm; ac_word=$2
26883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26884$as_echo_n "checking for $ac_word... " >&6; }
26885if ${ac_cv_prog_NM+:} false; then :
26886  $as_echo_n "(cached) " >&6
26887else
26888  if test -n "$NM"; then
26889  ac_cv_prog_NM="$NM" # Let the user override the test.
26890else
26891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26892for as_dir in $PATH
26893do
26894  IFS=$as_save_IFS
26895  test -z "$as_dir" && as_dir=.
26896    for ac_exec_ext in '' $ac_executable_extensions; do
26897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26898    ac_cv_prog_NM="${ac_tool_prefix}nm"
26899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26900    break 2
26901  fi
26902done
26903  done
26904IFS=$as_save_IFS
26905
26906fi
26907fi
26908NM=$ac_cv_prog_NM
26909if test -n "$NM"; then
26910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26911$as_echo "$NM" >&6; }
26912else
26913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26914$as_echo "no" >&6; }
26915fi
26916
26917
26918fi
26919if test -z "$ac_cv_prog_NM"; then
26920  ac_ct_NM=$NM
26921  # Extract the first word of "nm", so it can be a program name with args.
26922set dummy nm; ac_word=$2
26923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26924$as_echo_n "checking for $ac_word... " >&6; }
26925if ${ac_cv_prog_ac_ct_NM+:} false; then :
26926  $as_echo_n "(cached) " >&6
26927else
26928  if test -n "$ac_ct_NM"; then
26929  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26930else
26931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26932for as_dir in $PATH
26933do
26934  IFS=$as_save_IFS
26935  test -z "$as_dir" && as_dir=.
26936    for ac_exec_ext in '' $ac_executable_extensions; do
26937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26938    ac_cv_prog_ac_ct_NM="nm"
26939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26940    break 2
26941  fi
26942done
26943  done
26944IFS=$as_save_IFS
26945
26946fi
26947fi
26948ac_ct_NM=$ac_cv_prog_ac_ct_NM
26949if test -n "$ac_ct_NM"; then
26950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26951$as_echo "$ac_ct_NM" >&6; }
26952else
26953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26954$as_echo "no" >&6; }
26955fi
26956
26957  if test "x$ac_ct_NM" = x; then
26958    NM=""
26959  else
26960    case $cross_compiling:$ac_tool_warned in
26961yes:)
26962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26964ac_tool_warned=yes ;;
26965esac
26966    NM=$ac_ct_NM
26967  fi
26968else
26969  NM="$ac_cv_prog_NM"
26970fi
26971
26972
26973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26974
26975  # First separate the path from the arguments. This will split at the first
26976  # space.
26977  complete="$NM"
26978  path="${complete%% *}"
26979  tmp="$complete EOL"
26980  arguments="${tmp#* }"
26981
26982  # Input might be given as Windows format, start by converting to
26983  # unix format.
26984  new_path=`$CYGPATH -u "$path"`
26985
26986  # Now try to locate executable using which
26987  new_path=`$WHICH "$new_path" 2> /dev/null`
26988  # bat and cmd files are not always considered executable in cygwin causing which
26989  # to not find them
26990  if test "x$new_path" = x \
26991      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26992      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26993    new_path=`$CYGPATH -u "$path"`
26994  fi
26995  if test "x$new_path" = x; then
26996    # Oops. Which didn't find the executable.
26997    # The splitting of arguments from the executable at a space might have been incorrect,
26998    # since paths with space are more likely in Windows. Give it another try with the whole
26999    # argument.
27000    path="$complete"
27001    arguments="EOL"
27002    new_path=`$CYGPATH -u "$path"`
27003    new_path=`$WHICH "$new_path" 2> /dev/null`
27004    # bat and cmd files are not always considered executable in cygwin causing which
27005    # to not find them
27006    if test "x$new_path" = x \
27007        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27008        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27009      new_path=`$CYGPATH -u "$path"`
27010    fi
27011    if test "x$new_path" = x; then
27012      # It's still not found. Now this is an unrecoverable error.
27013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27014$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27015      has_space=`$ECHO "$complete" | $GREP " "`
27016      if test "x$has_space" != x; then
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27019      fi
27020      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27021    fi
27022  fi
27023
27024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27027  # "foo.exe" is OK but "foo" is an error.
27028  #
27029  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27030  # It is also a way to make sure we got the proper file name for the real test later on.
27031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27032  if test "x$test_shortpath" = x; then
27033    # Short path failed, file does not exist as specified.
27034    # Try adding .exe or .cmd
27035    if test -f "${new_path}.exe"; then
27036      input_to_shortpath="${new_path}.exe"
27037    elif test -f "${new_path}.cmd"; then
27038      input_to_shortpath="${new_path}.cmd"
27039    else
27040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27041$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27044      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27045    fi
27046  else
27047    input_to_shortpath="$new_path"
27048  fi
27049
27050  # Call helper function which possibly converts this using DOS-style short mode.
27051  # If so, the updated path is stored in $new_path.
27052  new_path="$input_to_shortpath"
27053
27054  input_path="$input_to_shortpath"
27055  # Check if we need to convert this using DOS-style short mode. If the path
27056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27057  # take no chances and rewrite it.
27058  # Note: m4 eats our [], so we need to use [ and ] instead.
27059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27060  if test "x$has_forbidden_chars" != x; then
27061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27065      # Going to short mode and back again did indeed matter. Since short mode is
27066      # case insensitive, let's make it lowercase to improve readability.
27067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27068      # Now convert it back to Unix-stile (cygpath)
27069      input_path=`$CYGPATH -u "$shortmode_path"`
27070      new_path="$input_path"
27071    fi
27072  fi
27073
27074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27075  if test "x$test_cygdrive_prefix" = x; then
27076    # As a simple fix, exclude /usr/bin since it's not a real path.
27077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27079      # a path prefixed by /cygdrive for fixpath to work.
27080      new_path="$CYGWIN_ROOT_PATH$input_path"
27081    fi
27082  fi
27083
27084  # remove trailing .exe if any
27085  new_path="${new_path/%.exe/}"
27086
27087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27088
27089  # First separate the path from the arguments. This will split at the first
27090  # space.
27091  complete="$NM"
27092  path="${complete%% *}"
27093  tmp="$complete EOL"
27094  arguments="${tmp#* }"
27095
27096  # Input might be given as Windows format, start by converting to
27097  # unix format.
27098  new_path="$path"
27099
27100  windows_path="$new_path"
27101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102    unix_path=`$CYGPATH -u "$windows_path"`
27103    new_path="$unix_path"
27104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27106    new_path="$unix_path"
27107  fi
27108
27109
27110  # Now try to locate executable using which
27111  new_path=`$WHICH "$new_path" 2> /dev/null`
27112
27113  if test "x$new_path" = x; then
27114    # Oops. Which didn't find the executable.
27115    # The splitting of arguments from the executable at a space might have been incorrect,
27116    # since paths with space are more likely in Windows. Give it another try with the whole
27117    # argument.
27118    path="$complete"
27119    arguments="EOL"
27120    new_path="$path"
27121
27122  windows_path="$new_path"
27123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27124    unix_path=`$CYGPATH -u "$windows_path"`
27125    new_path="$unix_path"
27126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27128    new_path="$unix_path"
27129  fi
27130
27131
27132    new_path=`$WHICH "$new_path" 2> /dev/null`
27133
27134    if test "x$new_path" = x; then
27135      # It's still not found. Now this is an unrecoverable error.
27136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27137$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27138      has_space=`$ECHO "$complete" | $GREP " "`
27139      if test "x$has_space" != x; then
27140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27142      fi
27143      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27144    fi
27145  fi
27146
27147  # Now new_path has a complete unix path to the binary
27148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27149    # Keep paths in /bin as-is, but remove trailing .exe if any
27150    new_path="${new_path/%.exe/}"
27151    # Do not save /bin paths to all_fixpath_prefixes!
27152  else
27153    # Not in mixed or Windows style, start by that.
27154    new_path=`cmd //c echo $new_path`
27155
27156  input_path="$new_path"
27157  # Check if we need to convert this using DOS-style short mode. If the path
27158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27159  # take no chances and rewrite it.
27160  # Note: m4 eats our [], so we need to use [ and ] instead.
27161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27162  if test "x$has_forbidden_chars" != x; then
27163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27165  fi
27166
27167    # Output is in $new_path
27168
27169  windows_path="$new_path"
27170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27171    unix_path=`$CYGPATH -u "$windows_path"`
27172    new_path="$unix_path"
27173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27175    new_path="$unix_path"
27176  fi
27177
27178    # remove trailing .exe if any
27179    new_path="${new_path/%.exe/}"
27180
27181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27183  fi
27184
27185  else
27186    # We're on a posix platform. Hooray! :)
27187    # First separate the path from the arguments. This will split at the first
27188    # space.
27189    complete="$NM"
27190    path="${complete%% *}"
27191    tmp="$complete EOL"
27192    arguments="${tmp#* }"
27193
27194    # Cannot rely on the command "which" here since it doesn't always work.
27195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27196    if test -z "$is_absolute_path"; then
27197      # Path to executable is not absolute. Find it.
27198      IFS_save="$IFS"
27199      IFS=:
27200      for p in $PATH; do
27201        if test -f "$p/$path" && test -x "$p/$path"; then
27202          new_path="$p/$path"
27203          break
27204        fi
27205      done
27206      IFS="$IFS_save"
27207    else
27208      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27209$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27210      new_path="$path"
27211    fi
27212
27213    if test "x$new_path" = x; then
27214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27215$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27216      has_space=`$ECHO "$complete" | $GREP " "`
27217      if test "x$has_space" != x; then
27218        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27219$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27220      fi
27221      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27222    fi
27223  fi
27224
27225  # Now join together the path and the arguments once again
27226  if test "x$arguments" != xEOL; then
27227    new_complete="$new_path ${arguments% *}"
27228  else
27229    new_complete="$new_path"
27230  fi
27231
27232  if test "x$complete" != "x$new_complete"; then
27233    NM="$new_complete"
27234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27235$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27236  fi
27237
27238    GNM="$NM"
27239
27240    if test -n "$ac_tool_prefix"; then
27241  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27242set dummy ${ac_tool_prefix}strip; ac_word=$2
27243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27244$as_echo_n "checking for $ac_word... " >&6; }
27245if ${ac_cv_prog_STRIP+:} false; then :
27246  $as_echo_n "(cached) " >&6
27247else
27248  if test -n "$STRIP"; then
27249  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27250else
27251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27252for as_dir in $PATH
27253do
27254  IFS=$as_save_IFS
27255  test -z "$as_dir" && as_dir=.
27256    for ac_exec_ext in '' $ac_executable_extensions; do
27257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27258    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27260    break 2
27261  fi
27262done
27263  done
27264IFS=$as_save_IFS
27265
27266fi
27267fi
27268STRIP=$ac_cv_prog_STRIP
27269if test -n "$STRIP"; then
27270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27271$as_echo "$STRIP" >&6; }
27272else
27273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27274$as_echo "no" >&6; }
27275fi
27276
27277
27278fi
27279if test -z "$ac_cv_prog_STRIP"; then
27280  ac_ct_STRIP=$STRIP
27281  # Extract the first word of "strip", so it can be a program name with args.
27282set dummy strip; ac_word=$2
27283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27284$as_echo_n "checking for $ac_word... " >&6; }
27285if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27286  $as_echo_n "(cached) " >&6
27287else
27288  if test -n "$ac_ct_STRIP"; then
27289  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27290else
27291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27292for as_dir in $PATH
27293do
27294  IFS=$as_save_IFS
27295  test -z "$as_dir" && as_dir=.
27296    for ac_exec_ext in '' $ac_executable_extensions; do
27297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27298    ac_cv_prog_ac_ct_STRIP="strip"
27299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27300    break 2
27301  fi
27302done
27303  done
27304IFS=$as_save_IFS
27305
27306fi
27307fi
27308ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27309if test -n "$ac_ct_STRIP"; then
27310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27311$as_echo "$ac_ct_STRIP" >&6; }
27312else
27313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27314$as_echo "no" >&6; }
27315fi
27316
27317  if test "x$ac_ct_STRIP" = x; then
27318    STRIP=""
27319  else
27320    case $cross_compiling:$ac_tool_warned in
27321yes:)
27322{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27323$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27324ac_tool_warned=yes ;;
27325esac
27326    STRIP=$ac_ct_STRIP
27327  fi
27328else
27329  STRIP="$ac_cv_prog_STRIP"
27330fi
27331
27332
27333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27334
27335  # First separate the path from the arguments. This will split at the first
27336  # space.
27337  complete="$STRIP"
27338  path="${complete%% *}"
27339  tmp="$complete EOL"
27340  arguments="${tmp#* }"
27341
27342  # Input might be given as Windows format, start by converting to
27343  # unix format.
27344  new_path=`$CYGPATH -u "$path"`
27345
27346  # Now try to locate executable using which
27347  new_path=`$WHICH "$new_path" 2> /dev/null`
27348  # bat and cmd files are not always considered executable in cygwin causing which
27349  # to not find them
27350  if test "x$new_path" = x \
27351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27353    new_path=`$CYGPATH -u "$path"`
27354  fi
27355  if test "x$new_path" = x; then
27356    # Oops. Which didn't find the executable.
27357    # The splitting of arguments from the executable at a space might have been incorrect,
27358    # since paths with space are more likely in Windows. Give it another try with the whole
27359    # argument.
27360    path="$complete"
27361    arguments="EOL"
27362    new_path=`$CYGPATH -u "$path"`
27363    new_path=`$WHICH "$new_path" 2> /dev/null`
27364    # bat and cmd files are not always considered executable in cygwin causing which
27365    # to not find them
27366    if test "x$new_path" = x \
27367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27369      new_path=`$CYGPATH -u "$path"`
27370    fi
27371    if test "x$new_path" = x; then
27372      # It's still not found. Now this is an unrecoverable error.
27373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27374$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27375      has_space=`$ECHO "$complete" | $GREP " "`
27376      if test "x$has_space" != x; then
27377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27379      fi
27380      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27381    fi
27382  fi
27383
27384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27387  # "foo.exe" is OK but "foo" is an error.
27388  #
27389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27390  # It is also a way to make sure we got the proper file name for the real test later on.
27391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27392  if test "x$test_shortpath" = x; then
27393    # Short path failed, file does not exist as specified.
27394    # Try adding .exe or .cmd
27395    if test -f "${new_path}.exe"; then
27396      input_to_shortpath="${new_path}.exe"
27397    elif test -f "${new_path}.cmd"; then
27398      input_to_shortpath="${new_path}.cmd"
27399    else
27400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27401$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27404      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27405    fi
27406  else
27407    input_to_shortpath="$new_path"
27408  fi
27409
27410  # Call helper function which possibly converts this using DOS-style short mode.
27411  # If so, the updated path is stored in $new_path.
27412  new_path="$input_to_shortpath"
27413
27414  input_path="$input_to_shortpath"
27415  # Check if we need to convert this using DOS-style short mode. If the path
27416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27417  # take no chances and rewrite it.
27418  # Note: m4 eats our [], so we need to use [ and ] instead.
27419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27420  if test "x$has_forbidden_chars" != x; then
27421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27425      # Going to short mode and back again did indeed matter. Since short mode is
27426      # case insensitive, let's make it lowercase to improve readability.
27427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27428      # Now convert it back to Unix-stile (cygpath)
27429      input_path=`$CYGPATH -u "$shortmode_path"`
27430      new_path="$input_path"
27431    fi
27432  fi
27433
27434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27435  if test "x$test_cygdrive_prefix" = x; then
27436    # As a simple fix, exclude /usr/bin since it's not a real path.
27437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27439      # a path prefixed by /cygdrive for fixpath to work.
27440      new_path="$CYGWIN_ROOT_PATH$input_path"
27441    fi
27442  fi
27443
27444  # remove trailing .exe if any
27445  new_path="${new_path/%.exe/}"
27446
27447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27448
27449  # First separate the path from the arguments. This will split at the first
27450  # space.
27451  complete="$STRIP"
27452  path="${complete%% *}"
27453  tmp="$complete EOL"
27454  arguments="${tmp#* }"
27455
27456  # Input might be given as Windows format, start by converting to
27457  # unix format.
27458  new_path="$path"
27459
27460  windows_path="$new_path"
27461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27462    unix_path=`$CYGPATH -u "$windows_path"`
27463    new_path="$unix_path"
27464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27466    new_path="$unix_path"
27467  fi
27468
27469
27470  # Now try to locate executable using which
27471  new_path=`$WHICH "$new_path" 2> /dev/null`
27472
27473  if test "x$new_path" = x; then
27474    # Oops. Which didn't find the executable.
27475    # The splitting of arguments from the executable at a space might have been incorrect,
27476    # since paths with space are more likely in Windows. Give it another try with the whole
27477    # argument.
27478    path="$complete"
27479    arguments="EOL"
27480    new_path="$path"
27481
27482  windows_path="$new_path"
27483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27484    unix_path=`$CYGPATH -u "$windows_path"`
27485    new_path="$unix_path"
27486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27488    new_path="$unix_path"
27489  fi
27490
27491
27492    new_path=`$WHICH "$new_path" 2> /dev/null`
27493
27494    if test "x$new_path" = x; then
27495      # It's still not found. Now this is an unrecoverable error.
27496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27497$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27498      has_space=`$ECHO "$complete" | $GREP " "`
27499      if test "x$has_space" != x; then
27500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27502      fi
27503      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27504    fi
27505  fi
27506
27507  # Now new_path has a complete unix path to the binary
27508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27509    # Keep paths in /bin as-is, but remove trailing .exe if any
27510    new_path="${new_path/%.exe/}"
27511    # Do not save /bin paths to all_fixpath_prefixes!
27512  else
27513    # Not in mixed or Windows style, start by that.
27514    new_path=`cmd //c echo $new_path`
27515
27516  input_path="$new_path"
27517  # Check if we need to convert this using DOS-style short mode. If the path
27518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27519  # take no chances and rewrite it.
27520  # Note: m4 eats our [], so we need to use [ and ] instead.
27521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27522  if test "x$has_forbidden_chars" != x; then
27523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27525  fi
27526
27527    # Output is in $new_path
27528
27529  windows_path="$new_path"
27530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27531    unix_path=`$CYGPATH -u "$windows_path"`
27532    new_path="$unix_path"
27533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27535    new_path="$unix_path"
27536  fi
27537
27538    # remove trailing .exe if any
27539    new_path="${new_path/%.exe/}"
27540
27541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27543  fi
27544
27545  else
27546    # We're on a posix platform. Hooray! :)
27547    # First separate the path from the arguments. This will split at the first
27548    # space.
27549    complete="$STRIP"
27550    path="${complete%% *}"
27551    tmp="$complete EOL"
27552    arguments="${tmp#* }"
27553
27554    # Cannot rely on the command "which" here since it doesn't always work.
27555    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27556    if test -z "$is_absolute_path"; then
27557      # Path to executable is not absolute. Find it.
27558      IFS_save="$IFS"
27559      IFS=:
27560      for p in $PATH; do
27561        if test -f "$p/$path" && test -x "$p/$path"; then
27562          new_path="$p/$path"
27563          break
27564        fi
27565      done
27566      IFS="$IFS_save"
27567    else
27568      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27569$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27570      new_path="$path"
27571    fi
27572
27573    if test "x$new_path" = x; then
27574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27575$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27576      has_space=`$ECHO "$complete" | $GREP " "`
27577      if test "x$has_space" != x; then
27578        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27580      fi
27581      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27582    fi
27583  fi
27584
27585  # Now join together the path and the arguments once again
27586  if test "x$arguments" != xEOL; then
27587    new_complete="$new_path ${arguments% *}"
27588  else
27589    new_complete="$new_path"
27590  fi
27591
27592  if test "x$complete" != "x$new_complete"; then
27593    STRIP="$new_complete"
27594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27595$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27596  fi
27597
27598  fi
27599
27600  # objcopy is used for moving debug symbols to separate files when
27601  # full debug symbols are enabled.
27602  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27603    if test -n "$ac_tool_prefix"; then
27604  for ac_prog in gobjcopy objcopy
27605  do
27606    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27607set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27609$as_echo_n "checking for $ac_word... " >&6; }
27610if ${ac_cv_prog_OBJCOPY+:} false; then :
27611  $as_echo_n "(cached) " >&6
27612else
27613  if test -n "$OBJCOPY"; then
27614  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27615else
27616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27617for as_dir in $PATH
27618do
27619  IFS=$as_save_IFS
27620  test -z "$as_dir" && as_dir=.
27621    for ac_exec_ext in '' $ac_executable_extensions; do
27622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27623    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27625    break 2
27626  fi
27627done
27628  done
27629IFS=$as_save_IFS
27630
27631fi
27632fi
27633OBJCOPY=$ac_cv_prog_OBJCOPY
27634if test -n "$OBJCOPY"; then
27635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27636$as_echo "$OBJCOPY" >&6; }
27637else
27638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27639$as_echo "no" >&6; }
27640fi
27641
27642
27643    test -n "$OBJCOPY" && break
27644  done
27645fi
27646if test -z "$OBJCOPY"; then
27647  ac_ct_OBJCOPY=$OBJCOPY
27648  for ac_prog in gobjcopy objcopy
27649do
27650  # Extract the first word of "$ac_prog", so it can be a program name with args.
27651set dummy $ac_prog; ac_word=$2
27652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27653$as_echo_n "checking for $ac_word... " >&6; }
27654if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27655  $as_echo_n "(cached) " >&6
27656else
27657  if test -n "$ac_ct_OBJCOPY"; then
27658  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27659else
27660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27661for as_dir in $PATH
27662do
27663  IFS=$as_save_IFS
27664  test -z "$as_dir" && as_dir=.
27665    for ac_exec_ext in '' $ac_executable_extensions; do
27666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27667    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27669    break 2
27670  fi
27671done
27672  done
27673IFS=$as_save_IFS
27674
27675fi
27676fi
27677ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27678if test -n "$ac_ct_OBJCOPY"; then
27679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27680$as_echo "$ac_ct_OBJCOPY" >&6; }
27681else
27682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27683$as_echo "no" >&6; }
27684fi
27685
27686
27687  test -n "$ac_ct_OBJCOPY" && break
27688done
27689
27690  if test "x$ac_ct_OBJCOPY" = x; then
27691    OBJCOPY=""
27692  else
27693    case $cross_compiling:$ac_tool_warned in
27694yes:)
27695{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27696$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27697ac_tool_warned=yes ;;
27698esac
27699    OBJCOPY=$ac_ct_OBJCOPY
27700  fi
27701fi
27702
27703    # Only call fixup if objcopy was found.
27704    if test -n "$OBJCOPY"; then
27705
27706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27707
27708  # First separate the path from the arguments. This will split at the first
27709  # space.
27710  complete="$OBJCOPY"
27711  path="${complete%% *}"
27712  tmp="$complete EOL"
27713  arguments="${tmp#* }"
27714
27715  # Input might be given as Windows format, start by converting to
27716  # unix format.
27717  new_path=`$CYGPATH -u "$path"`
27718
27719  # Now try to locate executable using which
27720  new_path=`$WHICH "$new_path" 2> /dev/null`
27721  # bat and cmd files are not always considered executable in cygwin causing which
27722  # to not find them
27723  if test "x$new_path" = x \
27724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27726    new_path=`$CYGPATH -u "$path"`
27727  fi
27728  if test "x$new_path" = x; then
27729    # Oops. Which didn't find the executable.
27730    # The splitting of arguments from the executable at a space might have been incorrect,
27731    # since paths with space are more likely in Windows. Give it another try with the whole
27732    # argument.
27733    path="$complete"
27734    arguments="EOL"
27735    new_path=`$CYGPATH -u "$path"`
27736    new_path=`$WHICH "$new_path" 2> /dev/null`
27737    # bat and cmd files are not always considered executable in cygwin causing which
27738    # to not find them
27739    if test "x$new_path" = x \
27740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27742      new_path=`$CYGPATH -u "$path"`
27743    fi
27744    if test "x$new_path" = x; then
27745      # It's still not found. Now this is an unrecoverable error.
27746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27747$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27748      has_space=`$ECHO "$complete" | $GREP " "`
27749      if test "x$has_space" != x; then
27750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27752      fi
27753      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27754    fi
27755  fi
27756
27757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27760  # "foo.exe" is OK but "foo" is an error.
27761  #
27762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27763  # It is also a way to make sure we got the proper file name for the real test later on.
27764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27765  if test "x$test_shortpath" = x; then
27766    # Short path failed, file does not exist as specified.
27767    # Try adding .exe or .cmd
27768    if test -f "${new_path}.exe"; then
27769      input_to_shortpath="${new_path}.exe"
27770    elif test -f "${new_path}.cmd"; then
27771      input_to_shortpath="${new_path}.cmd"
27772    else
27773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27774$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27777      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27778    fi
27779  else
27780    input_to_shortpath="$new_path"
27781  fi
27782
27783  # Call helper function which possibly converts this using DOS-style short mode.
27784  # If so, the updated path is stored in $new_path.
27785  new_path="$input_to_shortpath"
27786
27787  input_path="$input_to_shortpath"
27788  # Check if we need to convert this using DOS-style short mode. If the path
27789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27790  # take no chances and rewrite it.
27791  # Note: m4 eats our [], so we need to use [ and ] instead.
27792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27793  if test "x$has_forbidden_chars" != x; then
27794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27798      # Going to short mode and back again did indeed matter. Since short mode is
27799      # case insensitive, let's make it lowercase to improve readability.
27800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27801      # Now convert it back to Unix-stile (cygpath)
27802      input_path=`$CYGPATH -u "$shortmode_path"`
27803      new_path="$input_path"
27804    fi
27805  fi
27806
27807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27808  if test "x$test_cygdrive_prefix" = x; then
27809    # As a simple fix, exclude /usr/bin since it's not a real path.
27810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27812      # a path prefixed by /cygdrive for fixpath to work.
27813      new_path="$CYGWIN_ROOT_PATH$input_path"
27814    fi
27815  fi
27816
27817  # remove trailing .exe if any
27818  new_path="${new_path/%.exe/}"
27819
27820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27821
27822  # First separate the path from the arguments. This will split at the first
27823  # space.
27824  complete="$OBJCOPY"
27825  path="${complete%% *}"
27826  tmp="$complete EOL"
27827  arguments="${tmp#* }"
27828
27829  # Input might be given as Windows format, start by converting to
27830  # unix format.
27831  new_path="$path"
27832
27833  windows_path="$new_path"
27834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27835    unix_path=`$CYGPATH -u "$windows_path"`
27836    new_path="$unix_path"
27837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27839    new_path="$unix_path"
27840  fi
27841
27842
27843  # Now try to locate executable using which
27844  new_path=`$WHICH "$new_path" 2> /dev/null`
27845
27846  if test "x$new_path" = x; then
27847    # Oops. Which didn't find the executable.
27848    # The splitting of arguments from the executable at a space might have been incorrect,
27849    # since paths with space are more likely in Windows. Give it another try with the whole
27850    # argument.
27851    path="$complete"
27852    arguments="EOL"
27853    new_path="$path"
27854
27855  windows_path="$new_path"
27856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27857    unix_path=`$CYGPATH -u "$windows_path"`
27858    new_path="$unix_path"
27859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27861    new_path="$unix_path"
27862  fi
27863
27864
27865    new_path=`$WHICH "$new_path" 2> /dev/null`
27866
27867    if test "x$new_path" = x; then
27868      # It's still not found. Now this is an unrecoverable error.
27869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27870$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27871      has_space=`$ECHO "$complete" | $GREP " "`
27872      if test "x$has_space" != x; then
27873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27875      fi
27876      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27877    fi
27878  fi
27879
27880  # Now new_path has a complete unix path to the binary
27881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27882    # Keep paths in /bin as-is, but remove trailing .exe if any
27883    new_path="${new_path/%.exe/}"
27884    # Do not save /bin paths to all_fixpath_prefixes!
27885  else
27886    # Not in mixed or Windows style, start by that.
27887    new_path=`cmd //c echo $new_path`
27888
27889  input_path="$new_path"
27890  # Check if we need to convert this using DOS-style short mode. If the path
27891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27892  # take no chances and rewrite it.
27893  # Note: m4 eats our [], so we need to use [ and ] instead.
27894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27895  if test "x$has_forbidden_chars" != x; then
27896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27898  fi
27899
27900    # Output is in $new_path
27901
27902  windows_path="$new_path"
27903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27904    unix_path=`$CYGPATH -u "$windows_path"`
27905    new_path="$unix_path"
27906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27908    new_path="$unix_path"
27909  fi
27910
27911    # remove trailing .exe if any
27912    new_path="${new_path/%.exe/}"
27913
27914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27916  fi
27917
27918  else
27919    # We're on a posix platform. Hooray! :)
27920    # First separate the path from the arguments. This will split at the first
27921    # space.
27922    complete="$OBJCOPY"
27923    path="${complete%% *}"
27924    tmp="$complete EOL"
27925    arguments="${tmp#* }"
27926
27927    # Cannot rely on the command "which" here since it doesn't always work.
27928    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27929    if test -z "$is_absolute_path"; then
27930      # Path to executable is not absolute. Find it.
27931      IFS_save="$IFS"
27932      IFS=:
27933      for p in $PATH; do
27934        if test -f "$p/$path" && test -x "$p/$path"; then
27935          new_path="$p/$path"
27936          break
27937        fi
27938      done
27939      IFS="$IFS_save"
27940    else
27941      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27942$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27943      new_path="$path"
27944    fi
27945
27946    if test "x$new_path" = x; then
27947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27948$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27949      has_space=`$ECHO "$complete" | $GREP " "`
27950      if test "x$has_space" != x; then
27951        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27953      fi
27954      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27955    fi
27956  fi
27957
27958  # Now join together the path and the arguments once again
27959  if test "x$arguments" != xEOL; then
27960    new_complete="$new_path ${arguments% *}"
27961  else
27962    new_complete="$new_path"
27963  fi
27964
27965  if test "x$complete" != "x$new_complete"; then
27966    OBJCOPY="$new_complete"
27967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27968$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27969  fi
27970
27971    fi
27972  fi
27973
27974  if test -n "$ac_tool_prefix"; then
27975  for ac_prog in gobjdump objdump
27976  do
27977    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27978set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27980$as_echo_n "checking for $ac_word... " >&6; }
27981if ${ac_cv_prog_OBJDUMP+:} false; then :
27982  $as_echo_n "(cached) " >&6
27983else
27984  if test -n "$OBJDUMP"; then
27985  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27986else
27987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27988for as_dir in $PATH
27989do
27990  IFS=$as_save_IFS
27991  test -z "$as_dir" && as_dir=.
27992    for ac_exec_ext in '' $ac_executable_extensions; do
27993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27994    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27996    break 2
27997  fi
27998done
27999  done
28000IFS=$as_save_IFS
28001
28002fi
28003fi
28004OBJDUMP=$ac_cv_prog_OBJDUMP
28005if test -n "$OBJDUMP"; then
28006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28007$as_echo "$OBJDUMP" >&6; }
28008else
28009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28010$as_echo "no" >&6; }
28011fi
28012
28013
28014    test -n "$OBJDUMP" && break
28015  done
28016fi
28017if test -z "$OBJDUMP"; then
28018  ac_ct_OBJDUMP=$OBJDUMP
28019  for ac_prog in gobjdump objdump
28020do
28021  # Extract the first word of "$ac_prog", so it can be a program name with args.
28022set dummy $ac_prog; ac_word=$2
28023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28024$as_echo_n "checking for $ac_word... " >&6; }
28025if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28026  $as_echo_n "(cached) " >&6
28027else
28028  if test -n "$ac_ct_OBJDUMP"; then
28029  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28030else
28031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28032for as_dir in $PATH
28033do
28034  IFS=$as_save_IFS
28035  test -z "$as_dir" && as_dir=.
28036    for ac_exec_ext in '' $ac_executable_extensions; do
28037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28038    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28040    break 2
28041  fi
28042done
28043  done
28044IFS=$as_save_IFS
28045
28046fi
28047fi
28048ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28049if test -n "$ac_ct_OBJDUMP"; then
28050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28051$as_echo "$ac_ct_OBJDUMP" >&6; }
28052else
28053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28054$as_echo "no" >&6; }
28055fi
28056
28057
28058  test -n "$ac_ct_OBJDUMP" && break
28059done
28060
28061  if test "x$ac_ct_OBJDUMP" = x; then
28062    OBJDUMP=""
28063  else
28064    case $cross_compiling:$ac_tool_warned in
28065yes:)
28066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28068ac_tool_warned=yes ;;
28069esac
28070    OBJDUMP=$ac_ct_OBJDUMP
28071  fi
28072fi
28073
28074  if test "x$OBJDUMP" != x; then
28075    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28076
28077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28078
28079  # First separate the path from the arguments. This will split at the first
28080  # space.
28081  complete="$OBJDUMP"
28082  path="${complete%% *}"
28083  tmp="$complete EOL"
28084  arguments="${tmp#* }"
28085
28086  # Input might be given as Windows format, start by converting to
28087  # unix format.
28088  new_path=`$CYGPATH -u "$path"`
28089
28090  # Now try to locate executable using which
28091  new_path=`$WHICH "$new_path" 2> /dev/null`
28092  # bat and cmd files are not always considered executable in cygwin causing which
28093  # to not find them
28094  if test "x$new_path" = x \
28095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28097    new_path=`$CYGPATH -u "$path"`
28098  fi
28099  if test "x$new_path" = x; then
28100    # Oops. Which didn't find the executable.
28101    # The splitting of arguments from the executable at a space might have been incorrect,
28102    # since paths with space are more likely in Windows. Give it another try with the whole
28103    # argument.
28104    path="$complete"
28105    arguments="EOL"
28106    new_path=`$CYGPATH -u "$path"`
28107    new_path=`$WHICH "$new_path" 2> /dev/null`
28108    # bat and cmd files are not always considered executable in cygwin causing which
28109    # to not find them
28110    if test "x$new_path" = x \
28111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28113      new_path=`$CYGPATH -u "$path"`
28114    fi
28115    if test "x$new_path" = x; then
28116      # It's still not found. Now this is an unrecoverable error.
28117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28118$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28119      has_space=`$ECHO "$complete" | $GREP " "`
28120      if test "x$has_space" != x; then
28121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28123      fi
28124      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28125    fi
28126  fi
28127
28128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28131  # "foo.exe" is OK but "foo" is an error.
28132  #
28133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28134  # It is also a way to make sure we got the proper file name for the real test later on.
28135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28136  if test "x$test_shortpath" = x; then
28137    # Short path failed, file does not exist as specified.
28138    # Try adding .exe or .cmd
28139    if test -f "${new_path}.exe"; then
28140      input_to_shortpath="${new_path}.exe"
28141    elif test -f "${new_path}.cmd"; then
28142      input_to_shortpath="${new_path}.cmd"
28143    else
28144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28145$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28148      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28149    fi
28150  else
28151    input_to_shortpath="$new_path"
28152  fi
28153
28154  # Call helper function which possibly converts this using DOS-style short mode.
28155  # If so, the updated path is stored in $new_path.
28156  new_path="$input_to_shortpath"
28157
28158  input_path="$input_to_shortpath"
28159  # Check if we need to convert this using DOS-style short mode. If the path
28160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28161  # take no chances and rewrite it.
28162  # Note: m4 eats our [], so we need to use [ and ] instead.
28163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28164  if test "x$has_forbidden_chars" != x; then
28165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28169      # Going to short mode and back again did indeed matter. Since short mode is
28170      # case insensitive, let's make it lowercase to improve readability.
28171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28172      # Now convert it back to Unix-stile (cygpath)
28173      input_path=`$CYGPATH -u "$shortmode_path"`
28174      new_path="$input_path"
28175    fi
28176  fi
28177
28178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28179  if test "x$test_cygdrive_prefix" = x; then
28180    # As a simple fix, exclude /usr/bin since it's not a real path.
28181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28183      # a path prefixed by /cygdrive for fixpath to work.
28184      new_path="$CYGWIN_ROOT_PATH$input_path"
28185    fi
28186  fi
28187
28188  # remove trailing .exe if any
28189  new_path="${new_path/%.exe/}"
28190
28191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28192
28193  # First separate the path from the arguments. This will split at the first
28194  # space.
28195  complete="$OBJDUMP"
28196  path="${complete%% *}"
28197  tmp="$complete EOL"
28198  arguments="${tmp#* }"
28199
28200  # Input might be given as Windows format, start by converting to
28201  # unix format.
28202  new_path="$path"
28203
28204  windows_path="$new_path"
28205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206    unix_path=`$CYGPATH -u "$windows_path"`
28207    new_path="$unix_path"
28208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28210    new_path="$unix_path"
28211  fi
28212
28213
28214  # Now try to locate executable using which
28215  new_path=`$WHICH "$new_path" 2> /dev/null`
28216
28217  if test "x$new_path" = x; then
28218    # Oops. Which didn't find the executable.
28219    # The splitting of arguments from the executable at a space might have been incorrect,
28220    # since paths with space are more likely in Windows. Give it another try with the whole
28221    # argument.
28222    path="$complete"
28223    arguments="EOL"
28224    new_path="$path"
28225
28226  windows_path="$new_path"
28227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28228    unix_path=`$CYGPATH -u "$windows_path"`
28229    new_path="$unix_path"
28230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28232    new_path="$unix_path"
28233  fi
28234
28235
28236    new_path=`$WHICH "$new_path" 2> /dev/null`
28237
28238    if test "x$new_path" = x; then
28239      # It's still not found. Now this is an unrecoverable error.
28240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28241$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28242      has_space=`$ECHO "$complete" | $GREP " "`
28243      if test "x$has_space" != x; then
28244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28246      fi
28247      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28248    fi
28249  fi
28250
28251  # Now new_path has a complete unix path to the binary
28252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28253    # Keep paths in /bin as-is, but remove trailing .exe if any
28254    new_path="${new_path/%.exe/}"
28255    # Do not save /bin paths to all_fixpath_prefixes!
28256  else
28257    # Not in mixed or Windows style, start by that.
28258    new_path=`cmd //c echo $new_path`
28259
28260  input_path="$new_path"
28261  # Check if we need to convert this using DOS-style short mode. If the path
28262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28263  # take no chances and rewrite it.
28264  # Note: m4 eats our [], so we need to use [ and ] instead.
28265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28266  if test "x$has_forbidden_chars" != x; then
28267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28269  fi
28270
28271    # Output is in $new_path
28272
28273  windows_path="$new_path"
28274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28275    unix_path=`$CYGPATH -u "$windows_path"`
28276    new_path="$unix_path"
28277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28279    new_path="$unix_path"
28280  fi
28281
28282    # remove trailing .exe if any
28283    new_path="${new_path/%.exe/}"
28284
28285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28287  fi
28288
28289  else
28290    # We're on a posix platform. Hooray! :)
28291    # First separate the path from the arguments. This will split at the first
28292    # space.
28293    complete="$OBJDUMP"
28294    path="${complete%% *}"
28295    tmp="$complete EOL"
28296    arguments="${tmp#* }"
28297
28298    # Cannot rely on the command "which" here since it doesn't always work.
28299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28300    if test -z "$is_absolute_path"; then
28301      # Path to executable is not absolute. Find it.
28302      IFS_save="$IFS"
28303      IFS=:
28304      for p in $PATH; do
28305        if test -f "$p/$path" && test -x "$p/$path"; then
28306          new_path="$p/$path"
28307          break
28308        fi
28309      done
28310      IFS="$IFS_save"
28311    else
28312      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28313$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28314      new_path="$path"
28315    fi
28316
28317    if test "x$new_path" = x; then
28318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28319$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28320      has_space=`$ECHO "$complete" | $GREP " "`
28321      if test "x$has_space" != x; then
28322        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28324      fi
28325      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28326    fi
28327  fi
28328
28329  # Now join together the path and the arguments once again
28330  if test "x$arguments" != xEOL; then
28331    new_complete="$new_path ${arguments% *}"
28332  else
28333    new_complete="$new_path"
28334  fi
28335
28336  if test "x$complete" != "x$new_complete"; then
28337    OBJDUMP="$new_complete"
28338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28339$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28340  fi
28341
28342  fi
28343
28344  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28345    # Extract the first word of "lipo", so it can be a program name with args.
28346set dummy lipo; ac_word=$2
28347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28348$as_echo_n "checking for $ac_word... " >&6; }
28349if ${ac_cv_path_LIPO+:} false; then :
28350  $as_echo_n "(cached) " >&6
28351else
28352  case $LIPO in
28353  [\\/]* | ?:[\\/]*)
28354  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28355  ;;
28356  *)
28357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28358for as_dir in $PATH
28359do
28360  IFS=$as_save_IFS
28361  test -z "$as_dir" && as_dir=.
28362    for ac_exec_ext in '' $ac_executable_extensions; do
28363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28364    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28366    break 2
28367  fi
28368done
28369  done
28370IFS=$as_save_IFS
28371
28372  ;;
28373esac
28374fi
28375LIPO=$ac_cv_path_LIPO
28376if test -n "$LIPO"; then
28377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28378$as_echo "$LIPO" >&6; }
28379else
28380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28381$as_echo "no" >&6; }
28382fi
28383
28384
28385
28386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28387
28388  # First separate the path from the arguments. This will split at the first
28389  # space.
28390  complete="$LIPO"
28391  path="${complete%% *}"
28392  tmp="$complete EOL"
28393  arguments="${tmp#* }"
28394
28395  # Input might be given as Windows format, start by converting to
28396  # unix format.
28397  new_path=`$CYGPATH -u "$path"`
28398
28399  # Now try to locate executable using which
28400  new_path=`$WHICH "$new_path" 2> /dev/null`
28401  # bat and cmd files are not always considered executable in cygwin causing which
28402  # to not find them
28403  if test "x$new_path" = x \
28404      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28405      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28406    new_path=`$CYGPATH -u "$path"`
28407  fi
28408  if test "x$new_path" = x; then
28409    # Oops. Which didn't find the executable.
28410    # The splitting of arguments from the executable at a space might have been incorrect,
28411    # since paths with space are more likely in Windows. Give it another try with the whole
28412    # argument.
28413    path="$complete"
28414    arguments="EOL"
28415    new_path=`$CYGPATH -u "$path"`
28416    new_path=`$WHICH "$new_path" 2> /dev/null`
28417    # bat and cmd files are not always considered executable in cygwin causing which
28418    # to not find them
28419    if test "x$new_path" = x \
28420        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28421        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28422      new_path=`$CYGPATH -u "$path"`
28423    fi
28424    if test "x$new_path" = x; then
28425      # It's still not found. Now this is an unrecoverable error.
28426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28427$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28428      has_space=`$ECHO "$complete" | $GREP " "`
28429      if test "x$has_space" != x; then
28430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28432      fi
28433      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28434    fi
28435  fi
28436
28437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28440  # "foo.exe" is OK but "foo" is an error.
28441  #
28442  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28443  # It is also a way to make sure we got the proper file name for the real test later on.
28444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28445  if test "x$test_shortpath" = x; then
28446    # Short path failed, file does not exist as specified.
28447    # Try adding .exe or .cmd
28448    if test -f "${new_path}.exe"; then
28449      input_to_shortpath="${new_path}.exe"
28450    elif test -f "${new_path}.cmd"; then
28451      input_to_shortpath="${new_path}.cmd"
28452    else
28453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28454$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28455      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28456$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28457      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28458    fi
28459  else
28460    input_to_shortpath="$new_path"
28461  fi
28462
28463  # Call helper function which possibly converts this using DOS-style short mode.
28464  # If so, the updated path is stored in $new_path.
28465  new_path="$input_to_shortpath"
28466
28467  input_path="$input_to_shortpath"
28468  # Check if we need to convert this using DOS-style short mode. If the path
28469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28470  # take no chances and rewrite it.
28471  # Note: m4 eats our [], so we need to use [ and ] instead.
28472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28473  if test "x$has_forbidden_chars" != x; then
28474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28478      # Going to short mode and back again did indeed matter. Since short mode is
28479      # case insensitive, let's make it lowercase to improve readability.
28480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28481      # Now convert it back to Unix-stile (cygpath)
28482      input_path=`$CYGPATH -u "$shortmode_path"`
28483      new_path="$input_path"
28484    fi
28485  fi
28486
28487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28488  if test "x$test_cygdrive_prefix" = x; then
28489    # As a simple fix, exclude /usr/bin since it's not a real path.
28490    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28492      # a path prefixed by /cygdrive for fixpath to work.
28493      new_path="$CYGWIN_ROOT_PATH$input_path"
28494    fi
28495  fi
28496
28497  # remove trailing .exe if any
28498  new_path="${new_path/%.exe/}"
28499
28500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28501
28502  # First separate the path from the arguments. This will split at the first
28503  # space.
28504  complete="$LIPO"
28505  path="${complete%% *}"
28506  tmp="$complete EOL"
28507  arguments="${tmp#* }"
28508
28509  # Input might be given as Windows format, start by converting to
28510  # unix format.
28511  new_path="$path"
28512
28513  windows_path="$new_path"
28514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28515    unix_path=`$CYGPATH -u "$windows_path"`
28516    new_path="$unix_path"
28517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28519    new_path="$unix_path"
28520  fi
28521
28522
28523  # Now try to locate executable using which
28524  new_path=`$WHICH "$new_path" 2> /dev/null`
28525
28526  if test "x$new_path" = x; then
28527    # Oops. Which didn't find the executable.
28528    # The splitting of arguments from the executable at a space might have been incorrect,
28529    # since paths with space are more likely in Windows. Give it another try with the whole
28530    # argument.
28531    path="$complete"
28532    arguments="EOL"
28533    new_path="$path"
28534
28535  windows_path="$new_path"
28536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28537    unix_path=`$CYGPATH -u "$windows_path"`
28538    new_path="$unix_path"
28539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28541    new_path="$unix_path"
28542  fi
28543
28544
28545    new_path=`$WHICH "$new_path" 2> /dev/null`
28546
28547    if test "x$new_path" = x; then
28548      # It's still not found. Now this is an unrecoverable error.
28549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28550$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28551      has_space=`$ECHO "$complete" | $GREP " "`
28552      if test "x$has_space" != x; then
28553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28555      fi
28556      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28557    fi
28558  fi
28559
28560  # Now new_path has a complete unix path to the binary
28561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28562    # Keep paths in /bin as-is, but remove trailing .exe if any
28563    new_path="${new_path/%.exe/}"
28564    # Do not save /bin paths to all_fixpath_prefixes!
28565  else
28566    # Not in mixed or Windows style, start by that.
28567    new_path=`cmd //c echo $new_path`
28568
28569  input_path="$new_path"
28570  # Check if we need to convert this using DOS-style short mode. If the path
28571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28572  # take no chances and rewrite it.
28573  # Note: m4 eats our [], so we need to use [ and ] instead.
28574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28575  if test "x$has_forbidden_chars" != x; then
28576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28578  fi
28579
28580    # Output is in $new_path
28581
28582  windows_path="$new_path"
28583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28584    unix_path=`$CYGPATH -u "$windows_path"`
28585    new_path="$unix_path"
28586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28588    new_path="$unix_path"
28589  fi
28590
28591    # remove trailing .exe if any
28592    new_path="${new_path/%.exe/}"
28593
28594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28596  fi
28597
28598  else
28599    # We're on a posix platform. Hooray! :)
28600    # First separate the path from the arguments. This will split at the first
28601    # space.
28602    complete="$LIPO"
28603    path="${complete%% *}"
28604    tmp="$complete EOL"
28605    arguments="${tmp#* }"
28606
28607    # Cannot rely on the command "which" here since it doesn't always work.
28608    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28609    if test -z "$is_absolute_path"; then
28610      # Path to executable is not absolute. Find it.
28611      IFS_save="$IFS"
28612      IFS=:
28613      for p in $PATH; do
28614        if test -f "$p/$path" && test -x "$p/$path"; then
28615          new_path="$p/$path"
28616          break
28617        fi
28618      done
28619      IFS="$IFS_save"
28620    else
28621      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28622$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28623      new_path="$path"
28624    fi
28625
28626    if test "x$new_path" = x; then
28627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28628$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28629      has_space=`$ECHO "$complete" | $GREP " "`
28630      if test "x$has_space" != x; then
28631        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28633      fi
28634      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28635    fi
28636  fi
28637
28638  # Now join together the path and the arguments once again
28639  if test "x$arguments" != xEOL; then
28640    new_complete="$new_path ${arguments% *}"
28641  else
28642    new_complete="$new_path"
28643  fi
28644
28645  if test "x$complete" != "x$new_complete"; then
28646    LIPO="$new_complete"
28647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28648$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28649  fi
28650
28651  fi
28652
28653
28654
28655  # Restore old path without tools dir
28656  PATH="$OLD_PATH"
28657
28658
28659# FIXME: Currently we must test this after paths but before flags. Fix!
28660
28661# And we can test some aspects on the target using configure macros.
28662
28663
28664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28665$as_echo_n "checking for ANSI C header files... " >&6; }
28666if ${ac_cv_header_stdc+:} false; then :
28667  $as_echo_n "(cached) " >&6
28668else
28669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28670/* end confdefs.h.  */
28671#include <stdlib.h>
28672#include <stdarg.h>
28673#include <string.h>
28674#include <float.h>
28675
28676int
28677main ()
28678{
28679
28680  ;
28681  return 0;
28682}
28683_ACEOF
28684if ac_fn_cxx_try_compile "$LINENO"; then :
28685  ac_cv_header_stdc=yes
28686else
28687  ac_cv_header_stdc=no
28688fi
28689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28690
28691if test $ac_cv_header_stdc = yes; then
28692  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28694/* end confdefs.h.  */
28695#include <string.h>
28696
28697_ACEOF
28698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28699  $EGREP "memchr" >/dev/null 2>&1; then :
28700
28701else
28702  ac_cv_header_stdc=no
28703fi
28704rm -f conftest*
28705
28706fi
28707
28708if test $ac_cv_header_stdc = yes; then
28709  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28711/* end confdefs.h.  */
28712#include <stdlib.h>
28713
28714_ACEOF
28715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28716  $EGREP "free" >/dev/null 2>&1; then :
28717
28718else
28719  ac_cv_header_stdc=no
28720fi
28721rm -f conftest*
28722
28723fi
28724
28725if test $ac_cv_header_stdc = yes; then
28726  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28727  if test "$cross_compiling" = yes; then :
28728  :
28729else
28730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28731/* end confdefs.h.  */
28732#include <ctype.h>
28733#include <stdlib.h>
28734#if ((' ' & 0x0FF) == 0x020)
28735# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28736# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28737#else
28738# define ISLOWER(c) \
28739		   (('a' <= (c) && (c) <= 'i') \
28740		     || ('j' <= (c) && (c) <= 'r') \
28741		     || ('s' <= (c) && (c) <= 'z'))
28742# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28743#endif
28744
28745#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28746int
28747main ()
28748{
28749  int i;
28750  for (i = 0; i < 256; i++)
28751    if (XOR (islower (i), ISLOWER (i))
28752	|| toupper (i) != TOUPPER (i))
28753      return 2;
28754  return 0;
28755}
28756_ACEOF
28757if ac_fn_cxx_try_run "$LINENO"; then :
28758
28759else
28760  ac_cv_header_stdc=no
28761fi
28762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28763  conftest.$ac_objext conftest.beam conftest.$ac_ext
28764fi
28765
28766fi
28767fi
28768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28769$as_echo "$ac_cv_header_stdc" >&6; }
28770if test $ac_cv_header_stdc = yes; then
28771
28772$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28773
28774fi
28775
28776# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28777for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28778		  inttypes.h stdint.h unistd.h
28779do :
28780  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28781ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28782"
28783if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28784  cat >>confdefs.h <<_ACEOF
28785#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28786_ACEOF
28787
28788fi
28789
28790done
28791
28792
28793
28794  ###############################################################################
28795  #
28796  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28797  # (The JVM can use 32 or 64 bit Java pointers but that decision
28798  # is made at runtime.)
28799  #
28800
28801  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28802    # Always specify -m flags on Solaris
28803
28804  # When we add flags to the "official" CFLAGS etc, we need to
28805  # keep track of these additions in ADDED_CFLAGS etc. These
28806  # will later be checked to make sure only controlled additions
28807  # have been made to CFLAGS etc.
28808  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28809  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28810  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28811
28812  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28813  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28814  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28815
28816  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28817  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28818  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28819
28820  elif test "x$COMPILE_TYPE" = xreduced; then
28821    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28822      # Specify -m if running reduced on other Posix platforms
28823
28824  # When we add flags to the "official" CFLAGS etc, we need to
28825  # keep track of these additions in ADDED_CFLAGS etc. These
28826  # will later be checked to make sure only controlled additions
28827  # have been made to CFLAGS etc.
28828  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28829  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28830  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28831
28832  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28833  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28834  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28835
28836  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28837  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28838  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28839
28840    fi
28841  fi
28842
28843  # Make compilation sanity check
28844  for ac_header in stdio.h
28845do :
28846  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28847if test "x$ac_cv_header_stdio_h" = xyes; then :
28848  cat >>confdefs.h <<_ACEOF
28849#define HAVE_STDIO_H 1
28850_ACEOF
28851
28852else
28853
28854    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28855$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28856    if test "x$COMPILE_TYPE" = xreduced; then
28857      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28858$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28859    elif test "x$COMPILE_TYPE" = xcross; then
28860      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28861$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28862    fi
28863    as_fn_error $? "Cannot continue." "$LINENO" 5
28864
28865fi
28866
28867done
28868
28869
28870  # The cast to long int works around a bug in the HP C Compiler
28871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28873# This bug is HP SR number 8606223364.
28874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28875$as_echo_n "checking size of int *... " >&6; }
28876if ${ac_cv_sizeof_int_p+:} false; then :
28877  $as_echo_n "(cached) " >&6
28878else
28879  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28880
28881else
28882  if test "$ac_cv_type_int_p" = yes; then
28883     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28885as_fn_error 77 "cannot compute sizeof (int *)
28886See \`config.log' for more details" "$LINENO" 5; }
28887   else
28888     ac_cv_sizeof_int_p=0
28889   fi
28890fi
28891
28892fi
28893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28894$as_echo "$ac_cv_sizeof_int_p" >&6; }
28895
28896
28897
28898cat >>confdefs.h <<_ACEOF
28899#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28900_ACEOF
28901
28902
28903
28904  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28905    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28906    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28907  fi
28908
28909  if test "x$SIZEOF_INT_P" = x; then
28910    # The test failed, lets stick to the assumed value.
28911    { $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
28912$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28913  else
28914    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28915
28916    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28917      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
28918    fi
28919  fi
28920
28921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28922$as_echo_n "checking for target address size... " >&6; }
28923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28924$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28925
28926
28927  ###############################################################################
28928  #
28929  # Is the target little of big endian?
28930  #
28931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28932$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28933if ${ac_cv_c_bigendian+:} false; then :
28934  $as_echo_n "(cached) " >&6
28935else
28936  ac_cv_c_bigendian=unknown
28937    # See if we're dealing with a universal compiler.
28938    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28939/* end confdefs.h.  */
28940#ifndef __APPLE_CC__
28941	       not a universal capable compiler
28942	     #endif
28943	     typedef int dummy;
28944
28945_ACEOF
28946if ac_fn_cxx_try_compile "$LINENO"; then :
28947
28948	# Check for potential -arch flags.  It is not universal unless
28949	# there are at least two -arch flags with different values.
28950	ac_arch=
28951	ac_prev=
28952	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28953	 if test -n "$ac_prev"; then
28954	   case $ac_word in
28955	     i?86 | x86_64 | ppc | ppc64)
28956	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28957		 ac_arch=$ac_word
28958	       else
28959		 ac_cv_c_bigendian=universal
28960		 break
28961	       fi
28962	       ;;
28963	   esac
28964	   ac_prev=
28965	 elif test "x$ac_word" = "x-arch"; then
28966	   ac_prev=arch
28967	 fi
28968       done
28969fi
28970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28971    if test $ac_cv_c_bigendian = unknown; then
28972      # See if sys/param.h defines the BYTE_ORDER macro.
28973      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28974/* end confdefs.h.  */
28975#include <sys/types.h>
28976	     #include <sys/param.h>
28977
28978int
28979main ()
28980{
28981#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28982		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28983		     && LITTLE_ENDIAN)
28984	      bogus endian macros
28985	     #endif
28986
28987  ;
28988  return 0;
28989}
28990_ACEOF
28991if ac_fn_cxx_try_compile "$LINENO"; then :
28992  # It does; now see whether it defined to BIG_ENDIAN or not.
28993	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28994/* end confdefs.h.  */
28995#include <sys/types.h>
28996		#include <sys/param.h>
28997
28998int
28999main ()
29000{
29001#if BYTE_ORDER != BIG_ENDIAN
29002		 not big endian
29003		#endif
29004
29005  ;
29006  return 0;
29007}
29008_ACEOF
29009if ac_fn_cxx_try_compile "$LINENO"; then :
29010  ac_cv_c_bigendian=yes
29011else
29012  ac_cv_c_bigendian=no
29013fi
29014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29015fi
29016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29017    fi
29018    if test $ac_cv_c_bigendian = unknown; then
29019      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29020      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29021/* end confdefs.h.  */
29022#include <limits.h>
29023
29024int
29025main ()
29026{
29027#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29028	      bogus endian macros
29029	     #endif
29030
29031  ;
29032  return 0;
29033}
29034_ACEOF
29035if ac_fn_cxx_try_compile "$LINENO"; then :
29036  # It does; now see whether it defined to _BIG_ENDIAN or not.
29037	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29038/* end confdefs.h.  */
29039#include <limits.h>
29040
29041int
29042main ()
29043{
29044#ifndef _BIG_ENDIAN
29045		 not big endian
29046		#endif
29047
29048  ;
29049  return 0;
29050}
29051_ACEOF
29052if ac_fn_cxx_try_compile "$LINENO"; then :
29053  ac_cv_c_bigendian=yes
29054else
29055  ac_cv_c_bigendian=no
29056fi
29057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29058fi
29059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29060    fi
29061    if test $ac_cv_c_bigendian = unknown; then
29062      # Compile a test program.
29063      if test "$cross_compiling" = yes; then :
29064  # Try to guess by grepping values from an object file.
29065	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29066/* end confdefs.h.  */
29067short int ascii_mm[] =
29068		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29069		short int ascii_ii[] =
29070		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29071		int use_ascii (int i) {
29072		  return ascii_mm[i] + ascii_ii[i];
29073		}
29074		short int ebcdic_ii[] =
29075		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29076		short int ebcdic_mm[] =
29077		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29078		int use_ebcdic (int i) {
29079		  return ebcdic_mm[i] + ebcdic_ii[i];
29080		}
29081		extern int foo;
29082
29083int
29084main ()
29085{
29086return use_ascii (foo) == use_ebcdic (foo);
29087  ;
29088  return 0;
29089}
29090_ACEOF
29091if ac_fn_cxx_try_compile "$LINENO"; then :
29092  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29093	      ac_cv_c_bigendian=yes
29094	    fi
29095	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29096	      if test "$ac_cv_c_bigendian" = unknown; then
29097		ac_cv_c_bigendian=no
29098	      else
29099		# finding both strings is unlikely to happen, but who knows?
29100		ac_cv_c_bigendian=unknown
29101	      fi
29102	    fi
29103fi
29104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29105else
29106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29107/* end confdefs.h.  */
29108$ac_includes_default
29109int
29110main ()
29111{
29112
29113	     /* Are we little or big endian?  From Harbison&Steele.  */
29114	     union
29115	     {
29116	       long int l;
29117	       char c[sizeof (long int)];
29118	     } u;
29119	     u.l = 1;
29120	     return u.c[sizeof (long int) - 1] == 1;
29121
29122  ;
29123  return 0;
29124}
29125_ACEOF
29126if ac_fn_cxx_try_run "$LINENO"; then :
29127  ac_cv_c_bigendian=no
29128else
29129  ac_cv_c_bigendian=yes
29130fi
29131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29132  conftest.$ac_objext conftest.beam conftest.$ac_ext
29133fi
29134
29135    fi
29136fi
29137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29138$as_echo "$ac_cv_c_bigendian" >&6; }
29139 case $ac_cv_c_bigendian in #(
29140   yes)
29141     ENDIAN="big";; #(
29142   no)
29143     ENDIAN="little" ;; #(
29144   universal)
29145     ENDIAN="universal_endianness"
29146     ;; #(
29147   *)
29148     ENDIAN="unknown" ;;
29149 esac
29150
29151
29152  if test "x$ENDIAN" = xuniversal_endianness; then
29153    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29154  fi
29155  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29156    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
29157  fi
29158
29159
29160# Configure flags for the tools
29161
29162
29163  ###############################################################################
29164  #
29165  # How to compile shared libraries.
29166  #
29167
29168  if test "x$GCC" = xyes; then
29169    COMPILER_NAME=gcc
29170    PICFLAG="-fPIC"
29171    LIBRARY_PREFIX=lib
29172    SHARED_LIBRARY='lib$1.so'
29173    STATIC_LIBRARY='lib$1.a'
29174    SHARED_LIBRARY_FLAGS="-shared"
29175    SHARED_LIBRARY_SUFFIX='.so'
29176    STATIC_LIBRARY_SUFFIX='.a'
29177    OBJ_SUFFIX='.o'
29178    EXE_SUFFIX=''
29179    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29180    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29181    C_FLAG_REORDER=''
29182    CXX_FLAG_REORDER=''
29183    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29184    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29185    LD="$CC"
29186    LDEXE="$CC"
29187    LDCXX="$CXX"
29188    LDEXECXX="$CXX"
29189    POST_STRIP_CMD="$STRIP -g"
29190
29191    # Linking is different on MacOSX
29192    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29193      # Might change in the future to clang.
29194      COMPILER_NAME=gcc
29195      SHARED_LIBRARY='lib$1.dylib'
29196      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29197      SHARED_LIBRARY_SUFFIX='.dylib'
29198      EXE_SUFFIX=''
29199      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29200      SET_SHARED_LIBRARY_MAPFILE=''
29201      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29202      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29203      POST_STRIP_CMD="$STRIP -S"
29204    fi
29205  else
29206    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29207      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29208      COMPILER_NAME=ossc
29209      PICFLAG="-KPIC"
29210      LIBRARY_PREFIX=lib
29211      SHARED_LIBRARY='lib$1.so'
29212      STATIC_LIBRARY='lib$1.a'
29213      SHARED_LIBRARY_FLAGS="-G"
29214      SHARED_LIBRARY_SUFFIX='.so'
29215      STATIC_LIBRARY_SUFFIX='.a'
29216      OBJ_SUFFIX='.o'
29217      EXE_SUFFIX=''
29218      SET_SHARED_LIBRARY_NAME=''
29219      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29220      C_FLAG_REORDER='-xF'
29221      CXX_FLAG_REORDER='-xF'
29222      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29223      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29224      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29225      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29226      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29227      POST_STRIP_CMD="$STRIP -x"
29228      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29229    fi
29230    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29231      # If it is not gcc, then assume it is the MS Visual Studio compiler
29232      COMPILER_NAME=cl
29233      PICFLAG=""
29234      LIBRARY_PREFIX=
29235      SHARED_LIBRARY='$1.dll'
29236      STATIC_LIBRARY='$1.lib'
29237      SHARED_LIBRARY_FLAGS="-LD"
29238      SHARED_LIBRARY_SUFFIX='.dll'
29239      STATIC_LIBRARY_SUFFIX='.lib'
29240      OBJ_SUFFIX='.obj'
29241      EXE_SUFFIX='.exe'
29242      SET_SHARED_LIBRARY_NAME=''
29243      SET_SHARED_LIBRARY_MAPFILE=''
29244      SET_SHARED_LIBRARY_ORIGIN=''
29245      SET_EXECUTABLE_ORIGIN=''
29246    fi
29247  fi
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267  # The (cross) compiler is now configured, we can now test capabilities
29268  # of the target platform.
29269
29270
29271
29272  ###############################################################################
29273  #
29274  # Setup the opt flags for different compilers
29275  # and different operating systems.
29276  #
29277
29278  #
29279  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29280  #
29281  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29282    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29283    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29284    CFLAGS="$CFLAGS -mstackrealign"
29285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29286$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29287    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29288/* end confdefs.h.  */
29289int main() { return 0; }
29290_ACEOF
29291if ac_fn_cxx_try_link "$LINENO"; then :
29292
29293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29294$as_echo "yes" >&6; }
29295
29296else
29297
29298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29299$as_echo "no" >&6; }
29300          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29301
29302
29303fi
29304rm -f core conftest.err conftest.$ac_objext \
29305    conftest$ac_exeext conftest.$ac_ext
29306  fi
29307
29308  C_FLAG_DEPS="-MMD -MF"
29309  CXX_FLAG_DEPS="-MMD -MF"
29310
29311  case $COMPILER_TYPE in
29312    CC )
29313      case $COMPILER_NAME in
29314        gcc )
29315          case $OPENJDK_TARGET_OS in
29316            macosx )
29317              # On MacOSX we optimize for size, something
29318              # we should do for all platforms?
29319              C_O_FLAG_HI="-Os"
29320              C_O_FLAG_NORM="-Os"
29321              C_O_FLAG_NONE=""
29322              ;;
29323            *)
29324              C_O_FLAG_HI="-O3"
29325              C_O_FLAG_NORM="-O2"
29326              C_O_FLAG_NONE="-O0"
29327              ;;
29328          esac
29329          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29330          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29331          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29332          CFLAGS_DEBUG_SYMBOLS="-g"
29333          CXXFLAGS_DEBUG_SYMBOLS="-g"
29334          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29335            CFLAGS_DEBUG_SYMBOLS="-g1"
29336            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29337          fi
29338          ;;
29339        ossc )
29340          #
29341          # Forte has different names for this with their C++ compiler...
29342          #
29343          C_FLAG_DEPS="-xMMD -xMF"
29344          CXX_FLAG_DEPS="-xMMD -xMF"
29345
29346          # Extra options used with HIGHEST
29347          #
29348          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29349          #          done with care, there are some assumptions below that need to
29350          #          be understood about the use of pointers, and IEEE behavior.
29351          #
29352          # Use non-standard floating point mode (not IEEE 754)
29353          CC_HIGHEST="$CC_HIGHEST -fns"
29354          # Do some simplification of floating point arithmetic (not IEEE 754)
29355          CC_HIGHEST="$CC_HIGHEST -fsimple"
29356          # Use single precision floating point with 'float'
29357          CC_HIGHEST="$CC_HIGHEST -fsingle"
29358          # Assume memory references via basic pointer types do not alias
29359          #   (Source with excessing pointer casting and data access with mixed
29360          #    pointer types are not recommended)
29361          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29362          # Use intrinsic or inline versions for math/std functions
29363          #   (If you expect perfect errno behavior, do not use this)
29364          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29365          # Loop data dependency optimizations (need -xO3 or higher)
29366          CC_HIGHEST="$CC_HIGHEST -xdepend"
29367          # Pointer parameters to functions do not overlap
29368          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29369          #    If you pass in multiple pointers to the same data, do not use this)
29370          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29371          # Inline some library routines
29372          #   (If you expect perfect errno behavior, do not use this)
29373          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29374          # Use optimized math routines
29375          #   (If you expect perfect errno behavior, do not use this)
29376          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29377          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29378
29379          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29380            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29381            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29382          fi
29383
29384          case $OPENJDK_TARGET_CPU_ARCH in
29385            x86)
29386              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29387              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29388              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29389              C_O_FLAG_NONE="-xregs=no%frameptr"
29390              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29391              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29392              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29393              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29394              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29395                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29396                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29397              fi
29398              ;;
29399            sparc)
29400              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29401              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29402              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29403              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29404              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29405              C_O_FLAG_NONE=""
29406              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29407              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29408              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29409              CXX_O_FLAG_NONE=""
29410              ;;
29411          esac
29412
29413          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29414          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29415      esac
29416      ;;
29417    CL )
29418      C_O_FLAG_HIGHEST="-O2"
29419      C_O_FLAG_HI="-O1"
29420      C_O_FLAG_NORM="-O1"
29421      C_O_FLAG_NONE="-Od"
29422      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29423      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29424      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29425      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29426      ;;
29427  esac
29428
29429  if test -z "$C_O_FLAG_HIGHEST"; then
29430    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29431  fi
29432
29433  if test -z "$CXX_O_FLAG_HIGHEST"; then
29434    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29435  fi
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29452$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29453  fi
29454
29455  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29457$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29458  fi
29459
29460  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29462$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29463  fi
29464
29465
29466# Check whether --with-extra-cflags was given.
29467if test "${with_extra_cflags+set}" = set; then :
29468  withval=$with_extra_cflags;
29469fi
29470
29471
29472
29473# Check whether --with-extra-cxxflags was given.
29474if test "${with_extra_cxxflags+set}" = set; then :
29475  withval=$with_extra_cxxflags;
29476fi
29477
29478
29479
29480# Check whether --with-extra-ldflags was given.
29481if test "${with_extra_ldflags+set}" = set; then :
29482  withval=$with_extra_ldflags;
29483fi
29484
29485
29486  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29487  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29488  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29489
29490  # Hotspot needs these set in their legacy form
29491  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29492  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29493  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29494
29495
29496
29497
29498
29499  ###############################################################################
29500  #
29501  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29502  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29503  #
29504  case $COMPILER_NAME in
29505    gcc )
29506      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29507      -pipe \
29508      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29509      case $OPENJDK_TARGET_CPU_ARCH in
29510        arm )
29511          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29512          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29513          ;;
29514        ppc )
29515          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29516          ;;
29517        * )
29518          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29519          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29520          ;;
29521      esac
29522      ;;
29523    ossc )
29524      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29525      case $OPENJDK_TARGET_CPU_ARCH in
29526        x86 )
29527          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29528          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29529          ;;
29530      esac
29531
29532      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29533      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29534
29535      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29536      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29537      ;;
29538    cl )
29539      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29540      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29541      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29542      -DWIN32 -DIAL"
29543      case $OPENJDK_TARGET_CPU in
29544        x86 )
29545          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29546          ;;
29547        x86_64 )
29548          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29549          ;;
29550      esac
29551      ;;
29552  esac
29553
29554  ###############################################################################
29555
29556  # Adjust flags according to debug level.
29557  case $DEBUG_LEVEL in
29558    fastdebug )
29559      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29560      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29561      C_O_FLAG_HI="$C_O_FLAG_NORM"
29562      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29563      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29564      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29565      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29566      ;;
29567    slowdebug )
29568      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29569      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29570      C_O_FLAG_HI="$C_O_FLAG_NONE"
29571      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29572      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29573      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29574      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29575      ;;
29576  esac
29577
29578  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29579
29580  # The package path is used only on macosx?
29581  PACKAGE_PATH=/opt/local
29582
29583
29584  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29585    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29586    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29587    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29588    #   Note: -Dmacro         is the same as    #define macro 1
29589    #         -Dmacro=        is the same as    #define macro
29590    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29591      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29592    else
29593      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29594    fi
29595  else
29596    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29597  fi
29598  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29599    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29600  fi
29601  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29602    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29603  fi
29604  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29605    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29606  fi
29607  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29608    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29609    # Setting these parameters makes it an error to link to macosx APIs that are
29610    # newer than the given OS version and makes the linked binaries compatible even
29611    # if built on a newer version of the OS.
29612    # The expected format is X.Y.Z
29613    MACOSX_VERSION_MIN=10.7.0
29614
29615    # The macro takes the version with no dots, ex: 1070
29616    # Let the flags variables get resolved in make for easier override on make
29617    # command line.
29618    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29619    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29620  fi
29621  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29622    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29623  fi
29624  if test "x$DEBUG_LEVEL" = xrelease; then
29625    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29626  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29627    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29628  fi
29629  else
29630    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29631  fi
29632
29633  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29634  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29635
29636  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29637      -I${JDK_OUTPUTDIR}/include \
29638      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29639      -I${JDK_TOPDIR}/src/share/javavm/export \
29640      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29641      -I${JDK_TOPDIR}/src/share/native/common \
29642      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29643
29644  # The shared libraries are compiled using the picflag.
29645  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29646  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29647
29648  # Executable flags
29649  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29650  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29651
29652  # Now this is odd. The JDK native libraries have to link against libjvm.so
29653  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29654  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29655  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29656  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29657  # libraries will link to whatever is in memory. Yuck.
29658  #
29659  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29660  if test "x$COMPILER_NAME" = xcl; then
29661    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29662    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29663      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29664    fi
29665    # TODO: make -debug optional "--disable-full-debug-symbols"
29666    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29667    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29668    LDFLAGS_JDKLIB_SUFFIX=""
29669    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29670      LDFLAGS_STACK_SIZE=1048576
29671    else
29672      LDFLAGS_STACK_SIZE=327680
29673    fi
29674    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29675  else
29676    if test "x$COMPILER_NAME" = xgcc; then
29677      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29678      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29679      if test -n "$HAS_GNU_HASH"; then
29680        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29681      fi
29682      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29683        # And since we now know that the linker is gnu, then add -z defs, to forbid
29684        # undefined symbols in object files.
29685        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29686        if test "x$DEBUG_LEVEL" = "xrelease"; then
29687          # When building release libraries, tell the linker optimize them.
29688          # Should this be supplied to the OSS linker as well?
29689          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29690        fi
29691      fi
29692    fi
29693    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29694        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29695
29696    # On some platforms (mac) the linker warns about non existing -L dirs.
29697    # Add server first if available. Linking aginst client does not always produce the same results.
29698    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29699    # Default to server for other variants.
29700    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29701      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29702    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29703      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29704    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29705      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29706    else
29707      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29708    fi
29709
29710    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29711    if test "x$COMPILER_NAME" = xossc; then
29712      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29713    fi
29714
29715    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29716    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29717      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29718    fi
29719  fi
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735  # Some Zero and Shark settings.
29736  # ZERO_ARCHFLAG tells the compiler which mode to build for
29737  case "${OPENJDK_TARGET_CPU}" in
29738    s390)
29739      ZERO_ARCHFLAG="-m31"
29740      ;;
29741    *)
29742      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29743  esac
29744
29745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29746$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29747  supports=yes
29748
29749  saved_cflags="$CFLAGS"
29750  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29751  ac_ext=c
29752ac_cpp='$CPP $CPPFLAGS'
29753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29755ac_compiler_gnu=$ac_cv_c_compiler_gnu
29756
29757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29758/* end confdefs.h.  */
29759int i;
29760_ACEOF
29761if ac_fn_c_try_compile "$LINENO"; then :
29762
29763else
29764  supports=no
29765fi
29766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29767  ac_ext=cpp
29768ac_cpp='$CXXCPP $CPPFLAGS'
29769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29772
29773  CFLAGS="$saved_cflags"
29774
29775  saved_cxxflags="$CXXFLAGS"
29776  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29777  ac_ext=cpp
29778ac_cpp='$CXXCPP $CPPFLAGS'
29779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29782
29783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29784/* end confdefs.h.  */
29785int i;
29786_ACEOF
29787if ac_fn_cxx_try_compile "$LINENO"; then :
29788
29789else
29790  supports=no
29791fi
29792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29793  ac_ext=cpp
29794ac_cpp='$CXXCPP $CPPFLAGS'
29795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29798
29799  CXXFLAGS="$saved_cxxflags"
29800
29801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29802$as_echo "$supports" >&6; }
29803  if test "x$supports" = "xyes" ; then
29804    :
29805  else
29806    ZERO_ARCHFLAG=""
29807  fi
29808
29809
29810
29811  # Check that the compiler supports -mX flags
29812  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29813
29814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29815$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29816  supports=yes
29817
29818  saved_cflags="$CFLAGS"
29819  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29820  ac_ext=c
29821ac_cpp='$CPP $CPPFLAGS'
29822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29824ac_compiler_gnu=$ac_cv_c_compiler_gnu
29825
29826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29827/* end confdefs.h.  */
29828int i;
29829_ACEOF
29830if ac_fn_c_try_compile "$LINENO"; then :
29831
29832else
29833  supports=no
29834fi
29835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29836  ac_ext=cpp
29837ac_cpp='$CXXCPP $CPPFLAGS'
29838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29841
29842  CFLAGS="$saved_cflags"
29843
29844  saved_cxxflags="$CXXFLAGS"
29845  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29846  ac_ext=cpp
29847ac_cpp='$CXXCPP $CPPFLAGS'
29848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29851
29852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29853/* end confdefs.h.  */
29854int i;
29855_ACEOF
29856if ac_fn_cxx_try_compile "$LINENO"; then :
29857
29858else
29859  supports=no
29860fi
29861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29862  ac_ext=cpp
29863ac_cpp='$CXXCPP $CPPFLAGS'
29864ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29865ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29866ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29867
29868  CXXFLAGS="$saved_cxxflags"
29869
29870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29871$as_echo "$supports" >&6; }
29872  if test "x$supports" = "xyes" ; then
29873    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29874  else
29875    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29876  fi
29877
29878
29879
29880
29881# Setup debug symbols (need objcopy from the toolchain for that)
29882
29883  #
29884  # ENABLE_DEBUG_SYMBOLS
29885  # This must be done after the toolchain is setup, since we're looking at objcopy.
29886  #
29887  # Check whether --enable-debug-symbols was given.
29888if test "${enable_debug_symbols+set}" = set; then :
29889  enableval=$enable_debug_symbols;
29890fi
29891
29892
29893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29894$as_echo_n "checking if we should generate debug symbols... " >&6; }
29895
29896  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29897    # explicit enabling of enable-debug-symbols and can't find objcopy
29898    #   this is an error
29899    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29900  fi
29901
29902  if test "x$enable_debug_symbols" = "xyes"; then
29903    ENABLE_DEBUG_SYMBOLS=true
29904  elif test "x$enable_debug_symbols" = "xno"; then
29905    ENABLE_DEBUG_SYMBOLS=false
29906  else
29907    # Default is on if objcopy is found
29908    if test "x$OBJCOPY" != x; then
29909      ENABLE_DEBUG_SYMBOLS=true
29910    # MacOS X and Windows don't use objcopy but default is on for those OSes
29911    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29912      ENABLE_DEBUG_SYMBOLS=true
29913    else
29914      ENABLE_DEBUG_SYMBOLS=false
29915    fi
29916  fi
29917
29918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29919$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29920
29921  #
29922  # ZIP_DEBUGINFO_FILES
29923  #
29924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29925$as_echo_n "checking if we should zip debug-info files... " >&6; }
29926  # Check whether --enable-zip-debug-info was given.
29927if test "${enable_zip_debug_info+set}" = set; then :
29928  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29929else
29930  enable_zip_debug_info="yes"
29931fi
29932
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29934$as_echo "${enable_zip_debug_info}" >&6; }
29935
29936  if test "x${enable_zip_debug_info}" = "xno"; then
29937    ZIP_DEBUGINFO_FILES=false
29938  else
29939    ZIP_DEBUGINFO_FILES=true
29940  fi
29941
29942
29943
29944
29945
29946
29947
29948###############################################################################
29949#
29950# Check dependencies for external and internal libraries.
29951#
29952###############################################################################
29953
29954# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
29955
29956  # When using cygwin or msys, we need a wrapper binary that renames
29957  # /cygdrive/c/ arguments into c:/ arguments and peeks into
29958  # @files and rewrites these too! This wrapper binary is
29959  # called fixpath.
29960  FIXPATH=
29961  if test "x$OPENJDK_BUILD_OS" = xwindows; then
29962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29963$as_echo_n "checking if fixpath can be created... " >&6; }
29964    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29965    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29966    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29967      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29968      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29969      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29970      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29971    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29972      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29973      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29974
29975      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29976      # @ was chosen as separator to minimize risk of other tools messing around with it
29977      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29978      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29979
29980      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29981    fi
29982    rm -f $OUTPUT_ROOT/fixpath*
29983    cd $OUTPUT_ROOT
29984    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29985    cd $CURDIR
29986
29987    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29988      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29989$as_echo "no" >&6; }
29990      cat $OUTPUT_ROOT/fixpath1.log
29991      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
29992    fi
29993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29994$as_echo "yes" >&6; }
29995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
29996$as_echo_n "checking if fixpath.exe works... " >&6; }
29997    cd $OUTPUT_ROOT
29998    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
29999    cd $CURDIR
30000    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30002$as_echo "no" >&6; }
30003      cat $OUTPUT_ROOT/fixpath2.log
30004      as_fn_error $? "fixpath did not work!" "$LINENO" 5
30005    fi
30006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30007$as_echo "yes" >&6; }
30008    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30009  fi
30010
30011
30012
30013
30014
30015
30016  ###############################################################################
30017  #
30018  # OS specific settings that we never will need to probe.
30019  #
30020  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30022$as_echo_n "checking what is not needed on Linux?... " >&6; }
30023    PULSE_NOT_NEEDED=yes
30024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30025$as_echo "pulse" >&6; }
30026  fi
30027
30028  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30030$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30031    ALSA_NOT_NEEDED=yes
30032    PULSE_NOT_NEEDED=yes
30033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30034$as_echo "alsa pulse" >&6; }
30035  fi
30036
30037  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30039$as_echo_n "checking what is not needed on Windows?... " >&6; }
30040    CUPS_NOT_NEEDED=yes
30041    ALSA_NOT_NEEDED=yes
30042    PULSE_NOT_NEEDED=yes
30043    X11_NOT_NEEDED=yes
30044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30045$as_echo "alsa cups pulse x11" >&6; }
30046  fi
30047
30048  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30050$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30051    ALSA_NOT_NEEDED=yes
30052    PULSE_NOT_NEEDED=yes
30053    X11_NOT_NEEDED=yes
30054    # If the java runtime framework is disabled, then we need X11.
30055    # This will be adjusted below.
30056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30057$as_echo "alsa pulse x11" >&6; }
30058  fi
30059
30060  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30062$as_echo_n "checking what is not needed on bsd?... " >&6; }
30063    ALSA_NOT_NEEDED=yes
30064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30065$as_echo "alsa" >&6; }
30066  fi
30067
30068  if test "x$OPENJDK" = "xfalse"; then
30069    FREETYPE_NOT_NEEDED=yes
30070  fi
30071
30072  if test "x$SUPPORT_HEADFUL" = xno; then
30073    X11_NOT_NEEDED=yes
30074  fi
30075
30076  ###############################################################################
30077  #
30078  # Check for MacOSX support for OpenJDK.
30079  #
30080
30081
30082  # Check whether --enable-macosx-runtime-support was given.
30083if test "${enable_macosx_runtime_support+set}" = set; then :
30084  enableval=$enable_macosx_runtime_support;
30085fi
30086
30087  if test "x$enable_macosx_runtime_support" != x; then
30088    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30089$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30090  fi
30091
30092
30093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30094$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30095  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30097$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30098  else
30099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30100$as_echo "no" >&6; }
30101  fi
30102
30103
30104
30105  ###############################################################################
30106  #
30107  # Check for X Windows
30108  #
30109
30110  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30111  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30112  # --x-libraries for the sysroot, if that seems to be correct.
30113  if test "x$SYS_ROOT" != "x/"; then
30114    if test "x$x_includes" = xNONE; then
30115      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30116        x_includes="$SYS_ROOT/usr/X11R6/include"
30117      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30118        x_includes="$SYS_ROOT/usr/include"
30119      fi
30120    fi
30121    if test "x$x_libraries" = xNONE; then
30122      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30123        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30124      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30125        x_libraries="$SYS_ROOT/usr/lib64"
30126      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30127        x_libraries="$SYS_ROOT/usr/lib"
30128      fi
30129    fi
30130  fi
30131
30132  # Now let autoconf do it's magic
30133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30134$as_echo_n "checking for X... " >&6; }
30135
30136
30137# Check whether --with-x was given.
30138if test "${with_x+set}" = set; then :
30139  withval=$with_x;
30140fi
30141
30142# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30143if test "x$with_x" = xno; then
30144  # The user explicitly disabled X.
30145  have_x=disabled
30146else
30147  case $x_includes,$x_libraries in #(
30148    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30149    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30150  $as_echo_n "(cached) " >&6
30151else
30152  # One or both of the vars are not set, and there is no cached value.
30153ac_x_includes=no ac_x_libraries=no
30154rm -f -r conftest.dir
30155if mkdir conftest.dir; then
30156  cd conftest.dir
30157  cat >Imakefile <<'_ACEOF'
30158incroot:
30159	@echo incroot='${INCROOT}'
30160usrlibdir:
30161	@echo usrlibdir='${USRLIBDIR}'
30162libdir:
30163	@echo libdir='${LIBDIR}'
30164_ACEOF
30165  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30166    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30167    for ac_var in incroot usrlibdir libdir; do
30168      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30169    done
30170    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30171    for ac_extension in a so sl dylib la dll; do
30172      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30173	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30174	ac_im_usrlibdir=$ac_im_libdir; break
30175      fi
30176    done
30177    # Screen out bogus values from the imake configuration.  They are
30178    # bogus both because they are the default anyway, and because
30179    # using them would break gcc on systems where it needs fixed includes.
30180    case $ac_im_incroot in
30181	/usr/include) ac_x_includes= ;;
30182	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30183    esac
30184    case $ac_im_usrlibdir in
30185	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30186	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30187    esac
30188  fi
30189  cd ..
30190  rm -f -r conftest.dir
30191fi
30192
30193# Standard set of common directories for X headers.
30194# Check X11 before X11Rn because it is often a symlink to the current release.
30195ac_x_header_dirs='
30196/usr/X11/include
30197/usr/X11R7/include
30198/usr/X11R6/include
30199/usr/X11R5/include
30200/usr/X11R4/include
30201
30202/usr/include/X11
30203/usr/include/X11R7
30204/usr/include/X11R6
30205/usr/include/X11R5
30206/usr/include/X11R4
30207
30208/usr/local/X11/include
30209/usr/local/X11R7/include
30210/usr/local/X11R6/include
30211/usr/local/X11R5/include
30212/usr/local/X11R4/include
30213
30214/usr/local/include/X11
30215/usr/local/include/X11R7
30216/usr/local/include/X11R6
30217/usr/local/include/X11R5
30218/usr/local/include/X11R4
30219
30220/usr/X386/include
30221/usr/x386/include
30222/usr/XFree86/include/X11
30223
30224/usr/include
30225/usr/local/include
30226/usr/unsupported/include
30227/usr/athena/include
30228/usr/local/x11r5/include
30229/usr/lpp/Xamples/include
30230
30231/usr/openwin/include
30232/usr/openwin/share/include'
30233
30234if test "$ac_x_includes" = no; then
30235  # Guess where to find include files, by looking for Xlib.h.
30236  # First, try using that file with no special directory specified.
30237  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30238/* end confdefs.h.  */
30239#include <X11/Xlib.h>
30240_ACEOF
30241if ac_fn_cxx_try_cpp "$LINENO"; then :
30242  # We can compile using X headers with no special include directory.
30243ac_x_includes=
30244else
30245  for ac_dir in $ac_x_header_dirs; do
30246  if test -r "$ac_dir/X11/Xlib.h"; then
30247    ac_x_includes=$ac_dir
30248    break
30249  fi
30250done
30251fi
30252rm -f conftest.err conftest.i conftest.$ac_ext
30253fi # $ac_x_includes = no
30254
30255if test "$ac_x_libraries" = no; then
30256  # Check for the libraries.
30257  # See if we find them without any special options.
30258  # Don't add to $LIBS permanently.
30259  ac_save_LIBS=$LIBS
30260  LIBS="-lX11 $LIBS"
30261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30262/* end confdefs.h.  */
30263#include <X11/Xlib.h>
30264int
30265main ()
30266{
30267XrmInitialize ()
30268  ;
30269  return 0;
30270}
30271_ACEOF
30272if ac_fn_cxx_try_link "$LINENO"; then :
30273  LIBS=$ac_save_LIBS
30274# We can link X programs with no special library path.
30275ac_x_libraries=
30276else
30277  LIBS=$ac_save_LIBS
30278for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30279do
30280  # Don't even attempt the hair of trying to link an X program!
30281  for ac_extension in a so sl dylib la dll; do
30282    if test -r "$ac_dir/libX11.$ac_extension"; then
30283      ac_x_libraries=$ac_dir
30284      break 2
30285    fi
30286  done
30287done
30288fi
30289rm -f core conftest.err conftest.$ac_objext \
30290    conftest$ac_exeext conftest.$ac_ext
30291fi # $ac_x_libraries = no
30292
30293case $ac_x_includes,$ac_x_libraries in #(
30294  no,* | *,no | *\'*)
30295    # Didn't find X, or a directory has "'" in its name.
30296    ac_cv_have_x="have_x=no";; #(
30297  *)
30298    # Record where we found X for the cache.
30299    ac_cv_have_x="have_x=yes\
30300	ac_x_includes='$ac_x_includes'\
30301	ac_x_libraries='$ac_x_libraries'"
30302esac
30303fi
30304;; #(
30305    *) have_x=yes;;
30306  esac
30307  eval "$ac_cv_have_x"
30308fi # $with_x != no
30309
30310if test "$have_x" != yes; then
30311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30312$as_echo "$have_x" >&6; }
30313  no_x=yes
30314else
30315  # If each of the values was on the command line, it overrides each guess.
30316  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30317  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30318  # Update the cache value to reflect the command line values.
30319  ac_cv_have_x="have_x=yes\
30320	ac_x_includes='$x_includes'\
30321	ac_x_libraries='$x_libraries'"
30322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30323$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30324fi
30325
30326  if test "$no_x" = yes; then
30327  # Not all programs may use this symbol, but it does not hurt to define it.
30328
30329$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30330
30331  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30332else
30333  if test -n "$x_includes"; then
30334    X_CFLAGS="$X_CFLAGS -I$x_includes"
30335  fi
30336
30337  # It would also be nice to do this for all -L options, not just this one.
30338  if test -n "$x_libraries"; then
30339    X_LIBS="$X_LIBS -L$x_libraries"
30340    # For Solaris; some versions of Sun CC require a space after -R and
30341    # others require no space.  Words are not sufficient . . . .
30342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30343$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30344    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30345    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30346    ac_cxx_werror_flag=yes
30347    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30348/* end confdefs.h.  */
30349
30350int
30351main ()
30352{
30353
30354  ;
30355  return 0;
30356}
30357_ACEOF
30358if ac_fn_cxx_try_link "$LINENO"; then :
30359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30360$as_echo "no" >&6; }
30361       X_LIBS="$X_LIBS -R$x_libraries"
30362else
30363  LIBS="$ac_xsave_LIBS -R $x_libraries"
30364       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30365/* end confdefs.h.  */
30366
30367int
30368main ()
30369{
30370
30371  ;
30372  return 0;
30373}
30374_ACEOF
30375if ac_fn_cxx_try_link "$LINENO"; then :
30376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30377$as_echo "yes" >&6; }
30378	  X_LIBS="$X_LIBS -R $x_libraries"
30379else
30380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30381$as_echo "neither works" >&6; }
30382fi
30383rm -f core conftest.err conftest.$ac_objext \
30384    conftest$ac_exeext conftest.$ac_ext
30385fi
30386rm -f core conftest.err conftest.$ac_objext \
30387    conftest$ac_exeext conftest.$ac_ext
30388    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30389    LIBS=$ac_xsave_LIBS
30390  fi
30391
30392  # Check for system-dependent libraries X programs must link with.
30393  # Do this before checking for the system-independent R6 libraries
30394  # (-lICE), since we may need -lsocket or whatever for X linking.
30395
30396  if test "$ISC" = yes; then
30397    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30398  else
30399    # Martyn Johnson says this is needed for Ultrix, if the X
30400    # libraries were built with DECnet support.  And Karl Berry says
30401    # the Alpha needs dnet_stub (dnet does not exist).
30402    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30403    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30404/* end confdefs.h.  */
30405
30406/* Override any GCC internal prototype to avoid an error.
30407   Use char because int might match the return type of a GCC
30408   builtin and then its argument prototype would still apply.  */
30409#ifdef __cplusplus
30410extern "C"
30411#endif
30412char XOpenDisplay ();
30413int
30414main ()
30415{
30416return XOpenDisplay ();
30417  ;
30418  return 0;
30419}
30420_ACEOF
30421if ac_fn_cxx_try_link "$LINENO"; then :
30422
30423else
30424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30425$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30426if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30427  $as_echo_n "(cached) " >&6
30428else
30429  ac_check_lib_save_LIBS=$LIBS
30430LIBS="-ldnet  $LIBS"
30431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30432/* end confdefs.h.  */
30433
30434/* Override any GCC internal prototype to avoid an error.
30435   Use char because int might match the return type of a GCC
30436   builtin and then its argument prototype would still apply.  */
30437#ifdef __cplusplus
30438extern "C"
30439#endif
30440char dnet_ntoa ();
30441int
30442main ()
30443{
30444return dnet_ntoa ();
30445  ;
30446  return 0;
30447}
30448_ACEOF
30449if ac_fn_cxx_try_link "$LINENO"; then :
30450  ac_cv_lib_dnet_dnet_ntoa=yes
30451else
30452  ac_cv_lib_dnet_dnet_ntoa=no
30453fi
30454rm -f core conftest.err conftest.$ac_objext \
30455    conftest$ac_exeext conftest.$ac_ext
30456LIBS=$ac_check_lib_save_LIBS
30457fi
30458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30459$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30460if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30461  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30462fi
30463
30464    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30466$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30467if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30468  $as_echo_n "(cached) " >&6
30469else
30470  ac_check_lib_save_LIBS=$LIBS
30471LIBS="-ldnet_stub  $LIBS"
30472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30473/* end confdefs.h.  */
30474
30475/* Override any GCC internal prototype to avoid an error.
30476   Use char because int might match the return type of a GCC
30477   builtin and then its argument prototype would still apply.  */
30478#ifdef __cplusplus
30479extern "C"
30480#endif
30481char dnet_ntoa ();
30482int
30483main ()
30484{
30485return dnet_ntoa ();
30486  ;
30487  return 0;
30488}
30489_ACEOF
30490if ac_fn_cxx_try_link "$LINENO"; then :
30491  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30492else
30493  ac_cv_lib_dnet_stub_dnet_ntoa=no
30494fi
30495rm -f core conftest.err conftest.$ac_objext \
30496    conftest$ac_exeext conftest.$ac_ext
30497LIBS=$ac_check_lib_save_LIBS
30498fi
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30500$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30501if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30502  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30503fi
30504
30505    fi
30506fi
30507rm -f core conftest.err conftest.$ac_objext \
30508    conftest$ac_exeext conftest.$ac_ext
30509    LIBS="$ac_xsave_LIBS"
30510
30511    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30512    # to get the SysV transport functions.
30513    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30514    # needs -lnsl.
30515    # The nsl library prevents programs from opening the X display
30516    # on Irix 5.2, according to T.E. Dickey.
30517    # The functions gethostbyname, getservbyname, and inet_addr are
30518    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30519    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30520if test "x$ac_cv_func_gethostbyname" = xyes; then :
30521
30522fi
30523
30524    if test $ac_cv_func_gethostbyname = no; then
30525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30526$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30527if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30528  $as_echo_n "(cached) " >&6
30529else
30530  ac_check_lib_save_LIBS=$LIBS
30531LIBS="-lnsl  $LIBS"
30532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30533/* end confdefs.h.  */
30534
30535/* Override any GCC internal prototype to avoid an error.
30536   Use char because int might match the return type of a GCC
30537   builtin and then its argument prototype would still apply.  */
30538#ifdef __cplusplus
30539extern "C"
30540#endif
30541char gethostbyname ();
30542int
30543main ()
30544{
30545return gethostbyname ();
30546  ;
30547  return 0;
30548}
30549_ACEOF
30550if ac_fn_cxx_try_link "$LINENO"; then :
30551  ac_cv_lib_nsl_gethostbyname=yes
30552else
30553  ac_cv_lib_nsl_gethostbyname=no
30554fi
30555rm -f core conftest.err conftest.$ac_objext \
30556    conftest$ac_exeext conftest.$ac_ext
30557LIBS=$ac_check_lib_save_LIBS
30558fi
30559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30560$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30561if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30562  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30563fi
30564
30565      if test $ac_cv_lib_nsl_gethostbyname = no; then
30566	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30567$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30568if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30569  $as_echo_n "(cached) " >&6
30570else
30571  ac_check_lib_save_LIBS=$LIBS
30572LIBS="-lbsd  $LIBS"
30573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30574/* end confdefs.h.  */
30575
30576/* Override any GCC internal prototype to avoid an error.
30577   Use char because int might match the return type of a GCC
30578   builtin and then its argument prototype would still apply.  */
30579#ifdef __cplusplus
30580extern "C"
30581#endif
30582char gethostbyname ();
30583int
30584main ()
30585{
30586return gethostbyname ();
30587  ;
30588  return 0;
30589}
30590_ACEOF
30591if ac_fn_cxx_try_link "$LINENO"; then :
30592  ac_cv_lib_bsd_gethostbyname=yes
30593else
30594  ac_cv_lib_bsd_gethostbyname=no
30595fi
30596rm -f core conftest.err conftest.$ac_objext \
30597    conftest$ac_exeext conftest.$ac_ext
30598LIBS=$ac_check_lib_save_LIBS
30599fi
30600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30601$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30602if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30603  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30604fi
30605
30606      fi
30607    fi
30608
30609    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30610    # socket/setsockopt and other routines are undefined under SCO ODT
30611    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30612    # on later versions), says Simon Leinen: it contains gethostby*
30613    # variants that don't use the name server (or something).  -lsocket
30614    # must be given before -lnsl if both are needed.  We assume that
30615    # if connect needs -lnsl, so does gethostbyname.
30616    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30617if test "x$ac_cv_func_connect" = xyes; then :
30618
30619fi
30620
30621    if test $ac_cv_func_connect = no; then
30622      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30623$as_echo_n "checking for connect in -lsocket... " >&6; }
30624if ${ac_cv_lib_socket_connect+:} false; then :
30625  $as_echo_n "(cached) " >&6
30626else
30627  ac_check_lib_save_LIBS=$LIBS
30628LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30630/* end confdefs.h.  */
30631
30632/* Override any GCC internal prototype to avoid an error.
30633   Use char because int might match the return type of a GCC
30634   builtin and then its argument prototype would still apply.  */
30635#ifdef __cplusplus
30636extern "C"
30637#endif
30638char connect ();
30639int
30640main ()
30641{
30642return connect ();
30643  ;
30644  return 0;
30645}
30646_ACEOF
30647if ac_fn_cxx_try_link "$LINENO"; then :
30648  ac_cv_lib_socket_connect=yes
30649else
30650  ac_cv_lib_socket_connect=no
30651fi
30652rm -f core conftest.err conftest.$ac_objext \
30653    conftest$ac_exeext conftest.$ac_ext
30654LIBS=$ac_check_lib_save_LIBS
30655fi
30656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30657$as_echo "$ac_cv_lib_socket_connect" >&6; }
30658if test "x$ac_cv_lib_socket_connect" = xyes; then :
30659  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30660fi
30661
30662    fi
30663
30664    # Guillermo Gomez says -lposix is necessary on A/UX.
30665    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30666if test "x$ac_cv_func_remove" = xyes; then :
30667
30668fi
30669
30670    if test $ac_cv_func_remove = no; then
30671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30672$as_echo_n "checking for remove in -lposix... " >&6; }
30673if ${ac_cv_lib_posix_remove+:} false; then :
30674  $as_echo_n "(cached) " >&6
30675else
30676  ac_check_lib_save_LIBS=$LIBS
30677LIBS="-lposix  $LIBS"
30678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30679/* end confdefs.h.  */
30680
30681/* Override any GCC internal prototype to avoid an error.
30682   Use char because int might match the return type of a GCC
30683   builtin and then its argument prototype would still apply.  */
30684#ifdef __cplusplus
30685extern "C"
30686#endif
30687char remove ();
30688int
30689main ()
30690{
30691return remove ();
30692  ;
30693  return 0;
30694}
30695_ACEOF
30696if ac_fn_cxx_try_link "$LINENO"; then :
30697  ac_cv_lib_posix_remove=yes
30698else
30699  ac_cv_lib_posix_remove=no
30700fi
30701rm -f core conftest.err conftest.$ac_objext \
30702    conftest$ac_exeext conftest.$ac_ext
30703LIBS=$ac_check_lib_save_LIBS
30704fi
30705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30706$as_echo "$ac_cv_lib_posix_remove" >&6; }
30707if test "x$ac_cv_lib_posix_remove" = xyes; then :
30708  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30709fi
30710
30711    fi
30712
30713    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30714    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30715if test "x$ac_cv_func_shmat" = xyes; then :
30716
30717fi
30718
30719    if test $ac_cv_func_shmat = no; then
30720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30721$as_echo_n "checking for shmat in -lipc... " >&6; }
30722if ${ac_cv_lib_ipc_shmat+:} false; then :
30723  $as_echo_n "(cached) " >&6
30724else
30725  ac_check_lib_save_LIBS=$LIBS
30726LIBS="-lipc  $LIBS"
30727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30728/* end confdefs.h.  */
30729
30730/* Override any GCC internal prototype to avoid an error.
30731   Use char because int might match the return type of a GCC
30732   builtin and then its argument prototype would still apply.  */
30733#ifdef __cplusplus
30734extern "C"
30735#endif
30736char shmat ();
30737int
30738main ()
30739{
30740return shmat ();
30741  ;
30742  return 0;
30743}
30744_ACEOF
30745if ac_fn_cxx_try_link "$LINENO"; then :
30746  ac_cv_lib_ipc_shmat=yes
30747else
30748  ac_cv_lib_ipc_shmat=no
30749fi
30750rm -f core conftest.err conftest.$ac_objext \
30751    conftest$ac_exeext conftest.$ac_ext
30752LIBS=$ac_check_lib_save_LIBS
30753fi
30754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30755$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30756if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30757  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30758fi
30759
30760    fi
30761  fi
30762
30763  # Check for libraries that X11R6 Xt/Xaw programs need.
30764  ac_save_LDFLAGS=$LDFLAGS
30765  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30766  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30767  # check for ICE first), but we must link in the order -lSM -lICE or
30768  # we get undefined symbols.  So assume we have SM if we have ICE.
30769  # These have to be linked with before -lX11, unlike the other
30770  # libraries we check for below, so use a different variable.
30771  # John Interrante, Karl Berry
30772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30773$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30774if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30775  $as_echo_n "(cached) " >&6
30776else
30777  ac_check_lib_save_LIBS=$LIBS
30778LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30780/* end confdefs.h.  */
30781
30782/* Override any GCC internal prototype to avoid an error.
30783   Use char because int might match the return type of a GCC
30784   builtin and then its argument prototype would still apply.  */
30785#ifdef __cplusplus
30786extern "C"
30787#endif
30788char IceConnectionNumber ();
30789int
30790main ()
30791{
30792return IceConnectionNumber ();
30793  ;
30794  return 0;
30795}
30796_ACEOF
30797if ac_fn_cxx_try_link "$LINENO"; then :
30798  ac_cv_lib_ICE_IceConnectionNumber=yes
30799else
30800  ac_cv_lib_ICE_IceConnectionNumber=no
30801fi
30802rm -f core conftest.err conftest.$ac_objext \
30803    conftest$ac_exeext conftest.$ac_ext
30804LIBS=$ac_check_lib_save_LIBS
30805fi
30806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30807$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30808if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30809  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30810fi
30811
30812  LDFLAGS=$ac_save_LDFLAGS
30813
30814fi
30815
30816
30817  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30818  # this doesn't make sense so we remove it.
30819  if test "x$COMPILE_TYPE" = xcross; then
30820    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30821  fi
30822
30823  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30824
30825  # Print a helpful message on how to acquire the necessary build dependency.
30826  # x11 is the help tag: freetype, cups, pulse, alsa etc
30827  MISSING_DEPENDENCY=x11
30828
30829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30830    cygwin_help $MISSING_DEPENDENCY
30831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30832    msys_help $MISSING_DEPENDENCY
30833  else
30834    PKGHANDLER_COMMAND=
30835
30836    case $PKGHANDLER in
30837      apt-get)
30838        apt_help     $MISSING_DEPENDENCY ;;
30839      yum)
30840        yum_help     $MISSING_DEPENDENCY ;;
30841      port)
30842        port_help    $MISSING_DEPENDENCY ;;
30843      pkgutil)
30844        pkgutil_help $MISSING_DEPENDENCY ;;
30845      pkgadd)
30846        pkgadd_help  $MISSING_DEPENDENCY ;;
30847      * )
30848        break ;;
30849    esac
30850
30851    if test "x$PKGHANDLER_COMMAND" != x; then
30852      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30853    fi
30854  fi
30855
30856    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30857  fi
30858
30859  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30860    OPENWIN_HOME="/usr/openwin"
30861  fi
30862
30863
30864
30865  #
30866  # Weird Sol10 something check...TODO change to try compile
30867  #
30868  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30869    if test "`uname -r`" = "5.10"; then
30870      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30871        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30872      fi
30873    fi
30874  fi
30875
30876  ac_ext=c
30877ac_cpp='$CPP $CPPFLAGS'
30878ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30879ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30880ac_compiler_gnu=$ac_cv_c_compiler_gnu
30881
30882  OLD_CFLAGS="$CFLAGS"
30883  CFLAGS="$CFLAGS $X_CFLAGS"
30884
30885  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30886  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30887do :
30888  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30889ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30890        # include <X11/Xlib.h>
30891        # include <X11/Xutil.h>
30892
30893
30894"
30895if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30896  cat >>confdefs.h <<_ACEOF
30897#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30898_ACEOF
30899 X11_A_OK=yes
30900else
30901  X11_A_OK=no; break
30902fi
30903
30904done
30905
30906
30907  CFLAGS="$OLD_CFLAGS"
30908  ac_ext=cpp
30909ac_cpp='$CXXCPP $CPPFLAGS'
30910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30913
30914
30915  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30916
30917  # Print a helpful message on how to acquire the necessary build dependency.
30918  # x11 is the help tag: freetype, cups, pulse, alsa etc
30919  MISSING_DEPENDENCY=x11
30920
30921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30922    cygwin_help $MISSING_DEPENDENCY
30923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30924    msys_help $MISSING_DEPENDENCY
30925  else
30926    PKGHANDLER_COMMAND=
30927
30928    case $PKGHANDLER in
30929      apt-get)
30930        apt_help     $MISSING_DEPENDENCY ;;
30931      yum)
30932        yum_help     $MISSING_DEPENDENCY ;;
30933      port)
30934        port_help    $MISSING_DEPENDENCY ;;
30935      pkgutil)
30936        pkgutil_help $MISSING_DEPENDENCY ;;
30937      pkgadd)
30938        pkgadd_help  $MISSING_DEPENDENCY ;;
30939      * )
30940        break ;;
30941    esac
30942
30943    if test "x$PKGHANDLER_COMMAND" != x; then
30944      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30945    fi
30946  fi
30947
30948    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30949  fi
30950
30951
30952
30953
30954
30955
30956  ###############################################################################
30957  #
30958  # The common unix printing system cups is used to print from java.
30959  #
30960
30961# Check whether --with-cups was given.
30962if test "${with_cups+set}" = set; then :
30963  withval=$with_cups;
30964fi
30965
30966
30967# Check whether --with-cups-include was given.
30968if test "${with_cups_include+set}" = set; then :
30969  withval=$with_cups_include;
30970fi
30971
30972
30973  if test "x$CUPS_NOT_NEEDED" = xyes; then
30974    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30975      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30976$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30977    fi
30978    CUPS_CFLAGS=
30979  else
30980    CUPS_FOUND=no
30981
30982    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30983      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30984    fi
30985
30986    if test "x${with_cups}" != x; then
30987      CUPS_CFLAGS="-I${with_cups}/include"
30988      CUPS_FOUND=yes
30989    fi
30990    if test "x${with_cups_include}" != x; then
30991      CUPS_CFLAGS="-I${with_cups_include}"
30992      CUPS_FOUND=yes
30993    fi
30994    if test "x$CUPS_FOUND" = xno; then
30995
30996
30997  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30998    # Source the builddeps file again, to make sure it uses the latest variables!
30999    . $builddepsfile
31000    # Look for a target and build machine specific resource!
31001    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31002    if test "x$resource" = x; then
31003      # Ok, lets instead look for a target specific resource
31004      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31005    fi
31006    if test "x$resource" = x; then
31007      # Ok, lets instead look for a build specific resource
31008      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31009    fi
31010    if test "x$resource" = x; then
31011      # Ok, lets instead look for a generic resource
31012      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31013      resource=${builddep_cups}
31014    fi
31015    if test "x$resource" != x; then
31016      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31017$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31018      # If the resource in the builddeps.conf file is an existing directory,
31019      # for example /java/linux/cups
31020      if test -d ${resource}; then
31021        depdir=${resource}
31022      else
31023
31024  # cups is for example mymodule
31025  # $resource is for example libs/general/libmymod_1_2_3.zip
31026  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31027  # $with_builddeps_dir is for example /localhome/builddeps
31028  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31029  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31030  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31031  filename=`basename $resource`
31032  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31033  filebase=${filename%%.*}
31034  extension=${filename#*.}
31035  installdir=$with_builddeps_dir/$filebase
31036  if test ! -f $installdir/$filename.unpacked; then
31037    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31038$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31039    if test ! -d $installdir; then
31040      mkdir -p $installdir
31041    fi
31042    if test ! -d $installdir; then
31043      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31044    fi
31045    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31046    touch $tmpfile
31047    if test ! -f $tmpfile; then
31048      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31049    fi
31050
31051  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31052  # $tmpfile is the local file name for the downloaded file.
31053  VALID_TOOL=no
31054  if test "x$BDEPS_FTP" = xwget; then
31055    VALID_TOOL=yes
31056    wget -O $tmpfile $with_builddeps_server/$resource
31057  fi
31058  if test "x$BDEPS_FTP" = xlftp; then
31059    VALID_TOOL=yes
31060    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31061  fi
31062  if test "x$BDEPS_FTP" = xftp; then
31063    VALID_TOOL=yes
31064    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31065    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31066    FTPUSERPWD=${FTPSERVER%%@*}
31067    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31068      FTPUSER=${userpwd%%:*}
31069      FTPPWD=${userpwd#*@}
31070      FTPSERVER=${FTPSERVER#*@}
31071    else
31072      FTPUSER=ftp
31073      FTPPWD=ftp
31074    fi
31075    # the "pass" command does not work on some
31076    # ftp clients (read ftp.exe) but if it works,
31077    # passive mode is better!
31078    ( \
31079        echo "user $FTPUSER $FTPPWD"        ; \
31080        echo "pass"                         ; \
31081        echo "bin"                          ; \
31082        echo "get $FTPPATH $tmpfile"              ; \
31083    ) | ftp -in $FTPSERVER
31084  fi
31085  if test "x$VALID_TOOL" != xyes; then
31086    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31087  fi
31088
31089    mv $tmpfile $installdir/$filename
31090    if test ! -s $installdir/$filename; then
31091      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31092    fi
31093    case "$extension" in
31094      zip)  echo "Unzipping $installdir/$filename..."
31095        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31096        ;;
31097      tar.gz) echo "Untaring $installdir/$filename..."
31098        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31099        ;;
31100      tgz) echo "Untaring $installdir/$filename..."
31101        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31102        ;;
31103      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31104        ;;
31105    esac
31106  fi
31107  if test -f $installdir/$filename.unpacked; then
31108    depdir=$installdir
31109  fi
31110
31111      fi
31112      # Source the builddeps file again, because in the previous command, the depdir
31113      # was updated to point at the current build dependency install directory.
31114      . $builddepsfile
31115      # Now extract variables from the builddeps.conf files.
31116      theroot=${builddep_cups_ROOT}
31117      thecflags=${builddep_cups_CFLAGS}
31118      thelibs=${builddep_cups_LIBS}
31119      if test "x$depdir" = x; then
31120        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31121      fi
31122      CUPS=$depdir
31123      if test "x$theroot" != x; then
31124        CUPS="$theroot"
31125      fi
31126      if test "x$thecflags" != x; then
31127        CUPS_CFLAGS="$thecflags"
31128      fi
31129      if test "x$thelibs" != x; then
31130        CUPS_LIBS="$thelibs"
31131      fi
31132      CUPS_FOUND=yes
31133
31134    fi
31135
31136  fi
31137
31138    fi
31139    if test "x$CUPS_FOUND" = xno; then
31140      # Are the cups headers installed in the default /usr/include location?
31141      for ac_header in cups/cups.h cups/ppd.h
31142do :
31143  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31144ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31145if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31146  cat >>confdefs.h <<_ACEOF
31147#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31148_ACEOF
31149
31150            CUPS_FOUND=yes
31151            CUPS_CFLAGS=
31152            DEFAULT_CUPS=yes
31153
31154
31155fi
31156
31157done
31158
31159    fi
31160    if test "x$CUPS_FOUND" = xno; then
31161      # Getting nervous now? Lets poke around for standard Solaris third-party
31162      # package installation locations.
31163      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31164$as_echo_n "checking for cups headers... " >&6; }
31165      if test -s /opt/sfw/cups/include/cups/cups.h; then
31166        # An SFW package seems to be installed!
31167        CUPS_FOUND=yes
31168        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31169      elif test -s /opt/csw/include/cups/cups.h; then
31170        # A CSW package seems to be installed!
31171        CUPS_FOUND=yes
31172        CUPS_CFLAGS="-I/opt/csw/include"
31173      fi
31174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31175$as_echo "$CUPS_FOUND" >&6; }
31176    fi
31177    if test "x$CUPS_FOUND" = xno; then
31178
31179  # Print a helpful message on how to acquire the necessary build dependency.
31180  # cups is the help tag: freetype, cups, pulse, alsa etc
31181  MISSING_DEPENDENCY=cups
31182
31183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31184    cygwin_help $MISSING_DEPENDENCY
31185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31186    msys_help $MISSING_DEPENDENCY
31187  else
31188    PKGHANDLER_COMMAND=
31189
31190    case $PKGHANDLER in
31191      apt-get)
31192        apt_help     $MISSING_DEPENDENCY ;;
31193      yum)
31194        yum_help     $MISSING_DEPENDENCY ;;
31195      port)
31196        port_help    $MISSING_DEPENDENCY ;;
31197      pkgutil)
31198        pkgutil_help $MISSING_DEPENDENCY ;;
31199      pkgadd)
31200        pkgadd_help  $MISSING_DEPENDENCY ;;
31201      * )
31202        break ;;
31203    esac
31204
31205    if test "x$PKGHANDLER_COMMAND" != x; then
31206      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31207    fi
31208  fi
31209
31210      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31211    fi
31212  fi
31213
31214
31215
31216
31217
31218
31219  ###############################################################################
31220  #
31221  # The ubiquitous freetype library is used to render fonts.
31222  #
31223
31224# Check whether --with-freetype was given.
31225if test "${with_freetype+set}" = set; then :
31226  withval=$with_freetype;
31227fi
31228
31229
31230# Check whether --with-freetype-include was given.
31231if test "${with_freetype_include+set}" = set; then :
31232  withval=$with_freetype_include;
31233fi
31234
31235
31236# Check whether --with-freetype-lib was given.
31237if test "${with_freetype_lib+set}" = set; then :
31238  withval=$with_freetype_lib;
31239fi
31240
31241  # Check whether --enable-freetype-bundling was given.
31242if test "${enable_freetype_bundling+set}" = set; then :
31243  enableval=$enable_freetype_bundling;
31244fi
31245
31246
31247  FREETYPE_CFLAGS=
31248  FREETYPE_LIBS=
31249  FREETYPE_BUNDLE_LIB_PATH=
31250
31251  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31252    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31253      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31254$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31255    fi
31256    if test "x$enable_freetype_bundling" != x; then
31257      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31258$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31259    fi
31260  else
31261    # freetype is needed to build; go get it!
31262
31263    BUNDLE_FREETYPE="$enable_freetype_bundling"
31264
31265    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31266      # User has specified settings
31267
31268      if test "x$BUNDLE_FREETYPE" = x; then
31269        # If not specified, default is to bundle freetype
31270        BUNDLE_FREETYPE=yes
31271      fi
31272
31273      if test "x$with_freetype" != x; then
31274        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31275        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31276      fi
31277
31278      # Allow --with-freetype-lib and --with-freetype-include to override
31279      if test "x$with_freetype_include" != x; then
31280        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31281      fi
31282      if test "x$with_freetype_lib" != x; then
31283        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31284      fi
31285
31286      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31287        # Okay, we got it. Check that it works.
31288
31289  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31290  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31291  METHOD="--with-freetype"
31292
31293  # First check if the files exists.
31294  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31295    # We found an arbitrary include file. That's a good sign.
31296    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31297$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31298    FOUND_FREETYPE=yes
31299
31300    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31301    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31302      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31303$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31304      FOUND_FREETYPE=no
31305    else
31306      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31307        # On Windows, we will need both .lib and .dll file.
31308        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31309          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31310$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31311          FOUND_FREETYPE=no
31312        fi
31313      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
31314        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31315        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31316      fi
31317    fi
31318  fi
31319
31320  if test "x$FOUND_FREETYPE" = xyes; then
31321
31322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31323
31324  # Input might be given as Windows format, start by converting to
31325  # unix format.
31326  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31327  new_path=`$CYGPATH -u "$path"`
31328
31329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31332  # "foo.exe" is OK but "foo" is an error.
31333  #
31334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31335  # It is also a way to make sure we got the proper file name for the real test later on.
31336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31337  if test "x$test_shortpath" = x; then
31338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31339$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31340    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31341  fi
31342
31343  # Call helper function which possibly converts this using DOS-style short mode.
31344  # If so, the updated path is stored in $new_path.
31345
31346  input_path="$new_path"
31347  # Check if we need to convert this using DOS-style short mode. If the path
31348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31349  # take no chances and rewrite it.
31350  # Note: m4 eats our [], so we need to use [ and ] instead.
31351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31352  if test "x$has_forbidden_chars" != x; then
31353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31357      # Going to short mode and back again did indeed matter. Since short mode is
31358      # case insensitive, let's make it lowercase to improve readability.
31359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31360      # Now convert it back to Unix-stile (cygpath)
31361      input_path=`$CYGPATH -u "$shortmode_path"`
31362      new_path="$input_path"
31363    fi
31364  fi
31365
31366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31367  if test "x$test_cygdrive_prefix" = x; then
31368    # As a simple fix, exclude /usr/bin since it's not a real path.
31369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31371      # a path prefixed by /cygdrive for fixpath to work.
31372      new_path="$CYGWIN_ROOT_PATH$input_path"
31373    fi
31374  fi
31375
31376
31377  if test "x$path" != "x$new_path"; then
31378    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31380$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31381  fi
31382
31383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31384
31385  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31386  has_colon=`$ECHO $path | $GREP ^.:`
31387  new_path="$path"
31388  if test "x$has_colon" = x; then
31389    # Not in mixed or Windows style, start by that.
31390    new_path=`cmd //c echo $path`
31391  fi
31392
31393
31394  input_path="$new_path"
31395  # Check if we need to convert this using DOS-style short mode. If the path
31396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31397  # take no chances and rewrite it.
31398  # Note: m4 eats our [], so we need to use [ and ] instead.
31399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31400  if test "x$has_forbidden_chars" != x; then
31401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31403  fi
31404
31405
31406  windows_path="$new_path"
31407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31408    unix_path=`$CYGPATH -u "$windows_path"`
31409    new_path="$unix_path"
31410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31412    new_path="$unix_path"
31413  fi
31414
31415  if test "x$path" != "x$new_path"; then
31416    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31418$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31419  fi
31420
31421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31423
31424  else
31425    # We're on a posix platform. Hooray! :)
31426    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31427    has_space=`$ECHO "$path" | $GREP " "`
31428    if test "x$has_space" != x; then
31429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31430$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31431      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31432    fi
31433
31434    # Use eval to expand a potential ~
31435    eval path="$path"
31436    if test ! -f "$path" && test ! -d "$path"; then
31437      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31438    fi
31439
31440    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31441  fi
31442
31443
31444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31445
31446  # Input might be given as Windows format, start by converting to
31447  # unix format.
31448  path="$POTENTIAL_FREETYPE_LIB_PATH"
31449  new_path=`$CYGPATH -u "$path"`
31450
31451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31454  # "foo.exe" is OK but "foo" is an error.
31455  #
31456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31457  # It is also a way to make sure we got the proper file name for the real test later on.
31458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31459  if test "x$test_shortpath" = x; then
31460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31462    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31463  fi
31464
31465  # Call helper function which possibly converts this using DOS-style short mode.
31466  # If so, the updated path is stored in $new_path.
31467
31468  input_path="$new_path"
31469  # Check if we need to convert this using DOS-style short mode. If the path
31470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31471  # take no chances and rewrite it.
31472  # Note: m4 eats our [], so we need to use [ and ] instead.
31473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31474  if test "x$has_forbidden_chars" != x; then
31475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31479      # Going to short mode and back again did indeed matter. Since short mode is
31480      # case insensitive, let's make it lowercase to improve readability.
31481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31482      # Now convert it back to Unix-stile (cygpath)
31483      input_path=`$CYGPATH -u "$shortmode_path"`
31484      new_path="$input_path"
31485    fi
31486  fi
31487
31488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31489  if test "x$test_cygdrive_prefix" = x; then
31490    # As a simple fix, exclude /usr/bin since it's not a real path.
31491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31493      # a path prefixed by /cygdrive for fixpath to work.
31494      new_path="$CYGWIN_ROOT_PATH$input_path"
31495    fi
31496  fi
31497
31498
31499  if test "x$path" != "x$new_path"; then
31500    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31503  fi
31504
31505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31506
31507  path="$POTENTIAL_FREETYPE_LIB_PATH"
31508  has_colon=`$ECHO $path | $GREP ^.:`
31509  new_path="$path"
31510  if test "x$has_colon" = x; then
31511    # Not in mixed or Windows style, start by that.
31512    new_path=`cmd //c echo $path`
31513  fi
31514
31515
31516  input_path="$new_path"
31517  # Check if we need to convert this using DOS-style short mode. If the path
31518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31519  # take no chances and rewrite it.
31520  # Note: m4 eats our [], so we need to use [ and ] instead.
31521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31522  if test "x$has_forbidden_chars" != x; then
31523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31525  fi
31526
31527
31528  windows_path="$new_path"
31529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31530    unix_path=`$CYGPATH -u "$windows_path"`
31531    new_path="$unix_path"
31532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31534    new_path="$unix_path"
31535  fi
31536
31537  if test "x$path" != "x$new_path"; then
31538    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31541  fi
31542
31543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31545
31546  else
31547    # We're on a posix platform. Hooray! :)
31548    path="$POTENTIAL_FREETYPE_LIB_PATH"
31549    has_space=`$ECHO "$path" | $GREP " "`
31550    if test "x$has_space" != x; then
31551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31553      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31554    fi
31555
31556    # Use eval to expand a potential ~
31557    eval path="$path"
31558    if test ! -f "$path" && test ! -d "$path"; then
31559      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31560    fi
31561
31562    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31563  fi
31564
31565
31566    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31568$as_echo_n "checking for freetype includes... " >&6; }
31569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31570$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31571    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31573$as_echo_n "checking for freetype libraries... " >&6; }
31574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31575$as_echo "$FREETYPE_LIB_PATH" >&6; }
31576  fi
31577
31578        if test "x$FOUND_FREETYPE" != xyes; then
31579          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31580        fi
31581      else
31582        # User specified only one of lib or include. This is an error.
31583        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31584          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31585$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31586          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31587        else
31588          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31589$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31590          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31591        fi
31592      fi
31593    else
31594      # User did not specify settings, but we need freetype. Try to locate it.
31595
31596      if test "x$BUNDLE_FREETYPE" = x; then
31597        # If not specified, default is to bundle freetype only on windows
31598        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31599          BUNDLE_FREETYPE=yes
31600        else
31601          BUNDLE_FREETYPE=no
31602        fi
31603      fi
31604
31605      if test "x$FOUND_FREETYPE" != xyes; then
31606        # Check builddeps
31607
31608
31609  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31610    # Source the builddeps file again, to make sure it uses the latest variables!
31611    . $builddepsfile
31612    # Look for a target and build machine specific resource!
31613    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31614    if test "x$resource" = x; then
31615      # Ok, lets instead look for a target specific resource
31616      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31617    fi
31618    if test "x$resource" = x; then
31619      # Ok, lets instead look for a build specific resource
31620      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31621    fi
31622    if test "x$resource" = x; then
31623      # Ok, lets instead look for a generic resource
31624      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31625      resource=${builddep_freetype2}
31626    fi
31627    if test "x$resource" != x; then
31628      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31629$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31630      # If the resource in the builddeps.conf file is an existing directory,
31631      # for example /java/linux/cups
31632      if test -d ${resource}; then
31633        depdir=${resource}
31634      else
31635
31636  # freetype2 is for example mymodule
31637  # $resource is for example libs/general/libmymod_1_2_3.zip
31638  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31639  # $with_builddeps_dir is for example /localhome/builddeps
31640  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31641  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31642  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31643  filename=`basename $resource`
31644  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31645  filebase=${filename%%.*}
31646  extension=${filename#*.}
31647  installdir=$with_builddeps_dir/$filebase
31648  if test ! -f $installdir/$filename.unpacked; then
31649    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31650$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31651    if test ! -d $installdir; then
31652      mkdir -p $installdir
31653    fi
31654    if test ! -d $installdir; then
31655      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31656    fi
31657    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31658    touch $tmpfile
31659    if test ! -f $tmpfile; then
31660      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31661    fi
31662
31663  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31664  # $tmpfile is the local file name for the downloaded file.
31665  VALID_TOOL=no
31666  if test "x$BDEPS_FTP" = xwget; then
31667    VALID_TOOL=yes
31668    wget -O $tmpfile $with_builddeps_server/$resource
31669  fi
31670  if test "x$BDEPS_FTP" = xlftp; then
31671    VALID_TOOL=yes
31672    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31673  fi
31674  if test "x$BDEPS_FTP" = xftp; then
31675    VALID_TOOL=yes
31676    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31677    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31678    FTPUSERPWD=${FTPSERVER%%@*}
31679    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31680      FTPUSER=${userpwd%%:*}
31681      FTPPWD=${userpwd#*@}
31682      FTPSERVER=${FTPSERVER#*@}
31683    else
31684      FTPUSER=ftp
31685      FTPPWD=ftp
31686    fi
31687    # the "pass" command does not work on some
31688    # ftp clients (read ftp.exe) but if it works,
31689    # passive mode is better!
31690    ( \
31691        echo "user $FTPUSER $FTPPWD"        ; \
31692        echo "pass"                         ; \
31693        echo "bin"                          ; \
31694        echo "get $FTPPATH $tmpfile"              ; \
31695    ) | ftp -in $FTPSERVER
31696  fi
31697  if test "x$VALID_TOOL" != xyes; then
31698    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31699  fi
31700
31701    mv $tmpfile $installdir/$filename
31702    if test ! -s $installdir/$filename; then
31703      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31704    fi
31705    case "$extension" in
31706      zip)  echo "Unzipping $installdir/$filename..."
31707        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31708        ;;
31709      tar.gz) echo "Untaring $installdir/$filename..."
31710        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31711        ;;
31712      tgz) echo "Untaring $installdir/$filename..."
31713        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31714        ;;
31715      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31716        ;;
31717    esac
31718  fi
31719  if test -f $installdir/$filename.unpacked; then
31720    depdir=$installdir
31721  fi
31722
31723      fi
31724      # Source the builddeps file again, because in the previous command, the depdir
31725      # was updated to point at the current build dependency install directory.
31726      . $builddepsfile
31727      # Now extract variables from the builddeps.conf files.
31728      theroot=${builddep_freetype2_ROOT}
31729      thecflags=${builddep_freetype2_CFLAGS}
31730      thelibs=${builddep_freetype2_LIBS}
31731      if test "x$depdir" = x; then
31732        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31733      fi
31734      FREETYPE=$depdir
31735      if test "x$theroot" != x; then
31736        FREETYPE="$theroot"
31737      fi
31738      if test "x$thecflags" != x; then
31739        FREETYPE_CFLAGS="$thecflags"
31740      fi
31741      if test "x$thelibs" != x; then
31742        FREETYPE_LIBS="$thelibs"
31743      fi
31744      FOUND_FREETYPE=yes
31745      else FOUND_FREETYPE=no
31746
31747    fi
31748    else FOUND_FREETYPE=no
31749
31750  fi
31751
31752        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31753        if test "x$FOUND_FREETYPE" = xyes; then
31754          if test "x$BUNDLE_FREETYPE" = xyes; then
31755            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31756$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31757            FOUND_FREETYPE=no
31758          else
31759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31760$as_echo_n "checking for freetype... " >&6; }
31761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31762$as_echo "yes (using builddeps)" >&6; }
31763          fi
31764        fi
31765      fi
31766
31767      if test "x$FOUND_FREETYPE" != xyes; then
31768        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31769        if test "x$PKG_CONFIG" != x; then
31770
31771pkg_failed=no
31772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31773$as_echo_n "checking for FREETYPE... " >&6; }
31774
31775if test -n "$FREETYPE_CFLAGS"; then
31776    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31777 elif test -n "$PKG_CONFIG"; then
31778    if test -n "$PKG_CONFIG" && \
31779    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31780  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31781  ac_status=$?
31782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31783  test $ac_status = 0; }; then
31784  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31785else
31786  pkg_failed=yes
31787fi
31788 else
31789    pkg_failed=untried
31790fi
31791if test -n "$FREETYPE_LIBS"; then
31792    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31793 elif test -n "$PKG_CONFIG"; then
31794    if test -n "$PKG_CONFIG" && \
31795    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31796  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31797  ac_status=$?
31798  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31799  test $ac_status = 0; }; then
31800  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31801else
31802  pkg_failed=yes
31803fi
31804 else
31805    pkg_failed=untried
31806fi
31807
31808
31809
31810if test $pkg_failed = yes; then
31811
31812if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31813        _pkg_short_errors_supported=yes
31814else
31815        _pkg_short_errors_supported=no
31816fi
31817        if test $_pkg_short_errors_supported = yes; then
31818	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31819        else
31820	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31821        fi
31822	# Put the nasty error message in config.log where it belongs
31823	echo "$FREETYPE_PKG_ERRORS" >&5
31824
31825	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31826$as_echo "no" >&6; }
31827                FOUND_FREETYPE=no
31828elif test $pkg_failed = untried; then
31829	FOUND_FREETYPE=no
31830else
31831	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31832	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31834$as_echo "yes" >&6; }
31835	FOUND_FREETYPE=yes
31836fi
31837          if test "x$FOUND_FREETYPE" = xyes; then
31838            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31839            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31840            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31841            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31842              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31843            fi
31844            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31845            if test "x$BUNDLE_FREETYPE" = xyes; then
31846              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31847$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31848              FOUND_FREETYPE=no
31849            else
31850              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31851$as_echo_n "checking for freetype... " >&6; }
31852              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31853$as_echo "yes (using pkg-config)" >&6; }
31854            fi
31855          fi
31856        fi
31857      fi
31858
31859      if test "x$FOUND_FREETYPE" != xyes; then
31860        # Check in well-known locations
31861        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31862          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
31863
31864  windows_path="$FREETYPE_BASE_DIR"
31865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31866    unix_path=`$CYGPATH -u "$windows_path"`
31867    FREETYPE_BASE_DIR="$unix_path"
31868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31870    FREETYPE_BASE_DIR="$unix_path"
31871  fi
31872
31873
31874  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
31875  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
31876  METHOD="well-known location"
31877
31878  # First check if the files exists.
31879  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31880    # We found an arbitrary include file. That's a good sign.
31881    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31882$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31883    FOUND_FREETYPE=yes
31884
31885    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31886    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31888$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31889      FOUND_FREETYPE=no
31890    else
31891      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31892        # On Windows, we will need both .lib and .dll file.
31893        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31894          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31895$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31896          FOUND_FREETYPE=no
31897        fi
31898      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
31899        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31900        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31901      fi
31902    fi
31903  fi
31904
31905  if test "x$FOUND_FREETYPE" = xyes; then
31906
31907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31908
31909  # Input might be given as Windows format, start by converting to
31910  # unix format.
31911  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31912  new_path=`$CYGPATH -u "$path"`
31913
31914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31917  # "foo.exe" is OK but "foo" is an error.
31918  #
31919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31920  # It is also a way to make sure we got the proper file name for the real test later on.
31921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31922  if test "x$test_shortpath" = x; then
31923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31925    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31926  fi
31927
31928  # Call helper function which possibly converts this using DOS-style short mode.
31929  # If so, the updated path is stored in $new_path.
31930
31931  input_path="$new_path"
31932  # Check if we need to convert this using DOS-style short mode. If the path
31933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31934  # take no chances and rewrite it.
31935  # Note: m4 eats our [], so we need to use [ and ] instead.
31936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31937  if test "x$has_forbidden_chars" != x; then
31938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31942      # Going to short mode and back again did indeed matter. Since short mode is
31943      # case insensitive, let's make it lowercase to improve readability.
31944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31945      # Now convert it back to Unix-stile (cygpath)
31946      input_path=`$CYGPATH -u "$shortmode_path"`
31947      new_path="$input_path"
31948    fi
31949  fi
31950
31951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31952  if test "x$test_cygdrive_prefix" = x; then
31953    # As a simple fix, exclude /usr/bin since it's not a real path.
31954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31956      # a path prefixed by /cygdrive for fixpath to work.
31957      new_path="$CYGWIN_ROOT_PATH$input_path"
31958    fi
31959  fi
31960
31961
31962  if test "x$path" != "x$new_path"; then
31963    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31966  fi
31967
31968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31969
31970  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31971  has_colon=`$ECHO $path | $GREP ^.:`
31972  new_path="$path"
31973  if test "x$has_colon" = x; then
31974    # Not in mixed or Windows style, start by that.
31975    new_path=`cmd //c echo $path`
31976  fi
31977
31978
31979  input_path="$new_path"
31980  # Check if we need to convert this using DOS-style short mode. If the path
31981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31982  # take no chances and rewrite it.
31983  # Note: m4 eats our [], so we need to use [ and ] instead.
31984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31985  if test "x$has_forbidden_chars" != x; then
31986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31988  fi
31989
31990
31991  windows_path="$new_path"
31992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993    unix_path=`$CYGPATH -u "$windows_path"`
31994    new_path="$unix_path"
31995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997    new_path="$unix_path"
31998  fi
31999
32000  if test "x$path" != "x$new_path"; then
32001    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32003$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32004  fi
32005
32006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32008
32009  else
32010    # We're on a posix platform. Hooray! :)
32011    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32012    has_space=`$ECHO "$path" | $GREP " "`
32013    if test "x$has_space" != x; then
32014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32016      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32017    fi
32018
32019    # Use eval to expand a potential ~
32020    eval path="$path"
32021    if test ! -f "$path" && test ! -d "$path"; then
32022      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32023    fi
32024
32025    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32026  fi
32027
32028
32029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32030
32031  # Input might be given as Windows format, start by converting to
32032  # unix format.
32033  path="$POTENTIAL_FREETYPE_LIB_PATH"
32034  new_path=`$CYGPATH -u "$path"`
32035
32036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32039  # "foo.exe" is OK but "foo" is an error.
32040  #
32041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32042  # It is also a way to make sure we got the proper file name for the real test later on.
32043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32044  if test "x$test_shortpath" = x; then
32045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32047    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32048  fi
32049
32050  # Call helper function which possibly converts this using DOS-style short mode.
32051  # If so, the updated path is stored in $new_path.
32052
32053  input_path="$new_path"
32054  # Check if we need to convert this using DOS-style short mode. If the path
32055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32056  # take no chances and rewrite it.
32057  # Note: m4 eats our [], so we need to use [ and ] instead.
32058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32059  if test "x$has_forbidden_chars" != x; then
32060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32064      # Going to short mode and back again did indeed matter. Since short mode is
32065      # case insensitive, let's make it lowercase to improve readability.
32066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32067      # Now convert it back to Unix-stile (cygpath)
32068      input_path=`$CYGPATH -u "$shortmode_path"`
32069      new_path="$input_path"
32070    fi
32071  fi
32072
32073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32074  if test "x$test_cygdrive_prefix" = x; then
32075    # As a simple fix, exclude /usr/bin since it's not a real path.
32076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32078      # a path prefixed by /cygdrive for fixpath to work.
32079      new_path="$CYGWIN_ROOT_PATH$input_path"
32080    fi
32081  fi
32082
32083
32084  if test "x$path" != "x$new_path"; then
32085    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32088  fi
32089
32090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32091
32092  path="$POTENTIAL_FREETYPE_LIB_PATH"
32093  has_colon=`$ECHO $path | $GREP ^.:`
32094  new_path="$path"
32095  if test "x$has_colon" = x; then
32096    # Not in mixed or Windows style, start by that.
32097    new_path=`cmd //c echo $path`
32098  fi
32099
32100
32101  input_path="$new_path"
32102  # Check if we need to convert this using DOS-style short mode. If the path
32103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32104  # take no chances and rewrite it.
32105  # Note: m4 eats our [], so we need to use [ and ] instead.
32106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32107  if test "x$has_forbidden_chars" != x; then
32108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32110  fi
32111
32112
32113  windows_path="$new_path"
32114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32115    unix_path=`$CYGPATH -u "$windows_path"`
32116    new_path="$unix_path"
32117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32119    new_path="$unix_path"
32120  fi
32121
32122  if test "x$path" != "x$new_path"; then
32123    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32126  fi
32127
32128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32130
32131  else
32132    # We're on a posix platform. Hooray! :)
32133    path="$POTENTIAL_FREETYPE_LIB_PATH"
32134    has_space=`$ECHO "$path" | $GREP " "`
32135    if test "x$has_space" != x; then
32136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32139    fi
32140
32141    # Use eval to expand a potential ~
32142    eval path="$path"
32143    if test ! -f "$path" && test ! -d "$path"; then
32144      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32145    fi
32146
32147    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32148  fi
32149
32150
32151    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32153$as_echo_n "checking for freetype includes... " >&6; }
32154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32155$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32156    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32158$as_echo_n "checking for freetype libraries... " >&6; }
32159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32160$as_echo "$FREETYPE_LIB_PATH" >&6; }
32161  fi
32162
32163          if test "x$FOUND_FREETYPE" != xyes; then
32164            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32165
32166  windows_path="$FREETYPE_BASE_DIR"
32167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32168    unix_path=`$CYGPATH -u "$windows_path"`
32169    FREETYPE_BASE_DIR="$unix_path"
32170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32172    FREETYPE_BASE_DIR="$unix_path"
32173  fi
32174
32175
32176  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32177  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32178  METHOD="well-known location"
32179
32180  # First check if the files exists.
32181  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32182    # We found an arbitrary include file. That's a good sign.
32183    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32184$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32185    FOUND_FREETYPE=yes
32186
32187    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32188    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32189      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32190$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32191      FOUND_FREETYPE=no
32192    else
32193      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32194        # On Windows, we will need both .lib and .dll file.
32195        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32196          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32197$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32198          FOUND_FREETYPE=no
32199        fi
32200      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
32201        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32202        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32203      fi
32204    fi
32205  fi
32206
32207  if test "x$FOUND_FREETYPE" = xyes; then
32208
32209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32210
32211  # Input might be given as Windows format, start by converting to
32212  # unix format.
32213  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32214  new_path=`$CYGPATH -u "$path"`
32215
32216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32219  # "foo.exe" is OK but "foo" is an error.
32220  #
32221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32222  # It is also a way to make sure we got the proper file name for the real test later on.
32223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32224  if test "x$test_shortpath" = x; then
32225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32227    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32228  fi
32229
32230  # Call helper function which possibly converts this using DOS-style short mode.
32231  # If so, the updated path is stored in $new_path.
32232
32233  input_path="$new_path"
32234  # Check if we need to convert this using DOS-style short mode. If the path
32235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32236  # take no chances and rewrite it.
32237  # Note: m4 eats our [], so we need to use [ and ] instead.
32238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32239  if test "x$has_forbidden_chars" != x; then
32240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32244      # Going to short mode and back again did indeed matter. Since short mode is
32245      # case insensitive, let's make it lowercase to improve readability.
32246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32247      # Now convert it back to Unix-stile (cygpath)
32248      input_path=`$CYGPATH -u "$shortmode_path"`
32249      new_path="$input_path"
32250    fi
32251  fi
32252
32253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32254  if test "x$test_cygdrive_prefix" = x; then
32255    # As a simple fix, exclude /usr/bin since it's not a real path.
32256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32258      # a path prefixed by /cygdrive for fixpath to work.
32259      new_path="$CYGWIN_ROOT_PATH$input_path"
32260    fi
32261  fi
32262
32263
32264  if test "x$path" != "x$new_path"; then
32265    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32268  fi
32269
32270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32271
32272  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32273  has_colon=`$ECHO $path | $GREP ^.:`
32274  new_path="$path"
32275  if test "x$has_colon" = x; then
32276    # Not in mixed or Windows style, start by that.
32277    new_path=`cmd //c echo $path`
32278  fi
32279
32280
32281  input_path="$new_path"
32282  # Check if we need to convert this using DOS-style short mode. If the path
32283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32284  # take no chances and rewrite it.
32285  # Note: m4 eats our [], so we need to use [ and ] instead.
32286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32287  if test "x$has_forbidden_chars" != x; then
32288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32290  fi
32291
32292
32293  windows_path="$new_path"
32294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32295    unix_path=`$CYGPATH -u "$windows_path"`
32296    new_path="$unix_path"
32297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32299    new_path="$unix_path"
32300  fi
32301
32302  if test "x$path" != "x$new_path"; then
32303    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32306  fi
32307
32308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32310
32311  else
32312    # We're on a posix platform. Hooray! :)
32313    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32314    has_space=`$ECHO "$path" | $GREP " "`
32315    if test "x$has_space" != x; then
32316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32318      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32319    fi
32320
32321    # Use eval to expand a potential ~
32322    eval path="$path"
32323    if test ! -f "$path" && test ! -d "$path"; then
32324      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32325    fi
32326
32327    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32328  fi
32329
32330
32331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32332
32333  # Input might be given as Windows format, start by converting to
32334  # unix format.
32335  path="$POTENTIAL_FREETYPE_LIB_PATH"
32336  new_path=`$CYGPATH -u "$path"`
32337
32338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32341  # "foo.exe" is OK but "foo" is an error.
32342  #
32343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32344  # It is also a way to make sure we got the proper file name for the real test later on.
32345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32346  if test "x$test_shortpath" = x; then
32347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32348$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32349    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32350  fi
32351
32352  # Call helper function which possibly converts this using DOS-style short mode.
32353  # If so, the updated path is stored in $new_path.
32354
32355  input_path="$new_path"
32356  # Check if we need to convert this using DOS-style short mode. If the path
32357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32358  # take no chances and rewrite it.
32359  # Note: m4 eats our [], so we need to use [ and ] instead.
32360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32361  if test "x$has_forbidden_chars" != x; then
32362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32366      # Going to short mode and back again did indeed matter. Since short mode is
32367      # case insensitive, let's make it lowercase to improve readability.
32368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32369      # Now convert it back to Unix-stile (cygpath)
32370      input_path=`$CYGPATH -u "$shortmode_path"`
32371      new_path="$input_path"
32372    fi
32373  fi
32374
32375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32376  if test "x$test_cygdrive_prefix" = x; then
32377    # As a simple fix, exclude /usr/bin since it's not a real path.
32378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32380      # a path prefixed by /cygdrive for fixpath to work.
32381      new_path="$CYGWIN_ROOT_PATH$input_path"
32382    fi
32383  fi
32384
32385
32386  if test "x$path" != "x$new_path"; then
32387    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32390  fi
32391
32392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393
32394  path="$POTENTIAL_FREETYPE_LIB_PATH"
32395  has_colon=`$ECHO $path | $GREP ^.:`
32396  new_path="$path"
32397  if test "x$has_colon" = x; then
32398    # Not in mixed or Windows style, start by that.
32399    new_path=`cmd //c echo $path`
32400  fi
32401
32402
32403  input_path="$new_path"
32404  # Check if we need to convert this using DOS-style short mode. If the path
32405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32406  # take no chances and rewrite it.
32407  # Note: m4 eats our [], so we need to use [ and ] instead.
32408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32409  if test "x$has_forbidden_chars" != x; then
32410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32412  fi
32413
32414
32415  windows_path="$new_path"
32416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32417    unix_path=`$CYGPATH -u "$windows_path"`
32418    new_path="$unix_path"
32419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32421    new_path="$unix_path"
32422  fi
32423
32424  if test "x$path" != "x$new_path"; then
32425    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32428  fi
32429
32430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32432
32433  else
32434    # We're on a posix platform. Hooray! :)
32435    path="$POTENTIAL_FREETYPE_LIB_PATH"
32436    has_space=`$ECHO "$path" | $GREP " "`
32437    if test "x$has_space" != x; then
32438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32439$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32440      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32441    fi
32442
32443    # Use eval to expand a potential ~
32444    eval path="$path"
32445    if test ! -f "$path" && test ! -d "$path"; then
32446      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32447    fi
32448
32449    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32450  fi
32451
32452
32453    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32455$as_echo_n "checking for freetype includes... " >&6; }
32456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32457$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32458    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32460$as_echo_n "checking for freetype libraries... " >&6; }
32461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32462$as_echo "$FREETYPE_LIB_PATH" >&6; }
32463  fi
32464
32465          fi
32466        else
32467          if test "x$SYS_ROOT" = "x/"; then
32468            FREETYPE_ROOT=
32469          else
32470            FREETYPE_ROOT="$SYS_ROOT"
32471          fi
32472          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32473
32474  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32475  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32476  METHOD="well-known location"
32477
32478  # First check if the files exists.
32479  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32480    # We found an arbitrary include file. That's a good sign.
32481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32482$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32483    FOUND_FREETYPE=yes
32484
32485    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32486    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32487      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32489      FOUND_FREETYPE=no
32490    else
32491      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32492        # On Windows, we will need both .lib and .dll file.
32493        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32494          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32495$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32496          FOUND_FREETYPE=no
32497        fi
32498      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
32499        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32500        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32501      fi
32502    fi
32503  fi
32504
32505  if test "x$FOUND_FREETYPE" = xyes; then
32506
32507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32508
32509  # Input might be given as Windows format, start by converting to
32510  # unix format.
32511  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32512  new_path=`$CYGPATH -u "$path"`
32513
32514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32517  # "foo.exe" is OK but "foo" is an error.
32518  #
32519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32520  # It is also a way to make sure we got the proper file name for the real test later on.
32521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32522  if test "x$test_shortpath" = x; then
32523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32525    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32526  fi
32527
32528  # Call helper function which possibly converts this using DOS-style short mode.
32529  # If so, the updated path is stored in $new_path.
32530
32531  input_path="$new_path"
32532  # Check if we need to convert this using DOS-style short mode. If the path
32533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32534  # take no chances and rewrite it.
32535  # Note: m4 eats our [], so we need to use [ and ] instead.
32536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32537  if test "x$has_forbidden_chars" != x; then
32538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32542      # Going to short mode and back again did indeed matter. Since short mode is
32543      # case insensitive, let's make it lowercase to improve readability.
32544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32545      # Now convert it back to Unix-stile (cygpath)
32546      input_path=`$CYGPATH -u "$shortmode_path"`
32547      new_path="$input_path"
32548    fi
32549  fi
32550
32551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32552  if test "x$test_cygdrive_prefix" = x; then
32553    # As a simple fix, exclude /usr/bin since it's not a real path.
32554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32556      # a path prefixed by /cygdrive for fixpath to work.
32557      new_path="$CYGWIN_ROOT_PATH$input_path"
32558    fi
32559  fi
32560
32561
32562  if test "x$path" != "x$new_path"; then
32563    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32566  fi
32567
32568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32569
32570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32571  has_colon=`$ECHO $path | $GREP ^.:`
32572  new_path="$path"
32573  if test "x$has_colon" = x; then
32574    # Not in mixed or Windows style, start by that.
32575    new_path=`cmd //c echo $path`
32576  fi
32577
32578
32579  input_path="$new_path"
32580  # Check if we need to convert this using DOS-style short mode. If the path
32581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32582  # take no chances and rewrite it.
32583  # Note: m4 eats our [], so we need to use [ and ] instead.
32584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32585  if test "x$has_forbidden_chars" != x; then
32586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32588  fi
32589
32590
32591  windows_path="$new_path"
32592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32593    unix_path=`$CYGPATH -u "$windows_path"`
32594    new_path="$unix_path"
32595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32597    new_path="$unix_path"
32598  fi
32599
32600  if test "x$path" != "x$new_path"; then
32601    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32604  fi
32605
32606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32608
32609  else
32610    # We're on a posix platform. Hooray! :)
32611    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32612    has_space=`$ECHO "$path" | $GREP " "`
32613    if test "x$has_space" != x; then
32614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32616      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32617    fi
32618
32619    # Use eval to expand a potential ~
32620    eval path="$path"
32621    if test ! -f "$path" && test ! -d "$path"; then
32622      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32623    fi
32624
32625    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32626  fi
32627
32628
32629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32630
32631  # Input might be given as Windows format, start by converting to
32632  # unix format.
32633  path="$POTENTIAL_FREETYPE_LIB_PATH"
32634  new_path=`$CYGPATH -u "$path"`
32635
32636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32639  # "foo.exe" is OK but "foo" is an error.
32640  #
32641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32642  # It is also a way to make sure we got the proper file name for the real test later on.
32643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32644  if test "x$test_shortpath" = x; then
32645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32647    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32648  fi
32649
32650  # Call helper function which possibly converts this using DOS-style short mode.
32651  # If so, the updated path is stored in $new_path.
32652
32653  input_path="$new_path"
32654  # Check if we need to convert this using DOS-style short mode. If the path
32655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32656  # take no chances and rewrite it.
32657  # Note: m4 eats our [], so we need to use [ and ] instead.
32658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32659  if test "x$has_forbidden_chars" != x; then
32660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32664      # Going to short mode and back again did indeed matter. Since short mode is
32665      # case insensitive, let's make it lowercase to improve readability.
32666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32667      # Now convert it back to Unix-stile (cygpath)
32668      input_path=`$CYGPATH -u "$shortmode_path"`
32669      new_path="$input_path"
32670    fi
32671  fi
32672
32673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32674  if test "x$test_cygdrive_prefix" = x; then
32675    # As a simple fix, exclude /usr/bin since it's not a real path.
32676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32678      # a path prefixed by /cygdrive for fixpath to work.
32679      new_path="$CYGWIN_ROOT_PATH$input_path"
32680    fi
32681  fi
32682
32683
32684  if test "x$path" != "x$new_path"; then
32685    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32688  fi
32689
32690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32691
32692  path="$POTENTIAL_FREETYPE_LIB_PATH"
32693  has_colon=`$ECHO $path | $GREP ^.:`
32694  new_path="$path"
32695  if test "x$has_colon" = x; then
32696    # Not in mixed or Windows style, start by that.
32697    new_path=`cmd //c echo $path`
32698  fi
32699
32700
32701  input_path="$new_path"
32702  # Check if we need to convert this using DOS-style short mode. If the path
32703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32704  # take no chances and rewrite it.
32705  # Note: m4 eats our [], so we need to use [ and ] instead.
32706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32707  if test "x$has_forbidden_chars" != x; then
32708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32710  fi
32711
32712
32713  windows_path="$new_path"
32714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32715    unix_path=`$CYGPATH -u "$windows_path"`
32716    new_path="$unix_path"
32717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32719    new_path="$unix_path"
32720  fi
32721
32722  if test "x$path" != "x$new_path"; then
32723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32726  fi
32727
32728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32730
32731  else
32732    # We're on a posix platform. Hooray! :)
32733    path="$POTENTIAL_FREETYPE_LIB_PATH"
32734    has_space=`$ECHO "$path" | $GREP " "`
32735    if test "x$has_space" != x; then
32736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32739    fi
32740
32741    # Use eval to expand a potential ~
32742    eval path="$path"
32743    if test ! -f "$path" && test ! -d "$path"; then
32744      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32745    fi
32746
32747    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32748  fi
32749
32750
32751    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32753$as_echo_n "checking for freetype includes... " >&6; }
32754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32755$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32756    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32758$as_echo_n "checking for freetype libraries... " >&6; }
32759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32760$as_echo "$FREETYPE_LIB_PATH" >&6; }
32761  fi
32762
32763
32764          if test "x$FOUND_FREETYPE" != xyes; then
32765            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32766
32767  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32768  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32769  METHOD="well-known location"
32770
32771  # First check if the files exists.
32772  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32773    # We found an arbitrary include file. That's a good sign.
32774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32775$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32776    FOUND_FREETYPE=yes
32777
32778    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32779    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32780      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32782      FOUND_FREETYPE=no
32783    else
32784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32785        # On Windows, we will need both .lib and .dll file.
32786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32789          FOUND_FREETYPE=no
32790        fi
32791      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
32792        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32793        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32794      fi
32795    fi
32796  fi
32797
32798  if test "x$FOUND_FREETYPE" = xyes; then
32799
32800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32801
32802  # Input might be given as Windows format, start by converting to
32803  # unix format.
32804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32805  new_path=`$CYGPATH -u "$path"`
32806
32807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32810  # "foo.exe" is OK but "foo" is an error.
32811  #
32812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32813  # It is also a way to make sure we got the proper file name for the real test later on.
32814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32815  if test "x$test_shortpath" = x; then
32816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32818    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32819  fi
32820
32821  # Call helper function which possibly converts this using DOS-style short mode.
32822  # If so, the updated path is stored in $new_path.
32823
32824  input_path="$new_path"
32825  # Check if we need to convert this using DOS-style short mode. If the path
32826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32827  # take no chances and rewrite it.
32828  # Note: m4 eats our [], so we need to use [ and ] instead.
32829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32830  if test "x$has_forbidden_chars" != x; then
32831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32835      # Going to short mode and back again did indeed matter. Since short mode is
32836      # case insensitive, let's make it lowercase to improve readability.
32837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32838      # Now convert it back to Unix-stile (cygpath)
32839      input_path=`$CYGPATH -u "$shortmode_path"`
32840      new_path="$input_path"
32841    fi
32842  fi
32843
32844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32845  if test "x$test_cygdrive_prefix" = x; then
32846    # As a simple fix, exclude /usr/bin since it's not a real path.
32847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32849      # a path prefixed by /cygdrive for fixpath to work.
32850      new_path="$CYGWIN_ROOT_PATH$input_path"
32851    fi
32852  fi
32853
32854
32855  if test "x$path" != "x$new_path"; then
32856    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32859  fi
32860
32861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32862
32863  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32864  has_colon=`$ECHO $path | $GREP ^.:`
32865  new_path="$path"
32866  if test "x$has_colon" = x; then
32867    # Not in mixed or Windows style, start by that.
32868    new_path=`cmd //c echo $path`
32869  fi
32870
32871
32872  input_path="$new_path"
32873  # Check if we need to convert this using DOS-style short mode. If the path
32874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32875  # take no chances and rewrite it.
32876  # Note: m4 eats our [], so we need to use [ and ] instead.
32877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32878  if test "x$has_forbidden_chars" != x; then
32879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32881  fi
32882
32883
32884  windows_path="$new_path"
32885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32886    unix_path=`$CYGPATH -u "$windows_path"`
32887    new_path="$unix_path"
32888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32890    new_path="$unix_path"
32891  fi
32892
32893  if test "x$path" != "x$new_path"; then
32894    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32897  fi
32898
32899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32901
32902  else
32903    # We're on a posix platform. Hooray! :)
32904    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32905    has_space=`$ECHO "$path" | $GREP " "`
32906    if test "x$has_space" != x; then
32907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32910    fi
32911
32912    # Use eval to expand a potential ~
32913    eval path="$path"
32914    if test ! -f "$path" && test ! -d "$path"; then
32915      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32916    fi
32917
32918    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32919  fi
32920
32921
32922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32923
32924  # Input might be given as Windows format, start by converting to
32925  # unix format.
32926  path="$POTENTIAL_FREETYPE_LIB_PATH"
32927  new_path=`$CYGPATH -u "$path"`
32928
32929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32932  # "foo.exe" is OK but "foo" is an error.
32933  #
32934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32935  # It is also a way to make sure we got the proper file name for the real test later on.
32936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32937  if test "x$test_shortpath" = x; then
32938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32940    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32941  fi
32942
32943  # Call helper function which possibly converts this using DOS-style short mode.
32944  # If so, the updated path is stored in $new_path.
32945
32946  input_path="$new_path"
32947  # Check if we need to convert this using DOS-style short mode. If the path
32948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32949  # take no chances and rewrite it.
32950  # Note: m4 eats our [], so we need to use [ and ] instead.
32951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32952  if test "x$has_forbidden_chars" != x; then
32953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32957      # Going to short mode and back again did indeed matter. Since short mode is
32958      # case insensitive, let's make it lowercase to improve readability.
32959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32960      # Now convert it back to Unix-stile (cygpath)
32961      input_path=`$CYGPATH -u "$shortmode_path"`
32962      new_path="$input_path"
32963    fi
32964  fi
32965
32966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32967  if test "x$test_cygdrive_prefix" = x; then
32968    # As a simple fix, exclude /usr/bin since it's not a real path.
32969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32971      # a path prefixed by /cygdrive for fixpath to work.
32972      new_path="$CYGWIN_ROOT_PATH$input_path"
32973    fi
32974  fi
32975
32976
32977  if test "x$path" != "x$new_path"; then
32978    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32981  fi
32982
32983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32984
32985  path="$POTENTIAL_FREETYPE_LIB_PATH"
32986  has_colon=`$ECHO $path | $GREP ^.:`
32987  new_path="$path"
32988  if test "x$has_colon" = x; then
32989    # Not in mixed or Windows style, start by that.
32990    new_path=`cmd //c echo $path`
32991  fi
32992
32993
32994  input_path="$new_path"
32995  # Check if we need to convert this using DOS-style short mode. If the path
32996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32997  # take no chances and rewrite it.
32998  # Note: m4 eats our [], so we need to use [ and ] instead.
32999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33000  if test "x$has_forbidden_chars" != x; then
33001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33003  fi
33004
33005
33006  windows_path="$new_path"
33007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33008    unix_path=`$CYGPATH -u "$windows_path"`
33009    new_path="$unix_path"
33010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33012    new_path="$unix_path"
33013  fi
33014
33015  if test "x$path" != "x$new_path"; then
33016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33019  fi
33020
33021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33023
33024  else
33025    # We're on a posix platform. Hooray! :)
33026    path="$POTENTIAL_FREETYPE_LIB_PATH"
33027    has_space=`$ECHO "$path" | $GREP " "`
33028    if test "x$has_space" != x; then
33029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33031      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33032    fi
33033
33034    # Use eval to expand a potential ~
33035    eval path="$path"
33036    if test ! -f "$path" && test ! -d "$path"; then
33037      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33038    fi
33039
33040    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33041  fi
33042
33043
33044    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33046$as_echo_n "checking for freetype includes... " >&6; }
33047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33048$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33049    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33051$as_echo_n "checking for freetype libraries... " >&6; }
33052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33053$as_echo "$FREETYPE_LIB_PATH" >&6; }
33054  fi
33055
33056          fi
33057
33058          if test "x$FOUND_FREETYPE" != xyes; then
33059            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33060            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33061
33062  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33063  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33064  METHOD="well-known location"
33065
33066  # First check if the files exists.
33067  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33068    # We found an arbitrary include file. That's a good sign.
33069    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33070$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33071    FOUND_FREETYPE=yes
33072
33073    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33074    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33075      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33077      FOUND_FREETYPE=no
33078    else
33079      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33080        # On Windows, we will need both .lib and .dll file.
33081        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33082          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33083$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33084          FOUND_FREETYPE=no
33085        fi
33086      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
33087        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33088        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33089      fi
33090    fi
33091  fi
33092
33093  if test "x$FOUND_FREETYPE" = xyes; then
33094
33095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33096
33097  # Input might be given as Windows format, start by converting to
33098  # unix format.
33099  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33100  new_path=`$CYGPATH -u "$path"`
33101
33102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33105  # "foo.exe" is OK but "foo" is an error.
33106  #
33107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33108  # It is also a way to make sure we got the proper file name for the real test later on.
33109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33110  if test "x$test_shortpath" = x; then
33111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33113    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33114  fi
33115
33116  # Call helper function which possibly converts this using DOS-style short mode.
33117  # If so, the updated path is stored in $new_path.
33118
33119  input_path="$new_path"
33120  # Check if we need to convert this using DOS-style short mode. If the path
33121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33122  # take no chances and rewrite it.
33123  # Note: m4 eats our [], so we need to use [ and ] instead.
33124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33125  if test "x$has_forbidden_chars" != x; then
33126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33130      # Going to short mode and back again did indeed matter. Since short mode is
33131      # case insensitive, let's make it lowercase to improve readability.
33132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33133      # Now convert it back to Unix-stile (cygpath)
33134      input_path=`$CYGPATH -u "$shortmode_path"`
33135      new_path="$input_path"
33136    fi
33137  fi
33138
33139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33140  if test "x$test_cygdrive_prefix" = x; then
33141    # As a simple fix, exclude /usr/bin since it's not a real path.
33142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33144      # a path prefixed by /cygdrive for fixpath to work.
33145      new_path="$CYGWIN_ROOT_PATH$input_path"
33146    fi
33147  fi
33148
33149
33150  if test "x$path" != "x$new_path"; then
33151    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33154  fi
33155
33156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33157
33158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33159  has_colon=`$ECHO $path | $GREP ^.:`
33160  new_path="$path"
33161  if test "x$has_colon" = x; then
33162    # Not in mixed or Windows style, start by that.
33163    new_path=`cmd //c echo $path`
33164  fi
33165
33166
33167  input_path="$new_path"
33168  # Check if we need to convert this using DOS-style short mode. If the path
33169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33170  # take no chances and rewrite it.
33171  # Note: m4 eats our [], so we need to use [ and ] instead.
33172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33173  if test "x$has_forbidden_chars" != x; then
33174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33176  fi
33177
33178
33179  windows_path="$new_path"
33180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33181    unix_path=`$CYGPATH -u "$windows_path"`
33182    new_path="$unix_path"
33183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33185    new_path="$unix_path"
33186  fi
33187
33188  if test "x$path" != "x$new_path"; then
33189    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33192  fi
33193
33194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33196
33197  else
33198    # We're on a posix platform. Hooray! :)
33199    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33200    has_space=`$ECHO "$path" | $GREP " "`
33201    if test "x$has_space" != x; then
33202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33204      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33205    fi
33206
33207    # Use eval to expand a potential ~
33208    eval path="$path"
33209    if test ! -f "$path" && test ! -d "$path"; then
33210      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33211    fi
33212
33213    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33214  fi
33215
33216
33217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33218
33219  # Input might be given as Windows format, start by converting to
33220  # unix format.
33221  path="$POTENTIAL_FREETYPE_LIB_PATH"
33222  new_path=`$CYGPATH -u "$path"`
33223
33224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33227  # "foo.exe" is OK but "foo" is an error.
33228  #
33229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33230  # It is also a way to make sure we got the proper file name for the real test later on.
33231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33232  if test "x$test_shortpath" = x; then
33233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33236  fi
33237
33238  # Call helper function which possibly converts this using DOS-style short mode.
33239  # If so, the updated path is stored in $new_path.
33240
33241  input_path="$new_path"
33242  # Check if we need to convert this using DOS-style short mode. If the path
33243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33244  # take no chances and rewrite it.
33245  # Note: m4 eats our [], so we need to use [ and ] instead.
33246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33247  if test "x$has_forbidden_chars" != x; then
33248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33252      # Going to short mode and back again did indeed matter. Since short mode is
33253      # case insensitive, let's make it lowercase to improve readability.
33254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33255      # Now convert it back to Unix-stile (cygpath)
33256      input_path=`$CYGPATH -u "$shortmode_path"`
33257      new_path="$input_path"
33258    fi
33259  fi
33260
33261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33262  if test "x$test_cygdrive_prefix" = x; then
33263    # As a simple fix, exclude /usr/bin since it's not a real path.
33264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33266      # a path prefixed by /cygdrive for fixpath to work.
33267      new_path="$CYGWIN_ROOT_PATH$input_path"
33268    fi
33269  fi
33270
33271
33272  if test "x$path" != "x$new_path"; then
33273    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33276  fi
33277
33278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33279
33280  path="$POTENTIAL_FREETYPE_LIB_PATH"
33281  has_colon=`$ECHO $path | $GREP ^.:`
33282  new_path="$path"
33283  if test "x$has_colon" = x; then
33284    # Not in mixed or Windows style, start by that.
33285    new_path=`cmd //c echo $path`
33286  fi
33287
33288
33289  input_path="$new_path"
33290  # Check if we need to convert this using DOS-style short mode. If the path
33291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33292  # take no chances and rewrite it.
33293  # Note: m4 eats our [], so we need to use [ and ] instead.
33294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33295  if test "x$has_forbidden_chars" != x; then
33296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33298  fi
33299
33300
33301  windows_path="$new_path"
33302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33303    unix_path=`$CYGPATH -u "$windows_path"`
33304    new_path="$unix_path"
33305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33307    new_path="$unix_path"
33308  fi
33309
33310  if test "x$path" != "x$new_path"; then
33311    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33314  fi
33315
33316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33318
33319  else
33320    # We're on a posix platform. Hooray! :)
33321    path="$POTENTIAL_FREETYPE_LIB_PATH"
33322    has_space=`$ECHO "$path" | $GREP " "`
33323    if test "x$has_space" != x; then
33324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33327    fi
33328
33329    # Use eval to expand a potential ~
33330    eval path="$path"
33331    if test ! -f "$path" && test ! -d "$path"; then
33332      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33333    fi
33334
33335    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33336  fi
33337
33338
33339    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33341$as_echo_n "checking for freetype includes... " >&6; }
33342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33343$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33344    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33346$as_echo_n "checking for freetype libraries... " >&6; }
33347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33348$as_echo "$FREETYPE_LIB_PATH" >&6; }
33349  fi
33350
33351            else
33352
33353  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33354  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33355  METHOD="well-known location"
33356
33357  # First check if the files exists.
33358  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33359    # We found an arbitrary include file. That's a good sign.
33360    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33361$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33362    FOUND_FREETYPE=yes
33363
33364    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33365    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33366      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33367$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33368      FOUND_FREETYPE=no
33369    else
33370      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33371        # On Windows, we will need both .lib and .dll file.
33372        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33373          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33374$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33375          FOUND_FREETYPE=no
33376        fi
33377      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
33378        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33379        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33380      fi
33381    fi
33382  fi
33383
33384  if test "x$FOUND_FREETYPE" = xyes; then
33385
33386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33387
33388  # Input might be given as Windows format, start by converting to
33389  # unix format.
33390  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33391  new_path=`$CYGPATH -u "$path"`
33392
33393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33396  # "foo.exe" is OK but "foo" is an error.
33397  #
33398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33399  # It is also a way to make sure we got the proper file name for the real test later on.
33400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33401  if test "x$test_shortpath" = x; then
33402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33405  fi
33406
33407  # Call helper function which possibly converts this using DOS-style short mode.
33408  # If so, the updated path is stored in $new_path.
33409
33410  input_path="$new_path"
33411  # Check if we need to convert this using DOS-style short mode. If the path
33412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33413  # take no chances and rewrite it.
33414  # Note: m4 eats our [], so we need to use [ and ] instead.
33415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33416  if test "x$has_forbidden_chars" != x; then
33417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33421      # Going to short mode and back again did indeed matter. Since short mode is
33422      # case insensitive, let's make it lowercase to improve readability.
33423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33424      # Now convert it back to Unix-stile (cygpath)
33425      input_path=`$CYGPATH -u "$shortmode_path"`
33426      new_path="$input_path"
33427    fi
33428  fi
33429
33430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33431  if test "x$test_cygdrive_prefix" = x; then
33432    # As a simple fix, exclude /usr/bin since it's not a real path.
33433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33435      # a path prefixed by /cygdrive for fixpath to work.
33436      new_path="$CYGWIN_ROOT_PATH$input_path"
33437    fi
33438  fi
33439
33440
33441  if test "x$path" != "x$new_path"; then
33442    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33445  fi
33446
33447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33448
33449  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33450  has_colon=`$ECHO $path | $GREP ^.:`
33451  new_path="$path"
33452  if test "x$has_colon" = x; then
33453    # Not in mixed or Windows style, start by that.
33454    new_path=`cmd //c echo $path`
33455  fi
33456
33457
33458  input_path="$new_path"
33459  # Check if we need to convert this using DOS-style short mode. If the path
33460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33461  # take no chances and rewrite it.
33462  # Note: m4 eats our [], so we need to use [ and ] instead.
33463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33464  if test "x$has_forbidden_chars" != x; then
33465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33467  fi
33468
33469
33470  windows_path="$new_path"
33471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33472    unix_path=`$CYGPATH -u "$windows_path"`
33473    new_path="$unix_path"
33474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33476    new_path="$unix_path"
33477  fi
33478
33479  if test "x$path" != "x$new_path"; then
33480    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33483  fi
33484
33485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33487
33488  else
33489    # We're on a posix platform. Hooray! :)
33490    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33491    has_space=`$ECHO "$path" | $GREP " "`
33492    if test "x$has_space" != x; then
33493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33495      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33496    fi
33497
33498    # Use eval to expand a potential ~
33499    eval path="$path"
33500    if test ! -f "$path" && test ! -d "$path"; then
33501      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33502    fi
33503
33504    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33505  fi
33506
33507
33508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33509
33510  # Input might be given as Windows format, start by converting to
33511  # unix format.
33512  path="$POTENTIAL_FREETYPE_LIB_PATH"
33513  new_path=`$CYGPATH -u "$path"`
33514
33515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33518  # "foo.exe" is OK but "foo" is an error.
33519  #
33520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33521  # It is also a way to make sure we got the proper file name for the real test later on.
33522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33523  if test "x$test_shortpath" = x; then
33524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33526    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33527  fi
33528
33529  # Call helper function which possibly converts this using DOS-style short mode.
33530  # If so, the updated path is stored in $new_path.
33531
33532  input_path="$new_path"
33533  # Check if we need to convert this using DOS-style short mode. If the path
33534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33535  # take no chances and rewrite it.
33536  # Note: m4 eats our [], so we need to use [ and ] instead.
33537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33538  if test "x$has_forbidden_chars" != x; then
33539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33543      # Going to short mode and back again did indeed matter. Since short mode is
33544      # case insensitive, let's make it lowercase to improve readability.
33545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33546      # Now convert it back to Unix-stile (cygpath)
33547      input_path=`$CYGPATH -u "$shortmode_path"`
33548      new_path="$input_path"
33549    fi
33550  fi
33551
33552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33553  if test "x$test_cygdrive_prefix" = x; then
33554    # As a simple fix, exclude /usr/bin since it's not a real path.
33555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33557      # a path prefixed by /cygdrive for fixpath to work.
33558      new_path="$CYGWIN_ROOT_PATH$input_path"
33559    fi
33560  fi
33561
33562
33563  if test "x$path" != "x$new_path"; then
33564    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33567  fi
33568
33569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33570
33571  path="$POTENTIAL_FREETYPE_LIB_PATH"
33572  has_colon=`$ECHO $path | $GREP ^.:`
33573  new_path="$path"
33574  if test "x$has_colon" = x; then
33575    # Not in mixed or Windows style, start by that.
33576    new_path=`cmd //c echo $path`
33577  fi
33578
33579
33580  input_path="$new_path"
33581  # Check if we need to convert this using DOS-style short mode. If the path
33582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33583  # take no chances and rewrite it.
33584  # Note: m4 eats our [], so we need to use [ and ] instead.
33585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33586  if test "x$has_forbidden_chars" != x; then
33587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33589  fi
33590
33591
33592  windows_path="$new_path"
33593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33594    unix_path=`$CYGPATH -u "$windows_path"`
33595    new_path="$unix_path"
33596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33598    new_path="$unix_path"
33599  fi
33600
33601  if test "x$path" != "x$new_path"; then
33602    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33605  fi
33606
33607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33609
33610  else
33611    # We're on a posix platform. Hooray! :)
33612    path="$POTENTIAL_FREETYPE_LIB_PATH"
33613    has_space=`$ECHO "$path" | $GREP " "`
33614    if test "x$has_space" != x; then
33615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33617      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33618    fi
33619
33620    # Use eval to expand a potential ~
33621    eval path="$path"
33622    if test ! -f "$path" && test ! -d "$path"; then
33623      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33624    fi
33625
33626    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33627  fi
33628
33629
33630    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33632$as_echo_n "checking for freetype includes... " >&6; }
33633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33634$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33635    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33637$as_echo_n "checking for freetype libraries... " >&6; }
33638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33639$as_echo "$FREETYPE_LIB_PATH" >&6; }
33640  fi
33641
33642              if test "x$FOUND_FREETYPE" != xyes; then
33643
33644  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33645  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33646  METHOD="well-known location"
33647
33648  # First check if the files exists.
33649  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33650    # We found an arbitrary include file. That's a good sign.
33651    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33652$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33653    FOUND_FREETYPE=yes
33654
33655    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33656    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33657      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33658$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33659      FOUND_FREETYPE=no
33660    else
33661      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33662        # On Windows, we will need both .lib and .dll file.
33663        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33664          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33665$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33666          FOUND_FREETYPE=no
33667        fi
33668      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
33669        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33670        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33671      fi
33672    fi
33673  fi
33674
33675  if test "x$FOUND_FREETYPE" = xyes; then
33676
33677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33678
33679  # Input might be given as Windows format, start by converting to
33680  # unix format.
33681  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33682  new_path=`$CYGPATH -u "$path"`
33683
33684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33687  # "foo.exe" is OK but "foo" is an error.
33688  #
33689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33690  # It is also a way to make sure we got the proper file name for the real test later on.
33691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33692  if test "x$test_shortpath" = x; then
33693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33695    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33696  fi
33697
33698  # Call helper function which possibly converts this using DOS-style short mode.
33699  # If so, the updated path is stored in $new_path.
33700
33701  input_path="$new_path"
33702  # Check if we need to convert this using DOS-style short mode. If the path
33703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33704  # take no chances and rewrite it.
33705  # Note: m4 eats our [], so we need to use [ and ] instead.
33706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33707  if test "x$has_forbidden_chars" != x; then
33708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33712      # Going to short mode and back again did indeed matter. Since short mode is
33713      # case insensitive, let's make it lowercase to improve readability.
33714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33715      # Now convert it back to Unix-stile (cygpath)
33716      input_path=`$CYGPATH -u "$shortmode_path"`
33717      new_path="$input_path"
33718    fi
33719  fi
33720
33721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33722  if test "x$test_cygdrive_prefix" = x; then
33723    # As a simple fix, exclude /usr/bin since it's not a real path.
33724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33726      # a path prefixed by /cygdrive for fixpath to work.
33727      new_path="$CYGWIN_ROOT_PATH$input_path"
33728    fi
33729  fi
33730
33731
33732  if test "x$path" != "x$new_path"; then
33733    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33735$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33736  fi
33737
33738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33739
33740  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33741  has_colon=`$ECHO $path | $GREP ^.:`
33742  new_path="$path"
33743  if test "x$has_colon" = x; then
33744    # Not in mixed or Windows style, start by that.
33745    new_path=`cmd //c echo $path`
33746  fi
33747
33748
33749  input_path="$new_path"
33750  # Check if we need to convert this using DOS-style short mode. If the path
33751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33752  # take no chances and rewrite it.
33753  # Note: m4 eats our [], so we need to use [ and ] instead.
33754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33755  if test "x$has_forbidden_chars" != x; then
33756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33758  fi
33759
33760
33761  windows_path="$new_path"
33762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33763    unix_path=`$CYGPATH -u "$windows_path"`
33764    new_path="$unix_path"
33765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33767    new_path="$unix_path"
33768  fi
33769
33770  if test "x$path" != "x$new_path"; then
33771    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33773$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33774  fi
33775
33776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33778
33779  else
33780    # We're on a posix platform. Hooray! :)
33781    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33782    has_space=`$ECHO "$path" | $GREP " "`
33783    if test "x$has_space" != x; then
33784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33785$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33786      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33787    fi
33788
33789    # Use eval to expand a potential ~
33790    eval path="$path"
33791    if test ! -f "$path" && test ! -d "$path"; then
33792      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33793    fi
33794
33795    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33796  fi
33797
33798
33799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33800
33801  # Input might be given as Windows format, start by converting to
33802  # unix format.
33803  path="$POTENTIAL_FREETYPE_LIB_PATH"
33804  new_path=`$CYGPATH -u "$path"`
33805
33806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33809  # "foo.exe" is OK but "foo" is an error.
33810  #
33811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33812  # It is also a way to make sure we got the proper file name for the real test later on.
33813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33814  if test "x$test_shortpath" = x; then
33815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33816$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33817    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33818  fi
33819
33820  # Call helper function which possibly converts this using DOS-style short mode.
33821  # If so, the updated path is stored in $new_path.
33822
33823  input_path="$new_path"
33824  # Check if we need to convert this using DOS-style short mode. If the path
33825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33826  # take no chances and rewrite it.
33827  # Note: m4 eats our [], so we need to use [ and ] instead.
33828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33829  if test "x$has_forbidden_chars" != x; then
33830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33834      # Going to short mode and back again did indeed matter. Since short mode is
33835      # case insensitive, let's make it lowercase to improve readability.
33836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33837      # Now convert it back to Unix-stile (cygpath)
33838      input_path=`$CYGPATH -u "$shortmode_path"`
33839      new_path="$input_path"
33840    fi
33841  fi
33842
33843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33844  if test "x$test_cygdrive_prefix" = x; then
33845    # As a simple fix, exclude /usr/bin since it's not a real path.
33846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33848      # a path prefixed by /cygdrive for fixpath to work.
33849      new_path="$CYGWIN_ROOT_PATH$input_path"
33850    fi
33851  fi
33852
33853
33854  if test "x$path" != "x$new_path"; then
33855    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33857$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33858  fi
33859
33860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33861
33862  path="$POTENTIAL_FREETYPE_LIB_PATH"
33863  has_colon=`$ECHO $path | $GREP ^.:`
33864  new_path="$path"
33865  if test "x$has_colon" = x; then
33866    # Not in mixed or Windows style, start by that.
33867    new_path=`cmd //c echo $path`
33868  fi
33869
33870
33871  input_path="$new_path"
33872  # Check if we need to convert this using DOS-style short mode. If the path
33873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33874  # take no chances and rewrite it.
33875  # Note: m4 eats our [], so we need to use [ and ] instead.
33876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33877  if test "x$has_forbidden_chars" != x; then
33878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33880  fi
33881
33882
33883  windows_path="$new_path"
33884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33885    unix_path=`$CYGPATH -u "$windows_path"`
33886    new_path="$unix_path"
33887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33889    new_path="$unix_path"
33890  fi
33891
33892  if test "x$path" != "x$new_path"; then
33893    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33895$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33896  fi
33897
33898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33900
33901  else
33902    # We're on a posix platform. Hooray! :)
33903    path="$POTENTIAL_FREETYPE_LIB_PATH"
33904    has_space=`$ECHO "$path" | $GREP " "`
33905    if test "x$has_space" != x; then
33906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33907$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33908      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33909    fi
33910
33911    # Use eval to expand a potential ~
33912    eval path="$path"
33913    if test ! -f "$path" && test ! -d "$path"; then
33914      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33915    fi
33916
33917    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33918  fi
33919
33920
33921    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33923$as_echo_n "checking for freetype includes... " >&6; }
33924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33925$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33926    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33928$as_echo_n "checking for freetype libraries... " >&6; }
33929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33930$as_echo "$FREETYPE_LIB_PATH" >&6; }
33931  fi
33932
33933              fi
33934            fi
33935          fi
33936        fi
33937      fi # end check in well-known locations
33938
33939      if test "x$FOUND_FREETYPE" != xyes; then
33940
33941  # Print a helpful message on how to acquire the necessary build dependency.
33942  # freetype is the help tag: freetype, cups, pulse, alsa etc
33943  MISSING_DEPENDENCY=freetype
33944
33945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33946    cygwin_help $MISSING_DEPENDENCY
33947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33948    msys_help $MISSING_DEPENDENCY
33949  else
33950    PKGHANDLER_COMMAND=
33951
33952    case $PKGHANDLER in
33953      apt-get)
33954        apt_help     $MISSING_DEPENDENCY ;;
33955      yum)
33956        yum_help     $MISSING_DEPENDENCY ;;
33957      port)
33958        port_help    $MISSING_DEPENDENCY ;;
33959      pkgutil)
33960        pkgutil_help $MISSING_DEPENDENCY ;;
33961      pkgadd)
33962        pkgadd_help  $MISSING_DEPENDENCY ;;
33963      * )
33964        break ;;
33965    esac
33966
33967    if test "x$PKGHANDLER_COMMAND" != x; then
33968      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33969    fi
33970  fi
33971
33972        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
33973      fi
33974    fi # end user specified settings
33975
33976    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
33977    if test "x$FREETYPE_CFLAGS" = x; then
33978
33979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33980
33981  # Input might be given as Windows format, start by converting to
33982  # unix format.
33983  path="$FREETYPE_INCLUDE_PATH"
33984  new_path=`$CYGPATH -u "$path"`
33985
33986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33989  # "foo.exe" is OK but "foo" is an error.
33990  #
33991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33992  # It is also a way to make sure we got the proper file name for the real test later on.
33993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33994  if test "x$test_shortpath" = x; then
33995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33996$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33997    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
33998  fi
33999
34000  # Call helper function which possibly converts this using DOS-style short mode.
34001  # If so, the updated path is stored in $new_path.
34002
34003  input_path="$new_path"
34004  # Check if we need to convert this using DOS-style short mode. If the path
34005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34006  # take no chances and rewrite it.
34007  # Note: m4 eats our [], so we need to use [ and ] instead.
34008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34009  if test "x$has_forbidden_chars" != x; then
34010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34014      # Going to short mode and back again did indeed matter. Since short mode is
34015      # case insensitive, let's make it lowercase to improve readability.
34016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34017      # Now convert it back to Unix-stile (cygpath)
34018      input_path=`$CYGPATH -u "$shortmode_path"`
34019      new_path="$input_path"
34020    fi
34021  fi
34022
34023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34024  if test "x$test_cygdrive_prefix" = x; then
34025    # As a simple fix, exclude /usr/bin since it's not a real path.
34026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34028      # a path prefixed by /cygdrive for fixpath to work.
34029      new_path="$CYGWIN_ROOT_PATH$input_path"
34030    fi
34031  fi
34032
34033
34034  if test "x$path" != "x$new_path"; then
34035    FREETYPE_INCLUDE_PATH="$new_path"
34036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34037$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34038  fi
34039
34040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34041
34042  path="$FREETYPE_INCLUDE_PATH"
34043  has_colon=`$ECHO $path | $GREP ^.:`
34044  new_path="$path"
34045  if test "x$has_colon" = x; then
34046    # Not in mixed or Windows style, start by that.
34047    new_path=`cmd //c echo $path`
34048  fi
34049
34050
34051  input_path="$new_path"
34052  # Check if we need to convert this using DOS-style short mode. If the path
34053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34054  # take no chances and rewrite it.
34055  # Note: m4 eats our [], so we need to use [ and ] instead.
34056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34057  if test "x$has_forbidden_chars" != x; then
34058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34060  fi
34061
34062
34063  windows_path="$new_path"
34064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34065    unix_path=`$CYGPATH -u "$windows_path"`
34066    new_path="$unix_path"
34067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34069    new_path="$unix_path"
34070  fi
34071
34072  if test "x$path" != "x$new_path"; then
34073    FREETYPE_INCLUDE_PATH="$new_path"
34074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34075$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34076  fi
34077
34078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34080
34081  else
34082    # We're on a posix platform. Hooray! :)
34083    path="$FREETYPE_INCLUDE_PATH"
34084    has_space=`$ECHO "$path" | $GREP " "`
34085    if test "x$has_space" != x; then
34086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34087$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34088      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34089    fi
34090
34091    # Use eval to expand a potential ~
34092    eval path="$path"
34093    if test ! -f "$path" && test ! -d "$path"; then
34094      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34095    fi
34096
34097    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34098  fi
34099
34100      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34101        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34102      else
34103        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34104      fi
34105    fi
34106
34107    if test "x$FREETYPE_LIBS" = x; then
34108
34109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34110
34111  # Input might be given as Windows format, start by converting to
34112  # unix format.
34113  path="$FREETYPE_LIB_PATH"
34114  new_path=`$CYGPATH -u "$path"`
34115
34116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34119  # "foo.exe" is OK but "foo" is an error.
34120  #
34121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34122  # It is also a way to make sure we got the proper file name for the real test later on.
34123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34124  if test "x$test_shortpath" = x; then
34125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34126$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34127    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34128  fi
34129
34130  # Call helper function which possibly converts this using DOS-style short mode.
34131  # If so, the updated path is stored in $new_path.
34132
34133  input_path="$new_path"
34134  # Check if we need to convert this using DOS-style short mode. If the path
34135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34136  # take no chances and rewrite it.
34137  # Note: m4 eats our [], so we need to use [ and ] instead.
34138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34139  if test "x$has_forbidden_chars" != x; then
34140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34144      # Going to short mode and back again did indeed matter. Since short mode is
34145      # case insensitive, let's make it lowercase to improve readability.
34146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34147      # Now convert it back to Unix-stile (cygpath)
34148      input_path=`$CYGPATH -u "$shortmode_path"`
34149      new_path="$input_path"
34150    fi
34151  fi
34152
34153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34154  if test "x$test_cygdrive_prefix" = x; then
34155    # As a simple fix, exclude /usr/bin since it's not a real path.
34156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34158      # a path prefixed by /cygdrive for fixpath to work.
34159      new_path="$CYGWIN_ROOT_PATH$input_path"
34160    fi
34161  fi
34162
34163
34164  if test "x$path" != "x$new_path"; then
34165    FREETYPE_LIB_PATH="$new_path"
34166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34167$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34168  fi
34169
34170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34171
34172  path="$FREETYPE_LIB_PATH"
34173  has_colon=`$ECHO $path | $GREP ^.:`
34174  new_path="$path"
34175  if test "x$has_colon" = x; then
34176    # Not in mixed or Windows style, start by that.
34177    new_path=`cmd //c echo $path`
34178  fi
34179
34180
34181  input_path="$new_path"
34182  # Check if we need to convert this using DOS-style short mode. If the path
34183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34184  # take no chances and rewrite it.
34185  # Note: m4 eats our [], so we need to use [ and ] instead.
34186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34187  if test "x$has_forbidden_chars" != x; then
34188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34190  fi
34191
34192
34193  windows_path="$new_path"
34194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34195    unix_path=`$CYGPATH -u "$windows_path"`
34196    new_path="$unix_path"
34197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34199    new_path="$unix_path"
34200  fi
34201
34202  if test "x$path" != "x$new_path"; then
34203    FREETYPE_LIB_PATH="$new_path"
34204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34205$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34206  fi
34207
34208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34210
34211  else
34212    # We're on a posix platform. Hooray! :)
34213    path="$FREETYPE_LIB_PATH"
34214    has_space=`$ECHO "$path" | $GREP " "`
34215    if test "x$has_space" != x; then
34216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34217$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34218      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34219    fi
34220
34221    # Use eval to expand a potential ~
34222    eval path="$path"
34223    if test ! -f "$path" && test ! -d "$path"; then
34224      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34225    fi
34226
34227    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34228  fi
34229
34230      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34231        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34232      else
34233        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34234      fi
34235    fi
34236
34237    # Try to compile it
34238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34239$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34240    ac_ext=cpp
34241ac_cpp='$CXXCPP $CPPFLAGS'
34242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34245
34246    PREV_CXXCFLAGS="$CXXFLAGS"
34247    PREV_LIBS="$LIBS"
34248    PREV_CXX="$CXX"
34249    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34250    LIBS="$LIBS $FREETYPE_LIBS"
34251    CXX="$FIXPATH $CXX"
34252    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34253/* end confdefs.h.  */
34254
34255          #include<ft2build.h>
34256          #include FT_FREETYPE_H
34257          int main () {
34258            FT_Init_FreeType(NULL);
34259            return 0;
34260          }
34261
34262_ACEOF
34263if ac_fn_cxx_try_link "$LINENO"; then :
34264
34265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34266$as_echo "yes" >&6; }
34267
34268else
34269
34270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34271$as_echo "no" >&6; }
34272          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34273$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34274          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34275$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34276
34277
34278  # Print a helpful message on how to acquire the necessary build dependency.
34279  # freetype is the help tag: freetype, cups, pulse, alsa etc
34280  MISSING_DEPENDENCY=freetype
34281
34282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34283    cygwin_help $MISSING_DEPENDENCY
34284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34285    msys_help $MISSING_DEPENDENCY
34286  else
34287    PKGHANDLER_COMMAND=
34288
34289    case $PKGHANDLER in
34290      apt-get)
34291        apt_help     $MISSING_DEPENDENCY ;;
34292      yum)
34293        yum_help     $MISSING_DEPENDENCY ;;
34294      port)
34295        port_help    $MISSING_DEPENDENCY ;;
34296      pkgutil)
34297        pkgutil_help $MISSING_DEPENDENCY ;;
34298      pkgadd)
34299        pkgadd_help  $MISSING_DEPENDENCY ;;
34300      * )
34301        break ;;
34302    esac
34303
34304    if test "x$PKGHANDLER_COMMAND" != x; then
34305      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34306    fi
34307  fi
34308
34309
34310          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34311
34312
34313fi
34314rm -f core conftest.err conftest.$ac_objext \
34315    conftest$ac_exeext conftest.$ac_ext
34316    CXXCFLAGS="$PREV_CXXFLAGS"
34317    LIBS="$PREV_LIBS"
34318    CXX="$PREV_CXX"
34319    ac_ext=cpp
34320ac_cpp='$CXXCPP $CPPFLAGS'
34321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34324
34325
34326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34327$as_echo_n "checking if we should bundle freetype... " >&6; }
34328    if test "x$BUNDLE_FREETYPE" = xyes; then
34329      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34330    fi
34331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34332$as_echo "$BUNDLE_FREETYPE" >&6; }
34333
34334  fi # end freetype needed
34335
34336
34337
34338
34339
34340
34341
34342  ###############################################################################
34343  #
34344  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34345  #
34346
34347# Check whether --with-alsa was given.
34348if test "${with_alsa+set}" = set; then :
34349  withval=$with_alsa;
34350fi
34351
34352
34353# Check whether --with-alsa-include was given.
34354if test "${with_alsa_include+set}" = set; then :
34355  withval=$with_alsa_include;
34356fi
34357
34358
34359# Check whether --with-alsa-lib was given.
34360if test "${with_alsa_lib+set}" = set; then :
34361  withval=$with_alsa_lib;
34362fi
34363
34364
34365  if test "x$ALSA_NOT_NEEDED" = xyes; then
34366    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34367      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34368$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34369    fi
34370    ALSA_CFLAGS=
34371    ALSA_LIBS=
34372  else
34373    ALSA_FOUND=no
34374
34375    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34376      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34377    fi
34378
34379    if test "x${with_alsa}" != x; then
34380      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34381      ALSA_CFLAGS="-I${with_alsa}/include"
34382      ALSA_FOUND=yes
34383    fi
34384    if test "x${with_alsa_include}" != x; then
34385      ALSA_CFLAGS="-I${with_alsa_include}"
34386      ALSA_FOUND=yes
34387    fi
34388    if test "x${with_alsa_lib}" != x; then
34389      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34390      ALSA_FOUND=yes
34391    fi
34392    if test "x$ALSA_FOUND" = xno; then
34393
34394
34395  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34396    # Source the builddeps file again, to make sure it uses the latest variables!
34397    . $builddepsfile
34398    # Look for a target and build machine specific resource!
34399    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34400    if test "x$resource" = x; then
34401      # Ok, lets instead look for a target specific resource
34402      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34403    fi
34404    if test "x$resource" = x; then
34405      # Ok, lets instead look for a build specific resource
34406      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34407    fi
34408    if test "x$resource" = x; then
34409      # Ok, lets instead look for a generic resource
34410      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34411      resource=${builddep_alsa}
34412    fi
34413    if test "x$resource" != x; then
34414      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34415$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34416      # If the resource in the builddeps.conf file is an existing directory,
34417      # for example /java/linux/cups
34418      if test -d ${resource}; then
34419        depdir=${resource}
34420      else
34421
34422  # alsa is for example mymodule
34423  # $resource is for example libs/general/libmymod_1_2_3.zip
34424  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34425  # $with_builddeps_dir is for example /localhome/builddeps
34426  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34427  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34428  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34429  filename=`basename $resource`
34430  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34431  filebase=${filename%%.*}
34432  extension=${filename#*.}
34433  installdir=$with_builddeps_dir/$filebase
34434  if test ! -f $installdir/$filename.unpacked; then
34435    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34436$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34437    if test ! -d $installdir; then
34438      mkdir -p $installdir
34439    fi
34440    if test ! -d $installdir; then
34441      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34442    fi
34443    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34444    touch $tmpfile
34445    if test ! -f $tmpfile; then
34446      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34447    fi
34448
34449  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34450  # $tmpfile is the local file name for the downloaded file.
34451  VALID_TOOL=no
34452  if test "x$BDEPS_FTP" = xwget; then
34453    VALID_TOOL=yes
34454    wget -O $tmpfile $with_builddeps_server/$resource
34455  fi
34456  if test "x$BDEPS_FTP" = xlftp; then
34457    VALID_TOOL=yes
34458    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34459  fi
34460  if test "x$BDEPS_FTP" = xftp; then
34461    VALID_TOOL=yes
34462    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34463    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34464    FTPUSERPWD=${FTPSERVER%%@*}
34465    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34466      FTPUSER=${userpwd%%:*}
34467      FTPPWD=${userpwd#*@}
34468      FTPSERVER=${FTPSERVER#*@}
34469    else
34470      FTPUSER=ftp
34471      FTPPWD=ftp
34472    fi
34473    # the "pass" command does not work on some
34474    # ftp clients (read ftp.exe) but if it works,
34475    # passive mode is better!
34476    ( \
34477        echo "user $FTPUSER $FTPPWD"        ; \
34478        echo "pass"                         ; \
34479        echo "bin"                          ; \
34480        echo "get $FTPPATH $tmpfile"              ; \
34481    ) | ftp -in $FTPSERVER
34482  fi
34483  if test "x$VALID_TOOL" != xyes; then
34484    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34485  fi
34486
34487    mv $tmpfile $installdir/$filename
34488    if test ! -s $installdir/$filename; then
34489      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34490    fi
34491    case "$extension" in
34492      zip)  echo "Unzipping $installdir/$filename..."
34493        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34494        ;;
34495      tar.gz) echo "Untaring $installdir/$filename..."
34496        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34497        ;;
34498      tgz) echo "Untaring $installdir/$filename..."
34499        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34500        ;;
34501      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34502        ;;
34503    esac
34504  fi
34505  if test -f $installdir/$filename.unpacked; then
34506    depdir=$installdir
34507  fi
34508
34509      fi
34510      # Source the builddeps file again, because in the previous command, the depdir
34511      # was updated to point at the current build dependency install directory.
34512      . $builddepsfile
34513      # Now extract variables from the builddeps.conf files.
34514      theroot=${builddep_alsa_ROOT}
34515      thecflags=${builddep_alsa_CFLAGS}
34516      thelibs=${builddep_alsa_LIBS}
34517      if test "x$depdir" = x; then
34518        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34519      fi
34520      ALSA=$depdir
34521      if test "x$theroot" != x; then
34522        ALSA="$theroot"
34523      fi
34524      if test "x$thecflags" != x; then
34525        ALSA_CFLAGS="$thecflags"
34526      fi
34527      if test "x$thelibs" != x; then
34528        ALSA_LIBS="$thelibs"
34529      fi
34530      ALSA_FOUND=yes
34531      else ALSA_FOUND=no
34532
34533    fi
34534    else ALSA_FOUND=no
34535
34536  fi
34537
34538    fi
34539    if test "x$ALSA_FOUND" = xno; then
34540
34541pkg_failed=no
34542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34543$as_echo_n "checking for ALSA... " >&6; }
34544
34545if test -n "$ALSA_CFLAGS"; then
34546    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34547 elif test -n "$PKG_CONFIG"; then
34548    if test -n "$PKG_CONFIG" && \
34549    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34550  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34551  ac_status=$?
34552  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34553  test $ac_status = 0; }; then
34554  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34555else
34556  pkg_failed=yes
34557fi
34558 else
34559    pkg_failed=untried
34560fi
34561if test -n "$ALSA_LIBS"; then
34562    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34563 elif test -n "$PKG_CONFIG"; then
34564    if test -n "$PKG_CONFIG" && \
34565    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34566  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34567  ac_status=$?
34568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34569  test $ac_status = 0; }; then
34570  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34571else
34572  pkg_failed=yes
34573fi
34574 else
34575    pkg_failed=untried
34576fi
34577
34578
34579
34580if test $pkg_failed = yes; then
34581
34582if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34583        _pkg_short_errors_supported=yes
34584else
34585        _pkg_short_errors_supported=no
34586fi
34587        if test $_pkg_short_errors_supported = yes; then
34588	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34589        else
34590	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34591        fi
34592	# Put the nasty error message in config.log where it belongs
34593	echo "$ALSA_PKG_ERRORS" >&5
34594
34595	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34596$as_echo "no" >&6; }
34597                ALSA_FOUND=no
34598elif test $pkg_failed = untried; then
34599	ALSA_FOUND=no
34600else
34601	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34602	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34604$as_echo "yes" >&6; }
34605	ALSA_FOUND=yes
34606fi
34607    fi
34608    if test "x$ALSA_FOUND" = xno; then
34609      for ac_header in alsa/asoundlib.h
34610do :
34611  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34612if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34613  cat >>confdefs.h <<_ACEOF
34614#define HAVE_ALSA_ASOUNDLIB_H 1
34615_ACEOF
34616
34617            ALSA_FOUND=yes
34618            ALSA_CFLAGS=-Iignoreme
34619            ALSA_LIBS=-lasound
34620            DEFAULT_ALSA=yes
34621
34622else
34623  ALSA_FOUND=no
34624fi
34625
34626done
34627
34628    fi
34629    if test "x$ALSA_FOUND" = xno; then
34630
34631  # Print a helpful message on how to acquire the necessary build dependency.
34632  # alsa is the help tag: freetype, cups, pulse, alsa etc
34633  MISSING_DEPENDENCY=alsa
34634
34635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34636    cygwin_help $MISSING_DEPENDENCY
34637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34638    msys_help $MISSING_DEPENDENCY
34639  else
34640    PKGHANDLER_COMMAND=
34641
34642    case $PKGHANDLER in
34643      apt-get)
34644        apt_help     $MISSING_DEPENDENCY ;;
34645      yum)
34646        yum_help     $MISSING_DEPENDENCY ;;
34647      port)
34648        port_help    $MISSING_DEPENDENCY ;;
34649      pkgutil)
34650        pkgutil_help $MISSING_DEPENDENCY ;;
34651      pkgadd)
34652        pkgadd_help  $MISSING_DEPENDENCY ;;
34653      * )
34654        break ;;
34655    esac
34656
34657    if test "x$PKGHANDLER_COMMAND" != x; then
34658      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34659    fi
34660  fi
34661
34662      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34663    fi
34664  fi
34665
34666
34667
34668
34669
34670
34671  ###############################################################################
34672  #
34673  # Check for the jpeg library
34674  #
34675
34676  USE_EXTERNAL_LIBJPEG=true
34677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34678$as_echo_n "checking for main in -ljpeg... " >&6; }
34679if ${ac_cv_lib_jpeg_main+:} false; then :
34680  $as_echo_n "(cached) " >&6
34681else
34682  ac_check_lib_save_LIBS=$LIBS
34683LIBS="-ljpeg  $LIBS"
34684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34685/* end confdefs.h.  */
34686
34687
34688int
34689main ()
34690{
34691return main ();
34692  ;
34693  return 0;
34694}
34695_ACEOF
34696if ac_fn_cxx_try_link "$LINENO"; then :
34697  ac_cv_lib_jpeg_main=yes
34698else
34699  ac_cv_lib_jpeg_main=no
34700fi
34701rm -f core conftest.err conftest.$ac_objext \
34702    conftest$ac_exeext conftest.$ac_ext
34703LIBS=$ac_check_lib_save_LIBS
34704fi
34705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34706$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34707if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34708  cat >>confdefs.h <<_ACEOF
34709#define HAVE_LIBJPEG 1
34710_ACEOF
34711
34712  LIBS="-ljpeg $LIBS"
34713
34714else
34715   USE_EXTERNAL_LIBJPEG=false
34716      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34717$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34718
34719fi
34720
34721
34722
34723  ###############################################################################
34724  #
34725  # Check for the gif library
34726  #
34727
34728
34729# Check whether --with-giflib was given.
34730if test "${with_giflib+set}" = set; then :
34731  withval=$with_giflib;
34732fi
34733
34734
34735
34736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34737$as_echo_n "checking for which giflib to use... " >&6; }
34738
34739  # default is bundled
34740  DEFAULT_GIFLIB=bundled
34741
34742  #
34743  # if user didn't specify, use DEFAULT_GIFLIB
34744  #
34745  if test "x${with_giflib}" = "x"; then
34746    with_giflib=${DEFAULT_GIFLIB}
34747  fi
34748
34749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34750$as_echo "${with_giflib}" >&6; }
34751
34752  if test "x${with_giflib}" = "xbundled"; then
34753    USE_EXTERNAL_LIBGIF=false
34754  elif test "x${with_giflib}" = "xsystem"; then
34755    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34756if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34757
34758else
34759   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34760fi
34761
34762
34763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34764$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34765if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34766  $as_echo_n "(cached) " >&6
34767else
34768  ac_check_lib_save_LIBS=$LIBS
34769LIBS="-lgif  $LIBS"
34770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34771/* end confdefs.h.  */
34772
34773/* Override any GCC internal prototype to avoid an error.
34774   Use char because int might match the return type of a GCC
34775   builtin and then its argument prototype would still apply.  */
34776#ifdef __cplusplus
34777extern "C"
34778#endif
34779char DGifGetCode ();
34780int
34781main ()
34782{
34783return DGifGetCode ();
34784  ;
34785  return 0;
34786}
34787_ACEOF
34788if ac_fn_cxx_try_link "$LINENO"; then :
34789  ac_cv_lib_gif_DGifGetCode=yes
34790else
34791  ac_cv_lib_gif_DGifGetCode=no
34792fi
34793rm -f core conftest.err conftest.$ac_objext \
34794    conftest$ac_exeext conftest.$ac_ext
34795LIBS=$ac_check_lib_save_LIBS
34796fi
34797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34798$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34799if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34800  cat >>confdefs.h <<_ACEOF
34801#define HAVE_LIBGIF 1
34802_ACEOF
34803
34804  LIBS="-lgif $LIBS"
34805
34806else
34807   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34808fi
34809
34810
34811    USE_EXTERNAL_LIBGIF=true
34812  else
34813    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34814  fi
34815
34816
34817  ###############################################################################
34818  #
34819  # Check for the zlib library
34820  #
34821
34822
34823# Check whether --with-zlib was given.
34824if test "${with_zlib+set}" = set; then :
34825  withval=$with_zlib;
34826fi
34827
34828
34829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34830$as_echo_n "checking for compress in -lz... " >&6; }
34831if ${ac_cv_lib_z_compress+:} false; then :
34832  $as_echo_n "(cached) " >&6
34833else
34834  ac_check_lib_save_LIBS=$LIBS
34835LIBS="-lz  $LIBS"
34836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34837/* end confdefs.h.  */
34838
34839/* Override any GCC internal prototype to avoid an error.
34840   Use char because int might match the return type of a GCC
34841   builtin and then its argument prototype would still apply.  */
34842#ifdef __cplusplus
34843extern "C"
34844#endif
34845char compress ();
34846int
34847main ()
34848{
34849return compress ();
34850  ;
34851  return 0;
34852}
34853_ACEOF
34854if ac_fn_cxx_try_link "$LINENO"; then :
34855  ac_cv_lib_z_compress=yes
34856else
34857  ac_cv_lib_z_compress=no
34858fi
34859rm -f core conftest.err conftest.$ac_objext \
34860    conftest$ac_exeext conftest.$ac_ext
34861LIBS=$ac_check_lib_save_LIBS
34862fi
34863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34864$as_echo "$ac_cv_lib_z_compress" >&6; }
34865if test "x$ac_cv_lib_z_compress" = xyes; then :
34866   ZLIB_FOUND=yes
34867else
34868   ZLIB_FOUND=no
34869fi
34870
34871
34872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
34873$as_echo_n "checking for which zlib to use... " >&6; }
34874
34875  DEFAULT_ZLIB=bundled
34876  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
34877    #
34878    # On macosx default is system...on others default is
34879    #
34880    DEFAULT_ZLIB=system
34881  fi
34882
34883  if test "x${ZLIB_FOUND}" != "xyes"; then
34884    #
34885    # If we don't find any system...set default to bundled
34886    #
34887    DEFAULT_ZLIB=bundled
34888  fi
34889
34890  #
34891  # If user didn't specify, use DEFAULT_ZLIB
34892  #
34893  if test "x${with_zlib}" = "x"; then
34894    with_zlib=${DEFAULT_ZLIB}
34895  fi
34896
34897  if test "x${with_zlib}" = "xbundled"; then
34898    USE_EXTERNAL_LIBZ=false
34899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
34900$as_echo "bundled" >&6; }
34901  elif test "x${with_zlib}" = "xsystem"; then
34902    if test "x${ZLIB_FOUND}" = "xyes"; then
34903      USE_EXTERNAL_LIBZ=true
34904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
34905$as_echo "system" >&6; }
34906    else
34907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
34908$as_echo "system not found" >&6; }
34909      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
34910    fi
34911  else
34912    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
34913  fi
34914
34915
34916
34917  ###############################################################################
34918  LIBZIP_CAN_USE_MMAP=true
34919
34920
34921
34922  ###############################################################################
34923  #
34924  # Check if altzone exists in time.h
34925  #
34926
34927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34928/* end confdefs.h.  */
34929#include <time.h>
34930int
34931main ()
34932{
34933return (int)altzone;
34934  ;
34935  return 0;
34936}
34937_ACEOF
34938if ac_fn_cxx_try_link "$LINENO"; then :
34939  has_altzone=yes
34940else
34941  has_altzone=no
34942fi
34943rm -f core conftest.err conftest.$ac_objext \
34944    conftest$ac_exeext conftest.$ac_ext
34945  if test "x$has_altzone" = xyes; then
34946
34947$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
34948
34949  fi
34950
34951  ###############################################################################
34952  #
34953  # Check the maths library
34954  #
34955
34956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
34957$as_echo_n "checking for cos in -lm... " >&6; }
34958if ${ac_cv_lib_m_cos+:} false; then :
34959  $as_echo_n "(cached) " >&6
34960else
34961  ac_check_lib_save_LIBS=$LIBS
34962LIBS="-lm  $LIBS"
34963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34964/* end confdefs.h.  */
34965
34966/* Override any GCC internal prototype to avoid an error.
34967   Use char because int might match the return type of a GCC
34968   builtin and then its argument prototype would still apply.  */
34969#ifdef __cplusplus
34970extern "C"
34971#endif
34972char cos ();
34973int
34974main ()
34975{
34976return cos ();
34977  ;
34978  return 0;
34979}
34980_ACEOF
34981if ac_fn_cxx_try_link "$LINENO"; then :
34982  ac_cv_lib_m_cos=yes
34983else
34984  ac_cv_lib_m_cos=no
34985fi
34986rm -f core conftest.err conftest.$ac_objext \
34987    conftest$ac_exeext conftest.$ac_ext
34988LIBS=$ac_check_lib_save_LIBS
34989fi
34990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
34991$as_echo "$ac_cv_lib_m_cos" >&6; }
34992if test "x$ac_cv_lib_m_cos" = xyes; then :
34993  cat >>confdefs.h <<_ACEOF
34994#define HAVE_LIBM 1
34995_ACEOF
34996
34997  LIBS="-lm $LIBS"
34998
34999else
35000
35001        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35002$as_echo "$as_me: Maths library was not found" >&6;}
35003
35004
35005fi
35006
35007
35008
35009  ###############################################################################
35010  #
35011  # Check for libdl.so
35012
35013  save_LIBS="$LIBS"
35014  LIBS=""
35015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35016$as_echo_n "checking for dlopen in -ldl... " >&6; }
35017if ${ac_cv_lib_dl_dlopen+:} false; then :
35018  $as_echo_n "(cached) " >&6
35019else
35020  ac_check_lib_save_LIBS=$LIBS
35021LIBS="-ldl  $LIBS"
35022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35023/* end confdefs.h.  */
35024
35025/* Override any GCC internal prototype to avoid an error.
35026   Use char because int might match the return type of a GCC
35027   builtin and then its argument prototype would still apply.  */
35028#ifdef __cplusplus
35029extern "C"
35030#endif
35031char dlopen ();
35032int
35033main ()
35034{
35035return dlopen ();
35036  ;
35037  return 0;
35038}
35039_ACEOF
35040if ac_fn_cxx_try_link "$LINENO"; then :
35041  ac_cv_lib_dl_dlopen=yes
35042else
35043  ac_cv_lib_dl_dlopen=no
35044fi
35045rm -f core conftest.err conftest.$ac_objext \
35046    conftest$ac_exeext conftest.$ac_ext
35047LIBS=$ac_check_lib_save_LIBS
35048fi
35049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35050$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35051if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35052  cat >>confdefs.h <<_ACEOF
35053#define HAVE_LIBDL 1
35054_ACEOF
35055
35056  LIBS="-ldl $LIBS"
35057
35058fi
35059
35060  LIBDL="$LIBS"
35061
35062  LIBS="$save_LIBS"
35063
35064
35065  ###############################################################################
35066  #
35067  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35068  # dynamic build is configured on command line.
35069  #
35070
35071# Check whether --with-stdc++lib was given.
35072if test "${with_stdc__lib+set}" = set; then :
35073  withval=$with_stdc__lib;
35074        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35075                && test "x$with_stdc__lib" != xdefault; then
35076          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35077        fi
35078
35079else
35080  with_stdc__lib=default
35081
35082fi
35083
35084
35085  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35086    # Test if -lstdc++ works.
35087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35088$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35089    ac_ext=cpp
35090ac_cpp='$CXXCPP $CPPFLAGS'
35091ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35092ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35093ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35094
35095    OLD_CXXFLAGS="$CXXFLAGS"
35096    CXXFLAGS="$CXXFLAGS -lstdc++"
35097    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35098/* end confdefs.h.  */
35099
35100int
35101main ()
35102{
35103return 0;
35104  ;
35105  return 0;
35106}
35107_ACEOF
35108if ac_fn_cxx_try_link "$LINENO"; then :
35109  has_dynamic_libstdcxx=yes
35110else
35111  has_dynamic_libstdcxx=no
35112fi
35113rm -f core conftest.err conftest.$ac_objext \
35114    conftest$ac_exeext conftest.$ac_ext
35115    CXXFLAGS="$OLD_CXXFLAGS"
35116    ac_ext=cpp
35117ac_cpp='$CXXCPP $CPPFLAGS'
35118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35121
35122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35123$as_echo "$has_dynamic_libstdcxx" >&6; }
35124
35125    # Test if stdc++ can be linked statically.
35126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35127$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35128    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35129    ac_ext=cpp
35130ac_cpp='$CXXCPP $CPPFLAGS'
35131ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35132ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35133ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35134
35135    OLD_LIBS="$LIBS"
35136    OLD_CXX="$CXX"
35137    LIBS="$STATIC_STDCXX_FLAGS"
35138    CXX="$CC"
35139    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35140/* end confdefs.h.  */
35141
35142int
35143main ()
35144{
35145return 0;
35146  ;
35147  return 0;
35148}
35149_ACEOF
35150if ac_fn_cxx_try_link "$LINENO"; then :
35151  has_static_libstdcxx=yes
35152else
35153  has_static_libstdcxx=no
35154fi
35155rm -f core conftest.err conftest.$ac_objext \
35156    conftest$ac_exeext conftest.$ac_ext
35157    LIBS="$OLD_LIBS"
35158    CXX="$OLD_CXX"
35159    ac_ext=cpp
35160ac_cpp='$CXXCPP $CPPFLAGS'
35161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35164
35165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35166$as_echo "$has_static_libstdcxx" >&6; }
35167
35168    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35169      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35170    fi
35171
35172    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35173      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35174    fi
35175
35176    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35177      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35178    fi
35179
35180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35181$as_echo_n "checking how to link with libstdc++... " >&6; }
35182    # If dynamic was requested, it's available since it would fail above otherwise.
35183    # If dynamic wasn't requested, go with static unless it isn't available.
35184    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35185      LIBCXX="$LIBCXX -lstdc++"
35186      LDCXX="$CXX"
35187      STATIC_CXX_SETTING="STATIC_CXX=false"
35188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35189$as_echo "dynamic" >&6; }
35190    else
35191      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35192      LDCXX="$CC"
35193      STATIC_CXX_SETTING="STATIC_CXX=true"
35194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35195$as_echo "static" >&6; }
35196    fi
35197  fi
35198
35199
35200  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35201    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35202
35203pkg_failed=no
35204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35205$as_echo_n "checking for LIBFFI... " >&6; }
35206
35207if test -n "$LIBFFI_CFLAGS"; then
35208    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35209 elif test -n "$PKG_CONFIG"; then
35210    if test -n "$PKG_CONFIG" && \
35211    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35212  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35213  ac_status=$?
35214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35215  test $ac_status = 0; }; then
35216  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35217else
35218  pkg_failed=yes
35219fi
35220 else
35221    pkg_failed=untried
35222fi
35223if test -n "$LIBFFI_LIBS"; then
35224    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35225 elif test -n "$PKG_CONFIG"; then
35226    if test -n "$PKG_CONFIG" && \
35227    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35228  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35229  ac_status=$?
35230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35231  test $ac_status = 0; }; then
35232  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35233else
35234  pkg_failed=yes
35235fi
35236 else
35237    pkg_failed=untried
35238fi
35239
35240
35241
35242if test $pkg_failed = yes; then
35243
35244if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35245        _pkg_short_errors_supported=yes
35246else
35247        _pkg_short_errors_supported=no
35248fi
35249        if test $_pkg_short_errors_supported = yes; then
35250	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35251        else
35252	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35253        fi
35254	# Put the nasty error message in config.log where it belongs
35255	echo "$LIBFFI_PKG_ERRORS" >&5
35256
35257	as_fn_error $? "Package requirements (libffi) were not met:
35258
35259$LIBFFI_PKG_ERRORS
35260
35261Consider adjusting the PKG_CONFIG_PATH environment variable if you
35262installed software in a non-standard prefix.
35263
35264Alternatively, you may set the environment variables LIBFFI_CFLAGS
35265and LIBFFI_LIBS to avoid the need to call pkg-config.
35266See the pkg-config man page for more details.
35267" "$LINENO" 5
35268elif test $pkg_failed = untried; then
35269	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35271as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35272is in your PATH or set the PKG_CONFIG environment variable to the full
35273path to pkg-config.
35274
35275Alternatively, you may set the environment variables LIBFFI_CFLAGS
35276and LIBFFI_LIBS to avoid the need to call pkg-config.
35277See the pkg-config man page for more details.
35278
35279To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35280See \`config.log' for more details" "$LINENO" 5; }
35281else
35282	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35283	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35285$as_echo "yes" >&6; }
35286	:
35287fi
35288
35289  fi
35290
35291  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35292    # Extract the first word of "llvm-config", so it can be a program name with args.
35293set dummy llvm-config; ac_word=$2
35294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35295$as_echo_n "checking for $ac_word... " >&6; }
35296if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35297  $as_echo_n "(cached) " >&6
35298else
35299  if test -n "$LLVM_CONFIG"; then
35300  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35301else
35302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35303for as_dir in $PATH
35304do
35305  IFS=$as_save_IFS
35306  test -z "$as_dir" && as_dir=.
35307    for ac_exec_ext in '' $ac_executable_extensions; do
35308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35309    ac_cv_prog_LLVM_CONFIG="llvm-config"
35310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35311    break 2
35312  fi
35313done
35314  done
35315IFS=$as_save_IFS
35316
35317fi
35318fi
35319LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35320if test -n "$LLVM_CONFIG"; then
35321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35322$as_echo "$LLVM_CONFIG" >&6; }
35323else
35324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35325$as_echo "no" >&6; }
35326fi
35327
35328
35329
35330    if test "x$LLVM_CONFIG" != xllvm-config; then
35331      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35332    fi
35333
35334    llvm_components="jit mcjit engine nativecodegen native"
35335    unset LLVM_CFLAGS
35336    for flag in $("$LLVM_CONFIG" --cxxflags); do
35337      if echo "${flag}" | grep -q '^-[ID]'; then
35338        if test "${flag}" != "-D_DEBUG" ; then
35339          if test "${LLVM_CFLAGS}" != "" ; then
35340            LLVM_CFLAGS="${LLVM_CFLAGS} "
35341          fi
35342          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35343        fi
35344      fi
35345    done
35346    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35347    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35348
35349    unset LLVM_LDFLAGS
35350    for flag in $("${LLVM_CONFIG}" --ldflags); do
35351      if echo "${flag}" | grep -q '^-L'; then
35352        if test "${LLVM_LDFLAGS}" != ""; then
35353          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35354        fi
35355        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35356      fi
35357    done
35358
35359    unset LLVM_LIBS
35360    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35361      if echo "${flag}" | grep -q '^-l'; then
35362        if test "${LLVM_LIBS}" != ""; then
35363          LLVM_LIBS="${LLVM_LIBS} "
35364        fi
35365        LLVM_LIBS="${LLVM_LIBS}${flag}"
35366      fi
35367    done
35368
35369
35370
35371
35372  fi
35373
35374  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35375  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35376    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35377  fi
35378
35379  # TODO better (platform agnostic) test
35380  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35381    LIBCXX="-lstdc++"
35382  fi
35383
35384
35385
35386
35387
35388###############################################################################
35389#
35390# We need to do some final tweaking, when everything else is done.
35391#
35392###############################################################################
35393
35394
35395  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35396
35397
35398  # The name of the Service Agent jar.
35399  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35400  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35401    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35402  fi
35403
35404
35405
35406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35407$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35408
35409    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35410      ENABLE_INTREE_EC=yes
35411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35412$as_echo "yes" >&6; }
35413    else
35414      ENABLE_INTREE_EC=no
35415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35416$as_echo "no" >&6; }
35417    fi
35418
35419
35420
35421
35422###############################################################################
35423#
35424# Configure parts of the build that only affect the build performance,
35425# not the result.
35426#
35427###############################################################################
35428
35429
35430  # How many cores do we have on this build system?
35431
35432# Check whether --with-num-cores was given.
35433if test "${with_num_cores+set}" = set; then :
35434  withval=$with_num_cores;
35435fi
35436
35437  if test "x$with_num_cores" = x; then
35438    # The number of cores were not specified, try to probe them.
35439
35440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35441$as_echo_n "checking for number of cores... " >&6; }
35442  NUM_CORES=1
35443  FOUND_CORES=no
35444
35445  if test -f /proc/cpuinfo; then
35446    # Looks like a Linux (or cygwin) system
35447    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35448    FOUND_CORES=yes
35449  elif test -x /usr/sbin/psrinfo; then
35450    # Looks like a Solaris system
35451    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35452    FOUND_CORES=yes
35453  elif test -x /usr/sbin/system_profiler; then
35454    # Looks like a MacOSX system
35455    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35456    FOUND_CORES=yes
35457  elif test -n "$NUMBER_OF_PROCESSORS"; then
35458    # On windows, look in the env
35459    NUM_CORES=$NUMBER_OF_PROCESSORS
35460    FOUND_CORES=yes
35461  fi
35462
35463  if test "x$FOUND_CORES" = xyes; then
35464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35465$as_echo "$NUM_CORES" >&6; }
35466  else
35467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35468$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35470$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35471  fi
35472
35473  else
35474    NUM_CORES=$with_num_cores
35475  fi
35476
35477
35478
35479  # How much memory do we have on this build system?
35480
35481# Check whether --with-memory-size was given.
35482if test "${with_memory_size+set}" = set; then :
35483  withval=$with_memory_size;
35484fi
35485
35486  if test "x$with_memory_size" = x; then
35487    # The memory size was not specified, try to probe it.
35488
35489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35490$as_echo_n "checking for memory size... " >&6; }
35491  # Default to 1024 MB
35492  MEMORY_SIZE=1024
35493  FOUND_MEM=no
35494
35495  if test -f /proc/meminfo; then
35496    # Looks like a Linux (or cygwin) system
35497    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35498    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35499    FOUND_MEM=yes
35500  elif test -x /usr/sbin/prtconf; then
35501    # Looks like a Solaris system
35502    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
35503    FOUND_MEM=yes
35504  elif test -x /usr/sbin/system_profiler; then
35505    # Looks like a MacOSX system
35506    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35507    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35508    FOUND_MEM=yes
35509  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35510    # Windows, but without cygwin
35511    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35512    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35513    FOUND_MEM=yes
35514  fi
35515
35516  if test "x$FOUND_MEM" = xyes; then
35517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35518$as_echo "$MEMORY_SIZE MB" >&6; }
35519  else
35520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35521$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35523$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35524  fi
35525
35526  else
35527    MEMORY_SIZE=$with_memory_size
35528  fi
35529
35530
35531
35532  # Provide a decent default number of parallel jobs for make depending on
35533  # number of cores, amount of memory and machine architecture.
35534
35535# Check whether --with-jobs was given.
35536if test "${with_jobs+set}" = set; then :
35537  withval=$with_jobs;
35538fi
35539
35540  if test "x$with_jobs" = x; then
35541    # Number of jobs was not specified, calculate.
35542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35543$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35544    # Approximate memory in GB, rounding up a bit.
35545    memory_gb=`expr $MEMORY_SIZE / 1100`
35546    # Pick the lowest of memory in gb and number of cores.
35547    if test "$memory_gb" -lt "$NUM_CORES"; then
35548      JOBS="$memory_gb"
35549    else
35550      JOBS="$NUM_CORES"
35551      # On bigger machines, leave some room for other processes to run
35552      if test "$JOBS" -gt "4"; then
35553        JOBS=`expr $JOBS '*' 90 / 100`
35554      fi
35555    fi
35556    # Cap number of jobs to 16
35557    if test "$JOBS" -gt "16"; then
35558      JOBS=16
35559    fi
35560    if test "$JOBS" -eq "0"; then
35561      JOBS=1
35562    fi
35563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35564$as_echo "$JOBS" >&6; }
35565  else
35566    JOBS=$with_jobs
35567  fi
35568
35569
35570
35571# Setup smart javac (after cores and memory have been setup)
35572
35573
35574# Check whether --with-sjavac-server-java was given.
35575if test "${with_sjavac_server_java+set}" = set; then :
35576  withval=$with_sjavac_server_java;
35577fi
35578
35579
35580  if test "x$with_sjavac_server_java" != x; then
35581    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35582    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35583    if test "x$FOUND_VERSION" = x; then
35584      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35585    fi
35586  else
35587    SJAVAC_SERVER_JAVA=""
35588    # Hotspot specific options.
35589
35590  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35591  $ECHO "Command: $JAVA -verbosegc -version" >&5
35592  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35593  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35594  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35595  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35596    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35597    JVM_ARG_OK=true
35598  else
35599    $ECHO "Arg failed:" >&5
35600    $ECHO "$OUTPUT" >&5
35601    JVM_ARG_OK=false
35602  fi
35603
35604    # JRockit specific options.
35605
35606  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35607  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35608  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35609  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35610  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35611  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35612    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35613    JVM_ARG_OK=true
35614  else
35615    $ECHO "Arg failed:" >&5
35616    $ECHO "$OUTPUT" >&5
35617    JVM_ARG_OK=false
35618  fi
35619
35620    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35621  fi
35622
35623
35624  if test "$MEMORY_SIZE" -gt "2500"; then
35625
35626  $ECHO "Check if jvm arg is ok: -d64" >&5
35627  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35628  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35629  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35630  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35631  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35632    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35633    JVM_ARG_OK=true
35634  else
35635    $ECHO "Arg failed:" >&5
35636    $ECHO "$OUTPUT" >&5
35637    JVM_ARG_OK=false
35638  fi
35639
35640    if test "$JVM_ARG_OK" = true; then
35641      JVM_64BIT=true
35642      JVM_ARG_OK=false
35643    fi
35644  fi
35645
35646  if test "$JVM_64BIT" = true; then
35647    if test "$MEMORY_SIZE" -gt "17000"; then
35648
35649  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35650  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35651  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35652  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35653  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35654  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35655    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35656    JVM_ARG_OK=true
35657  else
35658    $ECHO "Arg failed:" >&5
35659    $ECHO "$OUTPUT" >&5
35660    JVM_ARG_OK=false
35661  fi
35662
35663    fi
35664    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35665
35666  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35667  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35668  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35669  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35670  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35671  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35672    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35673    JVM_ARG_OK=true
35674  else
35675    $ECHO "Arg failed:" >&5
35676    $ECHO "$OUTPUT" >&5
35677    JVM_ARG_OK=false
35678  fi
35679
35680    fi
35681    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35682
35683  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35684  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35685  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35686  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35687  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35688  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35689    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35690    JVM_ARG_OK=true
35691  else
35692    $ECHO "Arg failed:" >&5
35693    $ECHO "$OUTPUT" >&5
35694    JVM_ARG_OK=false
35695  fi
35696
35697    fi
35698    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35699
35700  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35701  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35702  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35703  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35704  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35705  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35706    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35707    JVM_ARG_OK=true
35708  else
35709    $ECHO "Arg failed:" >&5
35710    $ECHO "$OUTPUT" >&5
35711    JVM_ARG_OK=false
35712  fi
35713
35714    fi
35715  fi
35716  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35717
35718  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35719  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35720  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35721  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35722  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35723  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35724    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35725    JVM_ARG_OK=true
35726  else
35727    $ECHO "Arg failed:" >&5
35728    $ECHO "$OUTPUT" >&5
35729    JVM_ARG_OK=false
35730  fi
35731
35732  fi
35733  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35734
35735  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35736  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35737  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35738  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35739  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35740  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35741    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35742    JVM_ARG_OK=true
35743  else
35744    $ECHO "Arg failed:" >&5
35745    $ECHO "$OUTPUT" >&5
35746    JVM_ARG_OK=false
35747  fi
35748
35749  fi
35750  if test "$JVM_ARG_OK" = false; then
35751
35752  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35753  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35754  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35755  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35756  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35757  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35758    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35759    JVM_ARG_OK=true
35760  else
35761    $ECHO "Arg failed:" >&5
35762    $ECHO "$OUTPUT" >&5
35763    JVM_ARG_OK=false
35764  fi
35765
35766  fi
35767
35768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35769$as_echo_n "checking whether to use sjavac... " >&6; }
35770  # Check whether --enable-sjavac was given.
35771if test "${enable_sjavac+set}" = set; then :
35772  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35773else
35774  ENABLE_SJAVAC='no'
35775fi
35776
35777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35778$as_echo "$ENABLE_SJAVAC" >&6; }
35779
35780
35781  if test "x$ENABLE_SJAVAC" = xyes; then
35782    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35783  else
35784    SJAVAC_SERVER_DIR=
35785  fi
35786
35787
35788
35789# Can the C/C++ compiler use precompiled headers?
35790
35791
35792  ###############################################################################
35793  #
35794  # Can the C/C++ compiler use precompiled headers?
35795  #
35796  # Check whether --enable-precompiled-headers was given.
35797if test "${enable_precompiled_headers+set}" = set; then :
35798  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35799else
35800  ENABLE_PRECOMPH=yes
35801fi
35802
35803
35804  USE_PRECOMPILED_HEADER=1
35805  if test "x$ENABLE_PRECOMPH" = xno; then
35806    USE_PRECOMPILED_HEADER=0
35807  fi
35808
35809  if test "x$ENABLE_PRECOMPH" = xyes; then
35810    # Check that the compiler actually supports precomp headers.
35811    if test "x$GCC" = xyes; then
35812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35813$as_echo_n "checking that precompiled headers work... " >&6; }
35814      echo "int alfa();" > conftest.h
35815      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35816      if test ! -f conftest.hpp.gch; then
35817        USE_PRECOMPILED_HEADER=0
35818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35819$as_echo "no" >&6; }
35820      else
35821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35822$as_echo "yes" >&6; }
35823      fi
35824      rm -f conftest.h conftest.hpp.gch
35825    fi
35826  fi
35827
35828
35829
35830
35831# Setup use of ccache, if available
35832
35833  # Check whether --enable-ccache was given.
35834if test "${enable_ccache+set}" = set; then :
35835  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35836else
35837  ENABLE_CCACHE=yes
35838fi
35839
35840  if test "x$ENABLE_CCACHE" = xyes; then
35841    OLD_PATH="$PATH"
35842    if test "x$TOOLS_DIR" != x; then
35843      PATH=$TOOLS_DIR:$PATH
35844    fi
35845    # Extract the first word of "ccache", so it can be a program name with args.
35846set dummy ccache; ac_word=$2
35847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35848$as_echo_n "checking for $ac_word... " >&6; }
35849if ${ac_cv_path_CCACHE+:} false; then :
35850  $as_echo_n "(cached) " >&6
35851else
35852  case $CCACHE in
35853  [\\/]* | ?:[\\/]*)
35854  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35855  ;;
35856  *)
35857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35858for as_dir in $PATH
35859do
35860  IFS=$as_save_IFS
35861  test -z "$as_dir" && as_dir=.
35862    for ac_exec_ext in '' $ac_executable_extensions; do
35863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35864    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
35865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35866    break 2
35867  fi
35868done
35869  done
35870IFS=$as_save_IFS
35871
35872  ;;
35873esac
35874fi
35875CCACHE=$ac_cv_path_CCACHE
35876if test -n "$CCACHE"; then
35877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
35878$as_echo "$CCACHE" >&6; }
35879else
35880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35881$as_echo "no" >&6; }
35882fi
35883
35884
35885    PATH="$OLD_PATH"
35886  else
35887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
35888$as_echo_n "checking for ccache... " >&6; }
35889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
35890$as_echo "explicitly disabled" >&6; }
35891    CCACHE=
35892  fi
35893
35894
35895
35896# Check whether --with-ccache-dir was given.
35897if test "${with_ccache_dir+set}" = set; then :
35898  withval=$with_ccache_dir;
35899fi
35900
35901
35902  if test "x$with_ccache_dir" != x; then
35903    # When using a non home ccache directory, assume the use is to share ccache files
35904    # with other users. Thus change the umask.
35905    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
35906  fi
35907  CCACHE_FOUND=""
35908  if test "x$CCACHE" != x; then
35909
35910  if test "x$CCACHE" != x; then
35911    CCACHE_FOUND="true"
35912    # Only use ccache if it is 3.1.4 or later, which supports
35913    # precompiled headers.
35914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
35915$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
35916    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
35917    if test "x$HAS_GOOD_CCACHE" = x; then
35918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
35919$as_echo "no, disabling ccache" >&6; }
35920      CCACHE=
35921    else
35922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35923$as_echo "yes" >&6; }
35924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
35925$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
35926      PUSHED_FLAGS="$CXXFLAGS"
35927      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
35928      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35929/* end confdefs.h.  */
35930
35931int
35932main ()
35933{
35934
35935  ;
35936  return 0;
35937}
35938_ACEOF
35939if ac_fn_cxx_try_compile "$LINENO"; then :
35940  CC_KNOWS_CCACHE_TRICK=yes
35941else
35942  CC_KNOWS_CCACHE_TRICK=no
35943fi
35944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35945      CXXFLAGS="$PUSHED_FLAGS"
35946      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
35947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35948$as_echo "yes" >&6; }
35949      else
35950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
35951$as_echo "no, disabling ccaching of precompiled headers" >&6; }
35952        CCACHE=
35953      fi
35954    fi
35955  fi
35956
35957  if test "x$CCACHE" != x; then
35958    CCACHE_SLOPPINESS=time_macros
35959    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
35960    CCACHE_FLAGS=-fpch-preprocess
35961
35962    if test "x$SET_CCACHE_DIR" != x; then
35963      mkdir -p $CCACHE_DIR > /dev/null 2>&1
35964      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
35965    fi
35966  fi
35967
35968  fi
35969
35970
35971###############################################################################
35972#
35973# And now the finish...
35974#
35975###############################################################################
35976
35977# Check for some common pitfalls
35978
35979  if test x"$OPENJDK_BUILD_OS" = xwindows; then
35980    file_to_test="$SRC_ROOT/LICENSE"
35981    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
35982      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
35983    fi
35984  fi
35985
35986
35987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
35988$as_echo_n "checking if build directory is on local disk... " >&6; }
35989
35990  # df -l lists only local disks; if the given directory is not found then
35991  # a non-zero exit code is given
35992  if test "x$DF" = x; then
35993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35994      # msys does not have df; use Windows "net use" instead.
35995      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
35996      if test "x$IS_NETWORK_DISK" = x; then
35997        OUTPUT_DIR_IS_LOCAL="yes"
35998      else
35999        OUTPUT_DIR_IS_LOCAL="no"
36000      fi
36001    else
36002      # No df here, say it's local
36003      OUTPUT_DIR_IS_LOCAL="yes"
36004    fi
36005  else
36006    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36007      OUTPUT_DIR_IS_LOCAL="yes"
36008    else
36009      OUTPUT_DIR_IS_LOCAL="no"
36010    fi
36011  fi
36012
36013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36014$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36015
36016
36017
36018  # Check if the user has any old-style ALT_ variables set.
36019  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36020
36021  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36022  # Since we can't properly handle the dependencies for this, warn the user about the situation
36023  if test -e $OUTPUT_ROOT/spec.gmk; then
36024    IS_RECONFIGURE=yes
36025  else
36026    IS_RECONFIGURE=no
36027  fi
36028
36029  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36030    HIDE_PERFORMANCE_HINTS=yes
36031  else
36032    HIDE_PERFORMANCE_HINTS=no
36033    # Hide it the next time around...
36034    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36035  fi
36036
36037
36038# At the end, call the custom hook. (Dummy macro if no custom sources available)
36039
36040
36041# We're messing a bit with internal autoconf variables to put the config.status
36042# in the output directory instead of the current directory.
36043CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36044
36045# Create the actual output files. Now the main work of configure is done.
36046cat >confcache <<\_ACEOF
36047# This file is a shell script that caches the results of configure
36048# tests run on this system so they can be shared between configure
36049# scripts and configure runs, see configure's option --config-cache.
36050# It is not useful on other systems.  If it contains results you don't
36051# want to keep, you may remove or edit it.
36052#
36053# config.status only pays attention to the cache file if you give it
36054# the --recheck option to rerun configure.
36055#
36056# `ac_cv_env_foo' variables (set or unset) will be overridden when
36057# loading this file, other *unset* `ac_cv_foo' will be assigned the
36058# following values.
36059
36060_ACEOF
36061
36062# The following way of writing the cache mishandles newlines in values,
36063# but we know of no workaround that is simple, portable, and efficient.
36064# So, we kill variables containing newlines.
36065# Ultrix sh set writes to stderr and can't be redirected directly,
36066# and sets the high bit in the cache file unless we assign to the vars.
36067(
36068  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36069    eval ac_val=\$$ac_var
36070    case $ac_val in #(
36071    *${as_nl}*)
36072      case $ac_var in #(
36073      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36074$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36075      esac
36076      case $ac_var in #(
36077      _ | IFS | as_nl) ;; #(
36078      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36079      *) { eval $ac_var=; unset $ac_var;} ;;
36080      esac ;;
36081    esac
36082  done
36083
36084  (set) 2>&1 |
36085    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36086    *${as_nl}ac_space=\ *)
36087      # `set' does not quote correctly, so add quotes: double-quote
36088      # substitution turns \\\\ into \\, and sed turns \\ into \.
36089      sed -n \
36090	"s/'/'\\\\''/g;
36091	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36092      ;; #(
36093    *)
36094      # `set' quotes correctly as required by POSIX, so do not add quotes.
36095      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36096      ;;
36097    esac |
36098    sort
36099) |
36100  sed '
36101     /^ac_cv_env_/b end
36102     t clear
36103     :clear
36104     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36105     t end
36106     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36107     :end' >>confcache
36108if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36109  if test -w "$cache_file"; then
36110    if test "x$cache_file" != "x/dev/null"; then
36111      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36112$as_echo "$as_me: updating cache $cache_file" >&6;}
36113      if test ! -f "$cache_file" || test -h "$cache_file"; then
36114	cat confcache >"$cache_file"
36115      else
36116        case $cache_file in #(
36117        */* | ?:*)
36118	  mv -f confcache "$cache_file"$$ &&
36119	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36120        *)
36121	  mv -f confcache "$cache_file" ;;
36122	esac
36123      fi
36124    fi
36125  else
36126    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36127$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36128  fi
36129fi
36130rm -f confcache
36131
36132test "x$prefix" = xNONE && prefix=$ac_default_prefix
36133# Let make expand exec_prefix.
36134test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36135
36136DEFS=-DHAVE_CONFIG_H
36137
36138ac_libobjs=
36139ac_ltlibobjs=
36140U=
36141for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36142  # 1. Remove the extension, and $U if already installed.
36143  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36144  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36145  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36146  #    will be set to the directory where LIBOBJS objects are built.
36147  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36148  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36149done
36150LIBOBJS=$ac_libobjs
36151
36152LTLIBOBJS=$ac_ltlibobjs
36153
36154
36155
36156: "${CONFIG_STATUS=./config.status}"
36157ac_write_fail=0
36158ac_clean_files_save=$ac_clean_files
36159ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36160{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36161$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36162as_write_fail=0
36163cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36164#! $SHELL
36165# Generated by $as_me.
36166# Run this file to recreate the current configuration.
36167# Compiler output produced by configure, useful for debugging
36168# configure, is in config.log if it exists.
36169
36170debug=false
36171ac_cs_recheck=false
36172ac_cs_silent=false
36173
36174SHELL=\${CONFIG_SHELL-$SHELL}
36175export SHELL
36176_ASEOF
36177cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36178## -------------------- ##
36179## M4sh Initialization. ##
36180## -------------------- ##
36181
36182# Be more Bourne compatible
36183DUALCASE=1; export DUALCASE # for MKS sh
36184if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36185  emulate sh
36186  NULLCMD=:
36187  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36188  # is contrary to our usage.  Disable this feature.
36189  alias -g '${1+"$@"}'='"$@"'
36190  setopt NO_GLOB_SUBST
36191else
36192  case `(set -o) 2>/dev/null` in #(
36193  *posix*) :
36194    set -o posix ;; #(
36195  *) :
36196     ;;
36197esac
36198fi
36199
36200
36201as_nl='
36202'
36203export as_nl
36204# Printing a long string crashes Solaris 7 /usr/bin/printf.
36205as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36206as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36207as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36208# Prefer a ksh shell builtin over an external printf program on Solaris,
36209# but without wasting forks for bash or zsh.
36210if test -z "$BASH_VERSION$ZSH_VERSION" \
36211    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36212  as_echo='print -r --'
36213  as_echo_n='print -rn --'
36214elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36215  as_echo='printf %s\n'
36216  as_echo_n='printf %s'
36217else
36218  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36219    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36220    as_echo_n='/usr/ucb/echo -n'
36221  else
36222    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36223    as_echo_n_body='eval
36224      arg=$1;
36225      case $arg in #(
36226      *"$as_nl"*)
36227	expr "X$arg" : "X\\(.*\\)$as_nl";
36228	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36229      esac;
36230      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36231    '
36232    export as_echo_n_body
36233    as_echo_n='sh -c $as_echo_n_body as_echo'
36234  fi
36235  export as_echo_body
36236  as_echo='sh -c $as_echo_body as_echo'
36237fi
36238
36239# The user is always right.
36240if test "${PATH_SEPARATOR+set}" != set; then
36241  PATH_SEPARATOR=:
36242  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36243    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36244      PATH_SEPARATOR=';'
36245  }
36246fi
36247
36248
36249# IFS
36250# We need space, tab and new line, in precisely that order.  Quoting is
36251# there to prevent editors from complaining about space-tab.
36252# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36253# splitting by setting IFS to empty value.)
36254IFS=" ""	$as_nl"
36255
36256# Find who we are.  Look in the path if we contain no directory separator.
36257as_myself=
36258case $0 in #((
36259  *[\\/]* ) as_myself=$0 ;;
36260  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36261for as_dir in $PATH
36262do
36263  IFS=$as_save_IFS
36264  test -z "$as_dir" && as_dir=.
36265    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36266  done
36267IFS=$as_save_IFS
36268
36269     ;;
36270esac
36271# We did not find ourselves, most probably we were run as `sh COMMAND'
36272# in which case we are not to be found in the path.
36273if test "x$as_myself" = x; then
36274  as_myself=$0
36275fi
36276if test ! -f "$as_myself"; then
36277  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36278  exit 1
36279fi
36280
36281# Unset variables that we do not need and which cause bugs (e.g. in
36282# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36283# suppresses any "Segmentation fault" message there.  '((' could
36284# trigger a bug in pdksh 5.2.14.
36285for as_var in BASH_ENV ENV MAIL MAILPATH
36286do eval test x\${$as_var+set} = xset \
36287  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36288done
36289PS1='$ '
36290PS2='> '
36291PS4='+ '
36292
36293# NLS nuisances.
36294LC_ALL=C
36295export LC_ALL
36296LANGUAGE=C
36297export LANGUAGE
36298
36299# CDPATH.
36300(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36301
36302
36303# as_fn_error STATUS ERROR [LINENO LOG_FD]
36304# ----------------------------------------
36305# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36306# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36307# script with STATUS, using 1 if that was 0.
36308as_fn_error ()
36309{
36310  as_status=$1; test $as_status -eq 0 && as_status=1
36311  if test "$4"; then
36312    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36313    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36314  fi
36315  $as_echo "$as_me: error: $2" >&2
36316  as_fn_exit $as_status
36317} # as_fn_error
36318
36319
36320# as_fn_set_status STATUS
36321# -----------------------
36322# Set $? to STATUS, without forking.
36323as_fn_set_status ()
36324{
36325  return $1
36326} # as_fn_set_status
36327
36328# as_fn_exit STATUS
36329# -----------------
36330# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36331as_fn_exit ()
36332{
36333  set +e
36334  as_fn_set_status $1
36335  exit $1
36336} # as_fn_exit
36337
36338# as_fn_unset VAR
36339# ---------------
36340# Portably unset VAR.
36341as_fn_unset ()
36342{
36343  { eval $1=; unset $1;}
36344}
36345as_unset=as_fn_unset
36346# as_fn_append VAR VALUE
36347# ----------------------
36348# Append the text in VALUE to the end of the definition contained in VAR. Take
36349# advantage of any shell optimizations that allow amortized linear growth over
36350# repeated appends, instead of the typical quadratic growth present in naive
36351# implementations.
36352if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36353  eval 'as_fn_append ()
36354  {
36355    eval $1+=\$2
36356  }'
36357else
36358  as_fn_append ()
36359  {
36360    eval $1=\$$1\$2
36361  }
36362fi # as_fn_append
36363
36364# as_fn_arith ARG...
36365# ------------------
36366# Perform arithmetic evaluation on the ARGs, and store the result in the
36367# global $as_val. Take advantage of shells that can avoid forks. The arguments
36368# must be portable across $(()) and expr.
36369if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36370  eval 'as_fn_arith ()
36371  {
36372    as_val=$(( $* ))
36373  }'
36374else
36375  as_fn_arith ()
36376  {
36377    as_val=`expr "$@" || test $? -eq 1`
36378  }
36379fi # as_fn_arith
36380
36381
36382if expr a : '\(a\)' >/dev/null 2>&1 &&
36383   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36384  as_expr=expr
36385else
36386  as_expr=false
36387fi
36388
36389if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36390  as_basename=basename
36391else
36392  as_basename=false
36393fi
36394
36395if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36396  as_dirname=dirname
36397else
36398  as_dirname=false
36399fi
36400
36401as_me=`$as_basename -- "$0" ||
36402$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36403	 X"$0" : 'X\(//\)$' \| \
36404	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36405$as_echo X/"$0" |
36406    sed '/^.*\/\([^/][^/]*\)\/*$/{
36407	    s//\1/
36408	    q
36409	  }
36410	  /^X\/\(\/\/\)$/{
36411	    s//\1/
36412	    q
36413	  }
36414	  /^X\/\(\/\).*/{
36415	    s//\1/
36416	    q
36417	  }
36418	  s/.*/./; q'`
36419
36420# Avoid depending upon Character Ranges.
36421as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36422as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36423as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36424as_cr_digits='0123456789'
36425as_cr_alnum=$as_cr_Letters$as_cr_digits
36426
36427ECHO_C= ECHO_N= ECHO_T=
36428case `echo -n x` in #(((((
36429-n*)
36430  case `echo 'xy\c'` in
36431  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36432  xy)  ECHO_C='\c';;
36433  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36434       ECHO_T='	';;
36435  esac;;
36436*)
36437  ECHO_N='-n';;
36438esac
36439
36440rm -f conf$$ conf$$.exe conf$$.file
36441if test -d conf$$.dir; then
36442  rm -f conf$$.dir/conf$$.file
36443else
36444  rm -f conf$$.dir
36445  mkdir conf$$.dir 2>/dev/null
36446fi
36447if (echo >conf$$.file) 2>/dev/null; then
36448  if ln -s conf$$.file conf$$ 2>/dev/null; then
36449    as_ln_s='ln -s'
36450    # ... but there are two gotchas:
36451    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36452    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36453    # In both cases, we have to default to `cp -pR'.
36454    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36455      as_ln_s='cp -pR'
36456  elif ln conf$$.file conf$$ 2>/dev/null; then
36457    as_ln_s=ln
36458  else
36459    as_ln_s='cp -pR'
36460  fi
36461else
36462  as_ln_s='cp -pR'
36463fi
36464rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36465rmdir conf$$.dir 2>/dev/null
36466
36467
36468# as_fn_mkdir_p
36469# -------------
36470# Create "$as_dir" as a directory, including parents if necessary.
36471as_fn_mkdir_p ()
36472{
36473
36474  case $as_dir in #(
36475  -*) as_dir=./$as_dir;;
36476  esac
36477  test -d "$as_dir" || eval $as_mkdir_p || {
36478    as_dirs=
36479    while :; do
36480      case $as_dir in #(
36481      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36482      *) as_qdir=$as_dir;;
36483      esac
36484      as_dirs="'$as_qdir' $as_dirs"
36485      as_dir=`$as_dirname -- "$as_dir" ||
36486$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36487	 X"$as_dir" : 'X\(//\)[^/]' \| \
36488	 X"$as_dir" : 'X\(//\)$' \| \
36489	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36490$as_echo X"$as_dir" |
36491    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36492	    s//\1/
36493	    q
36494	  }
36495	  /^X\(\/\/\)[^/].*/{
36496	    s//\1/
36497	    q
36498	  }
36499	  /^X\(\/\/\)$/{
36500	    s//\1/
36501	    q
36502	  }
36503	  /^X\(\/\).*/{
36504	    s//\1/
36505	    q
36506	  }
36507	  s/.*/./; q'`
36508      test -d "$as_dir" && break
36509    done
36510    test -z "$as_dirs" || eval "mkdir $as_dirs"
36511  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36512
36513
36514} # as_fn_mkdir_p
36515if mkdir -p . 2>/dev/null; then
36516  as_mkdir_p='mkdir -p "$as_dir"'
36517else
36518  test -d ./-p && rmdir ./-p
36519  as_mkdir_p=false
36520fi
36521
36522
36523# as_fn_executable_p FILE
36524# -----------------------
36525# Test if FILE is an executable regular file.
36526as_fn_executable_p ()
36527{
36528  test -f "$1" && test -x "$1"
36529} # as_fn_executable_p
36530as_test_x='test -x'
36531as_executable_p=as_fn_executable_p
36532
36533# Sed expression to map a string onto a valid CPP name.
36534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36535
36536# Sed expression to map a string onto a valid variable name.
36537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36538
36539
36540exec 6>&1
36541## ----------------------------------- ##
36542## Main body of $CONFIG_STATUS script. ##
36543## ----------------------------------- ##
36544_ASEOF
36545test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36546
36547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36548# Save the log message, to keep $0 and so on meaningful, and to
36549# report actual input values of CONFIG_FILES etc. instead of their
36550# values after options handling.
36551ac_log="
36552This file was extended by OpenJDK $as_me jdk8, which was
36553generated by GNU Autoconf 2.69.  Invocation command line was
36554
36555  CONFIG_FILES    = $CONFIG_FILES
36556  CONFIG_HEADERS  = $CONFIG_HEADERS
36557  CONFIG_LINKS    = $CONFIG_LINKS
36558  CONFIG_COMMANDS = $CONFIG_COMMANDS
36559  $ $0 $@
36560
36561on `(hostname || uname -n) 2>/dev/null | sed 1q`
36562"
36563
36564_ACEOF
36565
36566case $ac_config_files in *"
36567"*) set x $ac_config_files; shift; ac_config_files=$*;;
36568esac
36569
36570case $ac_config_headers in *"
36571"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36572esac
36573
36574
36575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36576# Files that config.status was made for.
36577config_files="$ac_config_files"
36578config_headers="$ac_config_headers"
36579
36580_ACEOF
36581
36582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36583ac_cs_usage="\
36584\`$as_me' instantiates files and other configuration actions
36585from templates according to the current configuration.  Unless the files
36586and actions are specified as TAGs, all are instantiated by default.
36587
36588Usage: $0 [OPTION]... [TAG]...
36589
36590  -h, --help       print this help, then exit
36591  -V, --version    print version number and configuration settings, then exit
36592      --config     print configuration, then exit
36593  -q, --quiet, --silent
36594                   do not print progress messages
36595  -d, --debug      don't remove temporary files
36596      --recheck    update $as_me by reconfiguring in the same conditions
36597      --file=FILE[:TEMPLATE]
36598                   instantiate the configuration file FILE
36599      --header=FILE[:TEMPLATE]
36600                   instantiate the configuration header FILE
36601
36602Configuration files:
36603$config_files
36604
36605Configuration headers:
36606$config_headers
36607
36608Report bugs to <build-dev@openjdk.java.net>.
36609OpenJDK home page: <http://openjdk.java.net>."
36610
36611_ACEOF
36612cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36613ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36614ac_cs_version="\\
36615OpenJDK config.status jdk8
36616configured by $0, generated by GNU Autoconf 2.69,
36617  with options \\"\$ac_cs_config\\"
36618
36619Copyright (C) 2012 Free Software Foundation, Inc.
36620This config.status script is free software; the Free Software Foundation
36621gives unlimited permission to copy, distribute and modify it."
36622
36623ac_pwd='$ac_pwd'
36624srcdir='$srcdir'
36625AWK='$AWK'
36626test -n "\$AWK" || AWK=awk
36627_ACEOF
36628
36629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36630# The default lists apply if the user does not specify any file.
36631ac_need_defaults=:
36632while test $# != 0
36633do
36634  case $1 in
36635  --*=?*)
36636    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36637    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36638    ac_shift=:
36639    ;;
36640  --*=)
36641    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36642    ac_optarg=
36643    ac_shift=:
36644    ;;
36645  *)
36646    ac_option=$1
36647    ac_optarg=$2
36648    ac_shift=shift
36649    ;;
36650  esac
36651
36652  case $ac_option in
36653  # Handling of the options.
36654  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36655    ac_cs_recheck=: ;;
36656  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36657    $as_echo "$ac_cs_version"; exit ;;
36658  --config | --confi | --conf | --con | --co | --c )
36659    $as_echo "$ac_cs_config"; exit ;;
36660  --debug | --debu | --deb | --de | --d | -d )
36661    debug=: ;;
36662  --file | --fil | --fi | --f )
36663    $ac_shift
36664    case $ac_optarg in
36665    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36666    '') as_fn_error $? "missing file argument" ;;
36667    esac
36668    as_fn_append CONFIG_FILES " '$ac_optarg'"
36669    ac_need_defaults=false;;
36670  --header | --heade | --head | --hea )
36671    $ac_shift
36672    case $ac_optarg in
36673    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36674    esac
36675    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36676    ac_need_defaults=false;;
36677  --he | --h)
36678    # Conflict between --help and --header
36679    as_fn_error $? "ambiguous option: \`$1'
36680Try \`$0 --help' for more information.";;
36681  --help | --hel | -h )
36682    $as_echo "$ac_cs_usage"; exit ;;
36683  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36684  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36685    ac_cs_silent=: ;;
36686
36687  # This is an error.
36688  -*) as_fn_error $? "unrecognized option: \`$1'
36689Try \`$0 --help' for more information." ;;
36690
36691  *) as_fn_append ac_config_targets " $1"
36692     ac_need_defaults=false ;;
36693
36694  esac
36695  shift
36696done
36697
36698ac_configure_extra_args=
36699
36700if $ac_cs_silent; then
36701  exec 6>/dev/null
36702  ac_configure_extra_args="$ac_configure_extra_args --silent"
36703fi
36704
36705_ACEOF
36706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36707if \$ac_cs_recheck; then
36708  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36709  shift
36710  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36711  CONFIG_SHELL='$SHELL'
36712  export CONFIG_SHELL
36713  exec "\$@"
36714fi
36715
36716_ACEOF
36717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36718exec 5>>config.log
36719{
36720  echo
36721  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36722## Running $as_me. ##
36723_ASBOX
36724  $as_echo "$ac_log"
36725} >&5
36726
36727_ACEOF
36728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36729_ACEOF
36730
36731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36732
36733# Handling of arguments.
36734for ac_config_target in $ac_config_targets
36735do
36736  case $ac_config_target in
36737    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36738    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36739    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36740    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36741    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36742    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36743    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36744
36745  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36746  esac
36747done
36748
36749
36750# If the user did not use the arguments to specify the items to instantiate,
36751# then the envvar interface is used.  Set only those that are not.
36752# We use the long form for the default assignment because of an extremely
36753# bizarre bug on SunOS 4.1.3.
36754if $ac_need_defaults; then
36755  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36756  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36757fi
36758
36759# Have a temporary directory for convenience.  Make it in the build tree
36760# simply because there is no reason against having it here, and in addition,
36761# creating and moving files from /tmp can sometimes cause problems.
36762# Hook for its removal unless debugging.
36763# Note that there is a small window in which the directory will not be cleaned:
36764# after its creation but before its name has been assigned to `$tmp'.
36765$debug ||
36766{
36767  tmp= ac_tmp=
36768  trap 'exit_status=$?
36769  : "${ac_tmp:=$tmp}"
36770  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36771' 0
36772  trap 'as_fn_exit 1' 1 2 13 15
36773}
36774# Create a (secure) tmp directory for tmp files.
36775
36776{
36777  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36778  test -d "$tmp"
36779}  ||
36780{
36781  tmp=./conf$$-$RANDOM
36782  (umask 077 && mkdir "$tmp")
36783} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36784ac_tmp=$tmp
36785
36786# Set up the scripts for CONFIG_FILES section.
36787# No need to generate them if there are no CONFIG_FILES.
36788# This happens for instance with `./config.status config.h'.
36789if test -n "$CONFIG_FILES"; then
36790
36791
36792ac_cr=`echo X | tr X '\015'`
36793# On cygwin, bash can eat \r inside `` if the user requested igncr.
36794# But we know of no other shell where ac_cr would be empty at this
36795# point, so we can use a bashism as a fallback.
36796if test "x$ac_cr" = x; then
36797  eval ac_cr=\$\'\\r\'
36798fi
36799ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36800if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36801  ac_cs_awk_cr='\\r'
36802else
36803  ac_cs_awk_cr=$ac_cr
36804fi
36805
36806echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36807_ACEOF
36808
36809
36810{
36811  echo "cat >conf$$subs.awk <<_ACEOF" &&
36812  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36813  echo "_ACEOF"
36814} >conf$$subs.sh ||
36815  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36816ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36817ac_delim='%!_!# '
36818for ac_last_try in false false false false false :; do
36819  . ./conf$$subs.sh ||
36820    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36821
36822  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36823  if test $ac_delim_n = $ac_delim_num; then
36824    break
36825  elif $ac_last_try; then
36826    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36827  else
36828    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36829  fi
36830done
36831rm -f conf$$subs.sh
36832
36833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36834cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36835_ACEOF
36836sed -n '
36837h
36838s/^/S["/; s/!.*/"]=/
36839p
36840g
36841s/^[^!]*!//
36842:repl
36843t repl
36844s/'"$ac_delim"'$//
36845t delim
36846:nl
36847h
36848s/\(.\{148\}\)..*/\1/
36849t more1
36850s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36851p
36852n
36853b repl
36854:more1
36855s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36856p
36857g
36858s/.\{148\}//
36859t nl
36860:delim
36861h
36862s/\(.\{148\}\)..*/\1/
36863t more2
36864s/["\\]/\\&/g; s/^/"/; s/$/"/
36865p
36866b
36867:more2
36868s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36869p
36870g
36871s/.\{148\}//
36872t delim
36873' <conf$$subs.awk | sed '
36874/^[^""]/{
36875  N
36876  s/\n//
36877}
36878' >>$CONFIG_STATUS || ac_write_fail=1
36879rm -f conf$$subs.awk
36880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36881_ACAWK
36882cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36883  for (key in S) S_is_set[key] = 1
36884  FS = ""
36885
36886}
36887{
36888  line = $ 0
36889  nfields = split(line, field, "@")
36890  substed = 0
36891  len = length(field[1])
36892  for (i = 2; i < nfields; i++) {
36893    key = field[i]
36894    keylen = length(key)
36895    if (S_is_set[key]) {
36896      value = S[key]
36897      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36898      len += length(value) + length(field[++i])
36899      substed = 1
36900    } else
36901      len += 1 + keylen
36902  }
36903
36904  print line
36905}
36906
36907_ACAWK
36908_ACEOF
36909cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36910if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36911  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36912else
36913  cat
36914fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36915  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36916_ACEOF
36917
36918# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36919# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36920# trailing colons and then remove the whole line if VPATH becomes empty
36921# (actually we leave an empty line to preserve line numbers).
36922if test "x$srcdir" = x.; then
36923  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36924h
36925s///
36926s/^/:/
36927s/[	 ]*$/:/
36928s/:\$(srcdir):/:/g
36929s/:\${srcdir}:/:/g
36930s/:@srcdir@:/:/g
36931s/^:*//
36932s/:*$//
36933x
36934s/\(=[	 ]*\).*/\1/
36935G
36936s/\n//
36937s/^[^=]*=[	 ]*$//
36938}'
36939fi
36940
36941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36942fi # test -n "$CONFIG_FILES"
36943
36944# Set up the scripts for CONFIG_HEADERS section.
36945# No need to generate them if there are no CONFIG_HEADERS.
36946# This happens for instance with `./config.status Makefile'.
36947if test -n "$CONFIG_HEADERS"; then
36948cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36949BEGIN {
36950_ACEOF
36951
36952# Transform confdefs.h into an awk script `defines.awk', embedded as
36953# here-document in config.status, that substitutes the proper values into
36954# config.h.in to produce config.h.
36955
36956# Create a delimiter string that does not exist in confdefs.h, to ease
36957# handling of long lines.
36958ac_delim='%!_!# '
36959for ac_last_try in false false :; do
36960  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36961  if test -z "$ac_tt"; then
36962    break
36963  elif $ac_last_try; then
36964    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36965  else
36966    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36967  fi
36968done
36969
36970# For the awk script, D is an array of macro values keyed by name,
36971# likewise P contains macro parameters if any.  Preserve backslash
36972# newline sequences.
36973
36974ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36975sed -n '
36976s/.\{148\}/&'"$ac_delim"'/g
36977t rset
36978:rset
36979s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36980t def
36981d
36982:def
36983s/\\$//
36984t bsnl
36985s/["\\]/\\&/g
36986s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36987D["\1"]=" \3"/p
36988s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36989d
36990:bsnl
36991s/["\\]/\\&/g
36992s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36993D["\1"]=" \3\\\\\\n"\\/p
36994t cont
36995s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36996t cont
36997d
36998:cont
36999n
37000s/.\{148\}/&'"$ac_delim"'/g
37001t clear
37002:clear
37003s/\\$//
37004t bsnlc
37005s/["\\]/\\&/g; s/^/"/; s/$/"/p
37006d
37007:bsnlc
37008s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37009b cont
37010' <confdefs.h | sed '
37011s/'"$ac_delim"'/"\\\
37012"/g' >>$CONFIG_STATUS || ac_write_fail=1
37013
37014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37015  for (key in D) D_is_set[key] = 1
37016  FS = ""
37017}
37018/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37019  line = \$ 0
37020  split(line, arg, " ")
37021  if (arg[1] == "#") {
37022    defundef = arg[2]
37023    mac1 = arg[3]
37024  } else {
37025    defundef = substr(arg[1], 2)
37026    mac1 = arg[2]
37027  }
37028  split(mac1, mac2, "(") #)
37029  macro = mac2[1]
37030  prefix = substr(line, 1, index(line, defundef) - 1)
37031  if (D_is_set[macro]) {
37032    # Preserve the white space surrounding the "#".
37033    print prefix "define", macro P[macro] D[macro]
37034    next
37035  } else {
37036    # Replace #undef with comments.  This is necessary, for example,
37037    # in the case of _POSIX_SOURCE, which is predefined and required
37038    # on some systems where configure will not decide to define it.
37039    if (defundef == "undef") {
37040      print "/*", prefix defundef, macro, "*/"
37041      next
37042    }
37043  }
37044}
37045{ print }
37046_ACAWK
37047_ACEOF
37048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37049  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37050fi # test -n "$CONFIG_HEADERS"
37051
37052
37053eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37054shift
37055for ac_tag
37056do
37057  case $ac_tag in
37058  :[FHLC]) ac_mode=$ac_tag; continue;;
37059  esac
37060  case $ac_mode$ac_tag in
37061  :[FHL]*:*);;
37062  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37063  :[FH]-) ac_tag=-:-;;
37064  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37065  esac
37066  ac_save_IFS=$IFS
37067  IFS=:
37068  set x $ac_tag
37069  IFS=$ac_save_IFS
37070  shift
37071  ac_file=$1
37072  shift
37073
37074  case $ac_mode in
37075  :L) ac_source=$1;;
37076  :[FH])
37077    ac_file_inputs=
37078    for ac_f
37079    do
37080      case $ac_f in
37081      -) ac_f="$ac_tmp/stdin";;
37082      *) # Look for the file first in the build tree, then in the source tree
37083	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37084	 # because $ac_f cannot contain `:'.
37085	 test -f "$ac_f" ||
37086	   case $ac_f in
37087	   [\\/$]*) false;;
37088	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37089	   esac ||
37090	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37091      esac
37092      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37093      as_fn_append ac_file_inputs " '$ac_f'"
37094    done
37095
37096    # Let's still pretend it is `configure' which instantiates (i.e., don't
37097    # use $as_me), people would be surprised to read:
37098    #    /* config.h.  Generated by config.status.  */
37099    configure_input='Generated from '`
37100	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37101	`' by configure.'
37102    if test x"$ac_file" != x-; then
37103      configure_input="$ac_file.  $configure_input"
37104      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37105$as_echo "$as_me: creating $ac_file" >&6;}
37106    fi
37107    # Neutralize special characters interpreted by sed in replacement strings.
37108    case $configure_input in #(
37109    *\&* | *\|* | *\\* )
37110       ac_sed_conf_input=`$as_echo "$configure_input" |
37111       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37112    *) ac_sed_conf_input=$configure_input;;
37113    esac
37114
37115    case $ac_tag in
37116    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37117      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37118    esac
37119    ;;
37120  esac
37121
37122  ac_dir=`$as_dirname -- "$ac_file" ||
37123$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37124	 X"$ac_file" : 'X\(//\)[^/]' \| \
37125	 X"$ac_file" : 'X\(//\)$' \| \
37126	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37127$as_echo X"$ac_file" |
37128    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37129	    s//\1/
37130	    q
37131	  }
37132	  /^X\(\/\/\)[^/].*/{
37133	    s//\1/
37134	    q
37135	  }
37136	  /^X\(\/\/\)$/{
37137	    s//\1/
37138	    q
37139	  }
37140	  /^X\(\/\).*/{
37141	    s//\1/
37142	    q
37143	  }
37144	  s/.*/./; q'`
37145  as_dir="$ac_dir"; as_fn_mkdir_p
37146  ac_builddir=.
37147
37148case "$ac_dir" in
37149.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37150*)
37151  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37152  # A ".." for each directory in $ac_dir_suffix.
37153  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37154  case $ac_top_builddir_sub in
37155  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37156  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37157  esac ;;
37158esac
37159ac_abs_top_builddir=$ac_pwd
37160ac_abs_builddir=$ac_pwd$ac_dir_suffix
37161# for backward compatibility:
37162ac_top_builddir=$ac_top_build_prefix
37163
37164case $srcdir in
37165  .)  # We are building in place.
37166    ac_srcdir=.
37167    ac_top_srcdir=$ac_top_builddir_sub
37168    ac_abs_top_srcdir=$ac_pwd ;;
37169  [\\/]* | ?:[\\/]* )  # Absolute name.
37170    ac_srcdir=$srcdir$ac_dir_suffix;
37171    ac_top_srcdir=$srcdir
37172    ac_abs_top_srcdir=$srcdir ;;
37173  *) # Relative name.
37174    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37175    ac_top_srcdir=$ac_top_build_prefix$srcdir
37176    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37177esac
37178ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37179
37180
37181  case $ac_mode in
37182  :F)
37183  #
37184  # CONFIG_FILE
37185  #
37186
37187_ACEOF
37188
37189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37190# If the template does not know about datarootdir, expand it.
37191# FIXME: This hack should be removed a few years after 2.60.
37192ac_datarootdir_hack=; ac_datarootdir_seen=
37193ac_sed_dataroot='
37194/datarootdir/ {
37195  p
37196  q
37197}
37198/@datadir@/p
37199/@docdir@/p
37200/@infodir@/p
37201/@localedir@/p
37202/@mandir@/p'
37203case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37204*datarootdir*) ac_datarootdir_seen=yes;;
37205*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37206  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37207$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37208_ACEOF
37209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37210  ac_datarootdir_hack='
37211  s&@datadir@&$datadir&g
37212  s&@docdir@&$docdir&g
37213  s&@infodir@&$infodir&g
37214  s&@localedir@&$localedir&g
37215  s&@mandir@&$mandir&g
37216  s&\\\${datarootdir}&$datarootdir&g' ;;
37217esac
37218_ACEOF
37219
37220# Neutralize VPATH when `$srcdir' = `.'.
37221# Shell code in configure.ac might set extrasub.
37222# FIXME: do we really want to maintain this feature?
37223cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37224ac_sed_extra="$ac_vpsub
37225$extrasub
37226_ACEOF
37227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37228:t
37229/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37230s|@configure_input@|$ac_sed_conf_input|;t t
37231s&@top_builddir@&$ac_top_builddir_sub&;t t
37232s&@top_build_prefix@&$ac_top_build_prefix&;t t
37233s&@srcdir@&$ac_srcdir&;t t
37234s&@abs_srcdir@&$ac_abs_srcdir&;t t
37235s&@top_srcdir@&$ac_top_srcdir&;t t
37236s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37237s&@builddir@&$ac_builddir&;t t
37238s&@abs_builddir@&$ac_abs_builddir&;t t
37239s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37240$ac_datarootdir_hack
37241"
37242eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37243  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37244
37245test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37246  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37247  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37248      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37249  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37250which seems to be undefined.  Please make sure it is defined" >&5
37251$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37252which seems to be undefined.  Please make sure it is defined" >&2;}
37253
37254  rm -f "$ac_tmp/stdin"
37255  case $ac_file in
37256  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37257  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37258  esac \
37259  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37260 ;;
37261  :H)
37262  #
37263  # CONFIG_HEADER
37264  #
37265  if test x"$ac_file" != x-; then
37266    {
37267      $as_echo "/* $configure_input  */" \
37268      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37269    } >"$ac_tmp/config.h" \
37270      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37271    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37272      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37273$as_echo "$as_me: $ac_file is unchanged" >&6;}
37274    else
37275      rm -f "$ac_file"
37276      mv "$ac_tmp/config.h" "$ac_file" \
37277	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37278    fi
37279  else
37280    $as_echo "/* $configure_input  */" \
37281      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37282      || as_fn_error $? "could not create -" "$LINENO" 5
37283  fi
37284 ;;
37285
37286
37287  esac
37288
37289done # for ac_tag
37290
37291
37292as_fn_exit 0
37293_ACEOF
37294ac_clean_files=$ac_clean_files_save
37295
37296test $ac_write_fail = 0 ||
37297  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37298
37299
37300# configure is writing to config.log, and then calls config.status.
37301# config.status does its own redirection, appending to config.log.
37302# Unfortunately, on DOS this fails, as config.log is still kept open
37303# by configure, so config.status won't be able to write to it; its
37304# output is simply discarded.  So we exec the FD to /dev/null,
37305# effectively closing config.log, so it can be properly (re)opened and
37306# appended to by config.status.  When coming back to configure, we
37307# need to make the FD available again.
37308if test "$no_create" != yes; then
37309  ac_cs_success=:
37310  ac_config_status_args=
37311  test "$silent" = yes &&
37312    ac_config_status_args="$ac_config_status_args --quiet"
37313  exec 5>/dev/null
37314  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37315  exec 5>>config.log
37316  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37317  # would make configure fail if this is the last instruction.
37318  $ac_cs_success || as_fn_exit 1
37319fi
37320if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37321  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37322$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37323fi
37324
37325
37326# Try to move the config.log file to the output directory.
37327if test -e ./config.log; then
37328  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37329fi
37330
37331# Make the compare script executable
37332$CHMOD +x $OUTPUT_ROOT/compare.sh
37333
37334# Finally output some useful information to the user
37335
37336  # Finally output some useful information to the user
37337
37338  if test "x$CCACHE_FOUND" != x; then
37339    if  test "x$HAS_GOOD_CCACHE" = x; then
37340      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37341      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37342    else
37343      CCACHE_STATUS="installed and in use"
37344    fi
37345  else
37346    if test "x$GCC" = xyes; then
37347      CCACHE_STATUS="not installed (consider installing)"
37348      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37349    else
37350      CCACHE_STATUS="not available for your system"
37351    fi
37352  fi
37353
37354  printf "\n"
37355  printf "====================================================\n"
37356  printf "A new configuration has been successfully created in\n"
37357  printf "$OUTPUT_ROOT\n"
37358  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37359    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37360  else
37361    printf "using default settings.\n"
37362  fi
37363
37364  printf "\n"
37365  printf "Configuration summary:\n"
37366  printf "* Debug level:    $DEBUG_LEVEL\n"
37367  printf "* JDK variant:    $JDK_VARIANT\n"
37368  printf "* JVM variants:   $with_jvm_variants\n"
37369  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37370
37371  printf "\n"
37372  printf "Tools summary:\n"
37373  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37374    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37375  fi
37376  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37377  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37378  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37379
37380  printf "\n"
37381  printf "Build performance summary:\n"
37382  printf "* Cores to use:   $JOBS\n"
37383  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37384  printf "* ccache status:  $CCACHE_STATUS\n"
37385  printf "\n"
37386
37387  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37388    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37389    printf "$CCACHE_HELP_MSG\n"
37390
37391  # Print a helpful message on how to acquire the necessary build dependency.
37392  # ccache is the help tag: freetype, cups, pulse, alsa etc
37393  MISSING_DEPENDENCY=ccache
37394
37395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37396    cygwin_help $MISSING_DEPENDENCY
37397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37398    msys_help $MISSING_DEPENDENCY
37399  else
37400    PKGHANDLER_COMMAND=
37401
37402    case $PKGHANDLER in
37403      apt-get)
37404        apt_help     $MISSING_DEPENDENCY ;;
37405      yum)
37406        yum_help     $MISSING_DEPENDENCY ;;
37407      port)
37408        port_help    $MISSING_DEPENDENCY ;;
37409      pkgutil)
37410        pkgutil_help $MISSING_DEPENDENCY ;;
37411      pkgadd)
37412        pkgadd_help  $MISSING_DEPENDENCY ;;
37413      * )
37414        break ;;
37415    esac
37416
37417    if test "x$PKGHANDLER_COMMAND" != x; then
37418      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37419    fi
37420  fi
37421
37422    printf "$HELP_MSG\n"
37423    printf "\n"
37424  fi
37425
37426  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37427    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37428    printf "will result in longer build times.\n"
37429    printf "\n"
37430  fi
37431
37432  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37433    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37434    printf "These are not respected, and will be ignored. It is recommended\n"
37435    printf "that you clean your environment. The following variables are set:\n"
37436    printf "$FOUND_ALT_VARIABLES\n"
37437    printf "\n"
37438  fi
37439
37440  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37441    printf "WARNING: Your build output directory is not on a local disk.\n"
37442    printf "This will severely degrade build performance!\n"
37443    printf "It is recommended that you create an output directory on a local disk,\n"
37444    printf "and run the configure script again from that directory.\n"
37445    printf "\n"
37446  fi
37447
37448  if test "x$IS_RECONFIGURE" = "xyes"; then
37449    printf "WARNING: The result of this configuration has overridden an older\n"
37450    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37451    printf "proper build. Failure to do so might result in strange build problems.\n"
37452    printf "\n"
37453  fi
37454
37455