generated-configure.sh revision 934:0ff0275f3388
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=1389815815
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:ThreadStackSize=$STACK_SIZE" >&5
16078  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16079  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -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:ThreadStackSize=$STACK_SIZE"
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    # Disable special log output when a debug build is used as Boot JDK...
16092
16093  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16094  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16095  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16096  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16097  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16098  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16099    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16100    JVM_ARG_OK=true
16101  else
16102    $ECHO "Arg failed:" >&5
16103    $ECHO "$OUTPUT" >&5
16104    JVM_ARG_OK=false
16105  fi
16106
16107  fi
16108
16109  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16110
16111
16112
16113###############################################################################
16114#
16115# Configure the sources to use. We can add or override individual directories.
16116#
16117###############################################################################
16118
16119
16120  # Where are the sources. Any of these can be overridden
16121  # using --with-override-corba and the likes.
16122  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16123  CORBA_TOPDIR="$SRC_ROOT/corba"
16124  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16125  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16126  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16127  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16128  JDK_TOPDIR="$SRC_ROOT/jdk"
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139  ###############################################################################
16140  #
16141  # Pickup additional source for a component from outside of the source root
16142  # or override source for a component.
16143  #
16144
16145# Check whether --with-add-source-root was given.
16146if test "${with_add_source_root+set}" = set; then :
16147  withval=$with_add_source_root;
16148fi
16149
16150
16151
16152# Check whether --with-override-source-root was given.
16153if test "${with_override_source_root+set}" = set; then :
16154  withval=$with_override_source_root;
16155fi
16156
16157
16158
16159# Check whether --with-adds-and-overrides was given.
16160if test "${with_adds_and_overrides+set}" = set; then :
16161  withval=$with_adds_and_overrides;
16162fi
16163
16164
16165  if test "x$with_adds_and_overrides" != x; then
16166    with_add_source_root="$with_adds_and_overrides/adds"
16167    with_override_source_root="$with_adds_and_overrides/overrides"
16168  fi
16169
16170  if test "x$with_add_source_root" != x; then
16171    if ! test -d $with_add_source_root; then
16172      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16173    fi
16174    CURDIR="$PWD"
16175    cd "$with_add_source_root"
16176    ADD_SRC_ROOT="`pwd`"
16177    cd "$CURDIR"
16178    # Verify that the addon source root does not have any root makefiles.
16179    # If it does, then it is usually an error, prevent this.
16180    if test -f $with_add_source_root/langtools/make/Makefile; then
16181      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
16182    fi
16183    if test -f $with_add_source_root/corba/make/Makefile; then
16184      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
16185    fi
16186    if test -f $with_add_source_root/jaxp/make/Makefile; then
16187      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
16188    fi
16189    if test -f $with_add_source_root/jaxws/make/Makefile; then
16190      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
16191    fi
16192    if test -f $with_add_source_root/hotspot/make/Makefile; then
16193      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
16194    fi
16195    if test -f $with_add_source_root/nashorn/make/Makefile; then
16196      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
16197    fi
16198    if test -f $with_add_source_root/jdk/make/Makefile; then
16199      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
16200    fi
16201  fi
16202
16203
16204  if test "x$with_override_source_root" != x; then
16205    if ! test -d $with_override_source_root; then
16206      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16207    fi
16208    CURDIR="$PWD"
16209    cd "$with_override_source_root"
16210    OVERRIDE_SRC_ROOT="`pwd`"
16211    cd "$CURDIR"
16212    if test -f $with_override_source_root/langtools/make/Makefile; then
16213      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
16214    fi
16215    if test -f $with_override_source_root/corba/make/Makefile; then
16216      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
16217    fi
16218    if test -f $with_override_source_root/jaxp/make/Makefile; then
16219      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
16220    fi
16221    if test -f $with_override_source_root/jaxws/make/Makefile; then
16222      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
16223    fi
16224    if test -f $with_override_source_root/hotspot/make/Makefile; then
16225      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
16226    fi
16227    if test -f $with_override_source_root/nashorn/make/Makefile; then
16228      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
16229    fi
16230    if test -f $with_override_source_root/jdk/make/Makefile; then
16231      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
16232    fi
16233  fi
16234
16235
16236  ###############################################################################
16237  #
16238  # Override a repo completely, this is used for example when you have 3 small
16239  # development sandboxes of the langtools sources and want to avoid having 3 full
16240  # OpenJDK sources checked out on disk.
16241  #
16242  # Assuming that the 3 langtools sandboxes are located here:
16243  # /home/fredrik/sandbox1/langtools
16244  # /home/fredrik/sandbox2/langtools
16245  # /home/fredrik/sandbox3/langtools
16246  #
16247  # From the source root you create build subdirs manually:
16248  #     mkdir -p build1 build2 build3
16249  # in each build directory run:
16250  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16251  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16252  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16253  #
16254
16255
16256# Check whether --with-override-langtools was given.
16257if test "${with_override_langtools+set}" = set; then :
16258  withval=$with_override_langtools;
16259fi
16260
16261
16262
16263# Check whether --with-override-corba was given.
16264if test "${with_override_corba+set}" = set; then :
16265  withval=$with_override_corba;
16266fi
16267
16268
16269
16270# Check whether --with-override-jaxp was given.
16271if test "${with_override_jaxp+set}" = set; then :
16272  withval=$with_override_jaxp;
16273fi
16274
16275
16276
16277# Check whether --with-override-jaxws was given.
16278if test "${with_override_jaxws+set}" = set; then :
16279  withval=$with_override_jaxws;
16280fi
16281
16282
16283
16284# Check whether --with-override-hotspot was given.
16285if test "${with_override_hotspot+set}" = set; then :
16286  withval=$with_override_hotspot;
16287fi
16288
16289
16290
16291# Check whether --with-override-nashorn was given.
16292if test "${with_override_nashorn+set}" = set; then :
16293  withval=$with_override_nashorn;
16294fi
16295
16296
16297
16298# Check whether --with-override-jdk was given.
16299if test "${with_override_jdk+set}" = set; then :
16300  withval=$with_override_jdk;
16301fi
16302
16303
16304  if test "x$with_override_langtools" != x; then
16305    CURDIR="$PWD"
16306    cd "$with_override_langtools"
16307    LANGTOOLS_TOPDIR="`pwd`"
16308    cd "$CURDIR"
16309    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16310      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16311    fi
16312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16313$as_echo_n "checking if langtools should be overridden... " >&6; }
16314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16315$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16316  fi
16317  if test "x$with_override_corba" != x; then
16318    CURDIR="$PWD"
16319    cd "$with_override_corba"
16320    CORBA_TOPDIR="`pwd`"
16321    cd "$CURDIR"
16322    if ! test -f $CORBA_TOPDIR/make/Makefile; then
16323      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16324    fi
16325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16326$as_echo_n "checking if corba should be overridden... " >&6; }
16327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16328$as_echo "yes with $CORBA_TOPDIR" >&6; }
16329  fi
16330  if test "x$with_override_jaxp" != x; then
16331    CURDIR="$PWD"
16332    cd "$with_override_jaxp"
16333    JAXP_TOPDIR="`pwd`"
16334    cd "$CURDIR"
16335    if ! test -f $JAXP_TOPDIR/make/Makefile; then
16336      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16337    fi
16338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16339$as_echo_n "checking if jaxp should be overridden... " >&6; }
16340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16341$as_echo "yes with $JAXP_TOPDIR" >&6; }
16342  fi
16343  if test "x$with_override_jaxws" != x; then
16344    CURDIR="$PWD"
16345    cd "$with_override_jaxws"
16346    JAXWS_TOPDIR="`pwd`"
16347    cd "$CURDIR"
16348    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16349      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16350    fi
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16352$as_echo_n "checking if jaxws should be overridden... " >&6; }
16353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16354$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16355  fi
16356  if test "x$with_override_hotspot" != x; then
16357    CURDIR="$PWD"
16358    cd "$with_override_hotspot"
16359    HOTSPOT_TOPDIR="`pwd`"
16360    cd "$CURDIR"
16361    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16362      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16363    fi
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16365$as_echo_n "checking if hotspot should be overridden... " >&6; }
16366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16367$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16368  fi
16369  if test "x$with_override_nashorn" != x; then
16370    CURDIR="$PWD"
16371    cd "$with_override_nashorn"
16372    NASHORN_TOPDIR="`pwd`"
16373    cd "$CURDIR"
16374    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16375      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16376    fi
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16378$as_echo_n "checking if nashorn should be overridden... " >&6; }
16379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16380$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16381  fi
16382  if test "x$with_override_jdk" != x; then
16383    CURDIR="$PWD"
16384    cd "$with_override_jdk"
16385    JDK_TOPDIR="`pwd`"
16386    cd "$CURDIR"
16387    if ! test -f $JDK_TOPDIR/make/Makefile; then
16388      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16389    fi
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16391$as_echo_n "checking if JDK should be overridden... " >&6; }
16392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16393$as_echo "yes with $JDK_TOPDIR" >&6; }
16394  fi
16395
16396
16397  BUILD_OUTPUT="$OUTPUT_ROOT"
16398
16399
16400  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16401  BUILD_HOTSPOT=true
16402
16403
16404
16405# Check whether --with-import-hotspot was given.
16406if test "${with_import_hotspot+set}" = set; then :
16407  withval=$with_import_hotspot;
16408fi
16409
16410  if test "x$with_import_hotspot" != x; then
16411    CURDIR="$PWD"
16412    cd "$with_import_hotspot"
16413    HOTSPOT_DIST="`pwd`"
16414    cd "$CURDIR"
16415    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16416      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16417    fi
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16419$as_echo_n "checking if hotspot should be imported... " >&6; }
16420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16421$as_echo "yes from $HOTSPOT_DIST" >&6; }
16422    BUILD_HOTSPOT=false
16423  fi
16424
16425  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16426
16427
16428###############################################################################
16429#
16430# Setup the toolchain (compilers etc), i.e. the tools that need to be
16431# cross-compilation aware.
16432#
16433###############################################################################
16434
16435
16436  ###############################################################################
16437  #
16438  # Configure the development tool paths and potential sysroot.
16439  #
16440  ac_ext=cpp
16441ac_cpp='$CXXCPP $CPPFLAGS'
16442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16445
16446
16447  # The option used to specify the target .o,.a or .so file.
16448  # When compiling, how to specify the to be created object file.
16449  CC_OUT_OPTION='-o$(SPACE)'
16450  # When linking, how to specify the to be created executable.
16451  EXE_OUT_OPTION='-o$(SPACE)'
16452  # When linking, how to specify the to be created dynamically linkable library.
16453  LD_OUT_OPTION='-o$(SPACE)'
16454  # When archiving, how to specify the to be create static archive for object files.
16455  AR_OUT_OPTION='rcs$(SPACE)'
16456
16457
16458
16459
16460
16461# Locate the actual tools
16462
16463
16464# Check whether --with-jtreg was given.
16465if test "${with_jtreg+set}" = set; then :
16466  withval=$with_jtreg;
16467else
16468  with_jtreg=no
16469fi
16470
16471
16472  if test "x$with_jtreg" = xno; then
16473    # jtreg disabled
16474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16475$as_echo_n "checking for jtreg... " >&6; }
16476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477$as_echo "no" >&6; }
16478  else
16479    if test "x$with_jtreg" != xyes; then
16480      # with path specified.
16481      JT_HOME="$with_jtreg"
16482    fi
16483
16484    if test "x$JT_HOME" != x; then
16485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16486$as_echo_n "checking for jtreg... " >&6; }
16487
16488      # use JT_HOME enviroment var.
16489
16490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16491
16492  # Input might be given as Windows format, start by converting to
16493  # unix format.
16494  path="$JT_HOME"
16495  new_path=`$CYGPATH -u "$path"`
16496
16497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16500  # "foo.exe" is OK but "foo" is an error.
16501  #
16502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16503  # It is also a way to make sure we got the proper file name for the real test later on.
16504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16505  if test "x$test_shortpath" = x; then
16506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16507$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16508    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16509  fi
16510
16511  # Call helper function which possibly converts this using DOS-style short mode.
16512  # If so, the updated path is stored in $new_path.
16513
16514  input_path="$new_path"
16515  # Check if we need to convert this using DOS-style short mode. If the path
16516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16517  # take no chances and rewrite it.
16518  # Note: m4 eats our [], so we need to use [ and ] instead.
16519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16520  if test "x$has_forbidden_chars" != x; then
16521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16525      # Going to short mode and back again did indeed matter. Since short mode is
16526      # case insensitive, let's make it lowercase to improve readability.
16527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16528      # Now convert it back to Unix-stile (cygpath)
16529      input_path=`$CYGPATH -u "$shortmode_path"`
16530      new_path="$input_path"
16531    fi
16532  fi
16533
16534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16535  if test "x$test_cygdrive_prefix" = x; then
16536    # As a simple fix, exclude /usr/bin since it's not a real path.
16537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16539      # a path prefixed by /cygdrive for fixpath to work.
16540      new_path="$CYGWIN_ROOT_PATH$input_path"
16541    fi
16542  fi
16543
16544
16545  if test "x$path" != "x$new_path"; then
16546    JT_HOME="$new_path"
16547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16548$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16549  fi
16550
16551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16552
16553  path="$JT_HOME"
16554  has_colon=`$ECHO $path | $GREP ^.:`
16555  new_path="$path"
16556  if test "x$has_colon" = x; then
16557    # Not in mixed or Windows style, start by that.
16558    new_path=`cmd //c echo $path`
16559  fi
16560
16561
16562  input_path="$new_path"
16563  # Check if we need to convert this using DOS-style short mode. If the path
16564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16565  # take no chances and rewrite it.
16566  # Note: m4 eats our [], so we need to use [ and ] instead.
16567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16568  if test "x$has_forbidden_chars" != x; then
16569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16571  fi
16572
16573
16574  windows_path="$new_path"
16575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16576    unix_path=`$CYGPATH -u "$windows_path"`
16577    new_path="$unix_path"
16578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16580    new_path="$unix_path"
16581  fi
16582
16583  if test "x$path" != "x$new_path"; then
16584    JT_HOME="$new_path"
16585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16586$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16587  fi
16588
16589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16591
16592  else
16593    # We're on a posix platform. Hooray! :)
16594    path="$JT_HOME"
16595    has_space=`$ECHO "$path" | $GREP " "`
16596    if test "x$has_space" != x; then
16597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16598$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16599      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16600    fi
16601
16602    # Use eval to expand a potential ~
16603    eval path="$path"
16604    if test ! -f "$path" && test ! -d "$path"; then
16605      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16606    fi
16607
16608    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16609  fi
16610
16611
16612      # jtreg win32 script works for everybody
16613      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16614
16615      if test ! -f "$JTREGEXE"; then
16616        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16617      fi
16618
16619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16620$as_echo "$JTREGEXE" >&6; }
16621    else
16622      # try to find jtreg on path
16623
16624  for ac_prog in jtreg
16625do
16626  # Extract the first word of "$ac_prog", so it can be a program name with args.
16627set dummy $ac_prog; ac_word=$2
16628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16629$as_echo_n "checking for $ac_word... " >&6; }
16630if ${ac_cv_path_JTREGEXE+:} false; then :
16631  $as_echo_n "(cached) " >&6
16632else
16633  case $JTREGEXE in
16634  [\\/]* | ?:[\\/]*)
16635  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16636  ;;
16637  *)
16638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16639for as_dir in $PATH
16640do
16641  IFS=$as_save_IFS
16642  test -z "$as_dir" && as_dir=.
16643    for ac_exec_ext in '' $ac_executable_extensions; do
16644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16645    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16647    break 2
16648  fi
16649done
16650  done
16651IFS=$as_save_IFS
16652
16653  ;;
16654esac
16655fi
16656JTREGEXE=$ac_cv_path_JTREGEXE
16657if test -n "$JTREGEXE"; then
16658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16659$as_echo "$JTREGEXE" >&6; }
16660else
16661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16662$as_echo "no" >&6; }
16663fi
16664
16665
16666  test -n "$JTREGEXE" && break
16667done
16668
16669
16670  if test "x$JTREGEXE" = x; then
16671    if test "xjtreg" = x; then
16672      PROG_NAME=jtregexe
16673    else
16674      PROG_NAME=jtreg
16675    fi
16676    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16677$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16678    as_fn_error $? "Cannot continue" "$LINENO" 5
16679  fi
16680
16681
16682      JT_HOME="`$DIRNAME $JTREGEXE`"
16683    fi
16684  fi
16685
16686
16687
16688
16689
16690  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16691
16692  # Store path to cygwin link.exe to help excluding it when searching for
16693  # VS linker. This must be done before changing the PATH when looking for VS.
16694  # Extract the first word of "link", so it can be a program name with args.
16695set dummy link; ac_word=$2
16696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16697$as_echo_n "checking for $ac_word... " >&6; }
16698if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16699  $as_echo_n "(cached) " >&6
16700else
16701  case $CYGWIN_LINK in
16702  [\\/]* | ?:[\\/]*)
16703  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16704  ;;
16705  *)
16706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16707for as_dir in $PATH
16708do
16709  IFS=$as_save_IFS
16710  test -z "$as_dir" && as_dir=.
16711    for ac_exec_ext in '' $ac_executable_extensions; do
16712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16713    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16715    break 2
16716  fi
16717done
16718  done
16719IFS=$as_save_IFS
16720
16721  ;;
16722esac
16723fi
16724CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16725if test -n "$CYGWIN_LINK"; then
16726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16727$as_echo "$CYGWIN_LINK" >&6; }
16728else
16729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16730$as_echo "no" >&6; }
16731fi
16732
16733
16734  if test "x$CYGWIN_LINK" != x; then
16735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16736$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16737    "$CYGWIN_LINK" --version > /dev/null
16738    if test $? -eq 0 ; then
16739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16740$as_echo "yes" >&6; }
16741    else
16742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16743$as_echo "no" >&6; }
16744      # This might be the VS linker. Don't exclude it later on.
16745      CYGWIN_LINK=""
16746    fi
16747  fi
16748
16749  # First-hand choice is to locate and run the vsvars bat file.
16750
16751  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16752    VCVARSFILE="vc/bin/vcvars32.bat"
16753  else
16754    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16755  fi
16756
16757  VS_ENV_CMD=""
16758  VS_ENV_ARGS=""
16759  if test "x$with_toolsdir" != x; then
16760
16761  if test "x$VS_ENV_CMD" = x; then
16762    VS100BASE="$with_toolsdir/../.."
16763    METHOD="--with-tools-dir"
16764
16765  windows_path="$VS100BASE"
16766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16767    unix_path=`$CYGPATH -u "$windows_path"`
16768    VS100BASE="$unix_path"
16769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16771    VS100BASE="$unix_path"
16772  fi
16773
16774    if test -d "$VS100BASE"; then
16775      if test -f "$VS100BASE/$VCVARSFILE"; then
16776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16777$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16778        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16779      else
16780        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16781$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16782        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16783$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16784      fi
16785    fi
16786  fi
16787
16788  fi
16789
16790  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16791    # Having specified an argument which is incorrect will produce an instant failure;
16792    # we should not go on looking
16793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16794$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16795    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16796$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16797    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16798  fi
16799
16800  if test "x$VS100COMNTOOLS" != x; then
16801
16802  if test "x$VS_ENV_CMD" = x; then
16803    VS100BASE="$VS100COMNTOOLS/../.."
16804    METHOD="VS100COMNTOOLS variable"
16805
16806  windows_path="$VS100BASE"
16807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16808    unix_path=`$CYGPATH -u "$windows_path"`
16809    VS100BASE="$unix_path"
16810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16812    VS100BASE="$unix_path"
16813  fi
16814
16815    if test -d "$VS100BASE"; then
16816      if test -f "$VS100BASE/$VCVARSFILE"; then
16817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16818$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16819        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16820      else
16821        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16822$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16823        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16824$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16825      fi
16826    fi
16827  fi
16828
16829  fi
16830  if test "x$PROGRAMFILES" != x; then
16831
16832  if test "x$VS_ENV_CMD" = x; then
16833    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16834    METHOD="well-known name"
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
16861  if test "x$VS_ENV_CMD" = x; then
16862    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16863    METHOD="well-known name"
16864
16865  windows_path="$VS100BASE"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    VS100BASE="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    VS100BASE="$unix_path"
16872  fi
16873
16874    if test -d "$VS100BASE"; then
16875      if test -f "$VS100BASE/$VCVARSFILE"; then
16876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16877$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16878        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16879      else
16880        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16881$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16882        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16883$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16884      fi
16885    fi
16886  fi
16887
16888
16889  if test "x$VS_ENV_CMD" = x; then
16890    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16891    METHOD="well-known name"
16892
16893  windows_path="$VS100BASE"
16894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16895    unix_path=`$CYGPATH -u "$windows_path"`
16896    VS100BASE="$unix_path"
16897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16899    VS100BASE="$unix_path"
16900  fi
16901
16902    if test -d "$VS100BASE"; then
16903      if test -f "$VS100BASE/$VCVARSFILE"; then
16904        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16905$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16906        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16907      else
16908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16909$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16911$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16912      fi
16913    fi
16914  fi
16915
16916
16917  if test "x$ProgramW6432" != x; then
16918
16919  if test "x$VS_ENV_CMD" = x; then
16920    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16921    METHOD="well-known name"
16922
16923  windows_path="$WIN_SDK_BASE"
16924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16925    unix_path=`$CYGPATH -u "$windows_path"`
16926    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
16930  fi
16931
16932    if test -d "$WIN_SDK_BASE"; then
16933      # There have been cases of partial or broken SDK installations. A missing
16934      # lib dir is not going to work.
16935      if test ! -d "$WIN_SDK_BASE/../lib"; then
16936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16937$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16938        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16939$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16940      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16941        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16942$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16943        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16944        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16945          VS_ENV_ARGS="/x86"
16946        else
16947          VS_ENV_ARGS="/x64"
16948        fi
16949      else
16950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16951$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16952        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16953$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16954      fi
16955    fi
16956  fi
16957
16958  fi
16959  if test "x$PROGRAMW6432" != x; then
16960
16961  if test "x$VS_ENV_CMD" = x; then
16962    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16963    METHOD="well-known name"
16964
16965  windows_path="$WIN_SDK_BASE"
16966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16967    unix_path=`$CYGPATH -u "$windows_path"`
16968    WIN_SDK_BASE="$unix_path"
16969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16971    WIN_SDK_BASE="$unix_path"
16972  fi
16973
16974    if test -d "$WIN_SDK_BASE"; then
16975      # There have been cases of partial or broken SDK installations. A missing
16976      # lib dir is not going to work.
16977      if test ! -d "$WIN_SDK_BASE/../lib"; then
16978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16979$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16981$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16982      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16984$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16985        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16986        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16987          VS_ENV_ARGS="/x86"
16988        else
16989          VS_ENV_ARGS="/x64"
16990        fi
16991      else
16992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16993$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16995$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16996      fi
16997    fi
16998  fi
16999
17000  fi
17001  if test "x$PROGRAMFILES" != x; then
17002
17003  if test "x$VS_ENV_CMD" = x; then
17004    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17005    METHOD="well-known name"
17006
17007  windows_path="$WIN_SDK_BASE"
17008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17009    unix_path=`$CYGPATH -u "$windows_path"`
17010    WIN_SDK_BASE="$unix_path"
17011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17013    WIN_SDK_BASE="$unix_path"
17014  fi
17015
17016    if test -d "$WIN_SDK_BASE"; then
17017      # There have been cases of partial or broken SDK installations. A missing
17018      # lib dir is not going to work.
17019      if test ! -d "$WIN_SDK_BASE/../lib"; then
17020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17023$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17024      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17026$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17027        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17028        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17029          VS_ENV_ARGS="/x86"
17030        else
17031          VS_ENV_ARGS="/x64"
17032        fi
17033      else
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17035$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17036        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17037$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17038      fi
17039    fi
17040  fi
17041
17042  fi
17043
17044  if test "x$VS_ENV_CMD" = x; then
17045    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17046    METHOD="well-known name"
17047
17048  windows_path="$WIN_SDK_BASE"
17049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17050    unix_path=`$CYGPATH -u "$windows_path"`
17051    WIN_SDK_BASE="$unix_path"
17052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17054    WIN_SDK_BASE="$unix_path"
17055  fi
17056
17057    if test -d "$WIN_SDK_BASE"; then
17058      # There have been cases of partial or broken SDK installations. A missing
17059      # lib dir is not going to work.
17060      if test ! -d "$WIN_SDK_BASE/../lib"; then
17061        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17062$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17063        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17064$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17065      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17066        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17067$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17068        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17069        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17070          VS_ENV_ARGS="/x86"
17071        else
17072          VS_ENV_ARGS="/x64"
17073        fi
17074      else
17075        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17076$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17077        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17078$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17079      fi
17080    fi
17081  fi
17082
17083
17084  if test "x$VS_ENV_CMD" = x; then
17085    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17086    METHOD="well-known name"
17087
17088  windows_path="$WIN_SDK_BASE"
17089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17090    unix_path=`$CYGPATH -u "$windows_path"`
17091    WIN_SDK_BASE="$unix_path"
17092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17094    WIN_SDK_BASE="$unix_path"
17095  fi
17096
17097    if test -d "$WIN_SDK_BASE"; then
17098      # There have been cases of partial or broken SDK installations. A missing
17099      # lib dir is not going to work.
17100      if test ! -d "$WIN_SDK_BASE/../lib"; then
17101        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17102$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17103        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17104$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17105      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17108        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17109        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17110          VS_ENV_ARGS="/x86"
17111        else
17112          VS_ENV_ARGS="/x64"
17113        fi
17114      else
17115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17118$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17119      fi
17120    fi
17121  fi
17122
17123
17124  if test "x$VS_ENV_CMD" != x; then
17125    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17126
17127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17128
17129  # First separate the path from the arguments. This will split at the first
17130  # space.
17131  complete="$VS_ENV_CMD"
17132  path="${complete%% *}"
17133  tmp="$complete EOL"
17134  arguments="${tmp#* }"
17135
17136  # Input might be given as Windows format, start by converting to
17137  # unix format.
17138  new_path=`$CYGPATH -u "$path"`
17139
17140  # Now try to locate executable using which
17141  new_path=`$WHICH "$new_path" 2> /dev/null`
17142  # bat and cmd files are not always considered executable in cygwin causing which
17143  # to not find them
17144  if test "x$new_path" = x \
17145      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17146      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17147    new_path=`$CYGPATH -u "$path"`
17148  fi
17149  if test "x$new_path" = x; then
17150    # Oops. Which didn't find the executable.
17151    # The splitting of arguments from the executable at a space might have been incorrect,
17152    # since paths with space are more likely in Windows. Give it another try with the whole
17153    # argument.
17154    path="$complete"
17155    arguments="EOL"
17156    new_path=`$CYGPATH -u "$path"`
17157    new_path=`$WHICH "$new_path" 2> /dev/null`
17158    # bat and cmd files are not always considered executable in cygwin causing which
17159    # to not find them
17160    if test "x$new_path" = x \
17161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17163      new_path=`$CYGPATH -u "$path"`
17164    fi
17165    if test "x$new_path" = x; then
17166      # It's still not found. Now this is an unrecoverable error.
17167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17168$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17169      has_space=`$ECHO "$complete" | $GREP " "`
17170      if test "x$has_space" != x; then
17171        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17172$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17173      fi
17174      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17175    fi
17176  fi
17177
17178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17181  # "foo.exe" is OK but "foo" is an error.
17182  #
17183  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17184  # It is also a way to make sure we got the proper file name for the real test later on.
17185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17186  if test "x$test_shortpath" = x; then
17187    # Short path failed, file does not exist as specified.
17188    # Try adding .exe or .cmd
17189    if test -f "${new_path}.exe"; then
17190      input_to_shortpath="${new_path}.exe"
17191    elif test -f "${new_path}.cmd"; then
17192      input_to_shortpath="${new_path}.cmd"
17193    else
17194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17195$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17196      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17197$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17198      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17199    fi
17200  else
17201    input_to_shortpath="$new_path"
17202  fi
17203
17204  # Call helper function which possibly converts this using DOS-style short mode.
17205  # If so, the updated path is stored in $new_path.
17206  new_path="$input_to_shortpath"
17207
17208  input_path="$input_to_shortpath"
17209  # Check if we need to convert this using DOS-style short mode. If the path
17210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17211  # take no chances and rewrite it.
17212  # Note: m4 eats our [], so we need to use [ and ] instead.
17213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17214  if test "x$has_forbidden_chars" != x; then
17215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17219      # Going to short mode and back again did indeed matter. Since short mode is
17220      # case insensitive, let's make it lowercase to improve readability.
17221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17222      # Now convert it back to Unix-stile (cygpath)
17223      input_path=`$CYGPATH -u "$shortmode_path"`
17224      new_path="$input_path"
17225    fi
17226  fi
17227
17228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17229  if test "x$test_cygdrive_prefix" = x; then
17230    # As a simple fix, exclude /usr/bin since it's not a real path.
17231    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17233      # a path prefixed by /cygdrive for fixpath to work.
17234      new_path="$CYGWIN_ROOT_PATH$input_path"
17235    fi
17236  fi
17237
17238  # remove trailing .exe if any
17239  new_path="${new_path/%.exe/}"
17240
17241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17242
17243  # First separate the path from the arguments. This will split at the first
17244  # space.
17245  complete="$VS_ENV_CMD"
17246  path="${complete%% *}"
17247  tmp="$complete EOL"
17248  arguments="${tmp#* }"
17249
17250  # Input might be given as Windows format, start by converting to
17251  # unix format.
17252  new_path="$path"
17253
17254  windows_path="$new_path"
17255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17256    unix_path=`$CYGPATH -u "$windows_path"`
17257    new_path="$unix_path"
17258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17260    new_path="$unix_path"
17261  fi
17262
17263
17264  # Now try to locate executable using which
17265  new_path=`$WHICH "$new_path" 2> /dev/null`
17266
17267  if test "x$new_path" = x; then
17268    # Oops. Which didn't find the executable.
17269    # The splitting of arguments from the executable at a space might have been incorrect,
17270    # since paths with space are more likely in Windows. Give it another try with the whole
17271    # argument.
17272    path="$complete"
17273    arguments="EOL"
17274    new_path="$path"
17275
17276  windows_path="$new_path"
17277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17278    unix_path=`$CYGPATH -u "$windows_path"`
17279    new_path="$unix_path"
17280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17282    new_path="$unix_path"
17283  fi
17284
17285
17286    new_path=`$WHICH "$new_path" 2> /dev/null`
17287
17288    if test "x$new_path" = x; then
17289      # It's still not found. Now this is an unrecoverable error.
17290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17291$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17292      has_space=`$ECHO "$complete" | $GREP " "`
17293      if test "x$has_space" != x; then
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17296      fi
17297      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17298    fi
17299  fi
17300
17301  # Now new_path has a complete unix path to the binary
17302  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17303    # Keep paths in /bin as-is, but remove trailing .exe if any
17304    new_path="${new_path/%.exe/}"
17305    # Do not save /bin paths to all_fixpath_prefixes!
17306  else
17307    # Not in mixed or Windows style, start by that.
17308    new_path=`cmd //c echo $new_path`
17309
17310  input_path="$new_path"
17311  # Check if we need to convert this using DOS-style short mode. If the path
17312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17313  # take no chances and rewrite it.
17314  # Note: m4 eats our [], so we need to use [ and ] instead.
17315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17316  if test "x$has_forbidden_chars" != x; then
17317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17319  fi
17320
17321    # Output is in $new_path
17322
17323  windows_path="$new_path"
17324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17325    unix_path=`$CYGPATH -u "$windows_path"`
17326    new_path="$unix_path"
17327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17329    new_path="$unix_path"
17330  fi
17331
17332    # remove trailing .exe if any
17333    new_path="${new_path/%.exe/}"
17334
17335    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17336    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17337  fi
17338
17339  else
17340    # We're on a posix platform. Hooray! :)
17341    # First separate the path from the arguments. This will split at the first
17342    # space.
17343    complete="$VS_ENV_CMD"
17344    path="${complete%% *}"
17345    tmp="$complete EOL"
17346    arguments="${tmp#* }"
17347
17348    # Cannot rely on the command "which" here since it doesn't always work.
17349    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17350    if test -z "$is_absolute_path"; then
17351      # Path to executable is not absolute. Find it.
17352      IFS_save="$IFS"
17353      IFS=:
17354      for p in $PATH; do
17355        if test -f "$p/$path" && test -x "$p/$path"; then
17356          new_path="$p/$path"
17357          break
17358        fi
17359      done
17360      IFS="$IFS_save"
17361    else
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17363$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17364      new_path="$path"
17365    fi
17366
17367    if test "x$new_path" = x; then
17368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17369$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17370      has_space=`$ECHO "$complete" | $GREP " "`
17371      if test "x$has_space" != x; then
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17373$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17374      fi
17375      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17376    fi
17377  fi
17378
17379  # Now join together the path and the arguments once again
17380  if test "x$arguments" != xEOL; then
17381    new_complete="$new_path ${arguments% *}"
17382  else
17383    new_complete="$new_path"
17384  fi
17385
17386  if test "x$complete" != "x$new_complete"; then
17387    VS_ENV_CMD="$new_complete"
17388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17389$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17390  fi
17391
17392
17393    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17394    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17395$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17396    cd $OUTPUT_ROOT
17397    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17398    # to autoconf standards.
17399
17400    #----
17401
17402    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17403    # but calculate the difference in Cygwin environment before/after running it and then
17404    # apply the diff.
17405
17406    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17407      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17408      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17409      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17410    else
17411      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17412      _dosbash=`cmd //c echo \`which bash\``
17413    fi
17414
17415    # generate the set of exported vars before/after the vs10 setup
17416    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17417    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17418    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17419    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17420
17421    # Now execute the newly created bat file.
17422    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17423    cmd /c localdevenvtmp.bat | cat
17424
17425    # apply the diff (less some non-vs10 vars named by "!")
17426    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17427    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17428    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17429
17430    # cleanup
17431    $RM localdevenvtmp*
17432    #----
17433    cd $CURDIR
17434    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17436$as_echo "no" >&6; }
17437      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17438$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17439      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17440$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17441      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17442$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17443      as_fn_error $? "Cannot continue" "$LINENO" 5
17444    fi
17445
17446    # Now set all paths and other env variables. This will allow the rest of
17447    # the configure script to find and run the compiler in the proper way.
17448    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17449$as_echo "$as_me: Setting extracted environment variables" >&6;}
17450    . $OUTPUT_ROOT/localdevenv.sh
17451  else
17452    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17453    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17454$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17455  fi
17456
17457  # At this point, we should have corrent variables in the environment, or we can't continue.
17458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17459$as_echo_n "checking for Visual Studio variables... " >&6; }
17460
17461  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17462    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17464$as_echo "present but broken" >&6; }
17465      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17466    else
17467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17468$as_echo "ok" >&6; }
17469      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17470      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17471      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17472      # Remove any paths containing # (typically F#) as that messes up make
17473      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17474      VS_PATH="$PATH"
17475
17476
17477
17478    fi
17479  else
17480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17481$as_echo "not found" >&6; }
17482
17483    if test "x$VS_ENV_CMD" = x; then
17484      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17485$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17486      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17487$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17488    else
17489      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17490$as_echo "$as_me: Running the extraction script failed." >&6;}
17491    fi
17492    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17493$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17494    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17495$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17496    as_fn_error $? "Cannot continue" "$LINENO" 5
17497  fi
17498
17499
17500
17501# Check whether --with-msvcr-dll was given.
17502if test "${with_msvcr_dll+set}" = set; then :
17503  withval=$with_msvcr_dll;
17504fi
17505
17506
17507  if test "x$with_msvcr_dll" != x; then
17508    # If given explicitely by user, do not probe. If not present, fail directly.
17509
17510  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17511  METHOD="--with-msvcr-dll"
17512  if test -e "$POSSIBLE_MSVCR_DLL"; then
17513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17514$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17515
17516    # Need to check if the found msvcr is correct architecture
17517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17518$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17519    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17520    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17521      CORRECT_MSVCR_ARCH=386
17522    else
17523      CORRECT_MSVCR_ARCH=x86-64
17524    fi
17525    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17527$as_echo "ok" >&6; }
17528      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17529      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17530$as_echo_n "checking for msvcr100.dll... " >&6; }
17531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17532$as_echo "$MSVCR_DLL" >&6; }
17533    else
17534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17535$as_echo "incorrect, ignoring" >&6; }
17536      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17537$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17538    fi
17539  fi
17540
17541    if test "x$MSVCR_DLL" = x; then
17542      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17543    fi
17544  fi
17545
17546  if test "x$MSVCR_DLL" = x; then
17547    # Probe: Using well-known location from Visual Studio 10.0
17548    if test "x$VCINSTALLDIR" != x; then
17549      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17550
17551  windows_path="$CYGWIN_VC_INSTALL_DIR"
17552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17553    unix_path=`$CYGPATH -u "$windows_path"`
17554    CYGWIN_VC_INSTALL_DIR="$unix_path"
17555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17557    CYGWIN_VC_INSTALL_DIR="$unix_path"
17558  fi
17559
17560      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17561        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17562      else
17563        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17564      fi
17565
17566  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17567  METHOD="well-known location in VCINSTALLDIR"
17568  if test -e "$POSSIBLE_MSVCR_DLL"; then
17569    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17570$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17571
17572    # Need to check if the found msvcr is correct architecture
17573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17574$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17575    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17576    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17577      CORRECT_MSVCR_ARCH=386
17578    else
17579      CORRECT_MSVCR_ARCH=x86-64
17580    fi
17581    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17583$as_echo "ok" >&6; }
17584      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17586$as_echo_n "checking for msvcr100.dll... " >&6; }
17587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17588$as_echo "$MSVCR_DLL" >&6; }
17589    else
17590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17591$as_echo "incorrect, ignoring" >&6; }
17592      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17593$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17594    fi
17595  fi
17596
17597    fi
17598  fi
17599
17600  if test "x$MSVCR_DLL" = x; then
17601    # Probe: Check in the Boot JDK directory.
17602    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17603
17604  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17605  METHOD="well-known location in Boot JDK"
17606  if test -e "$POSSIBLE_MSVCR_DLL"; then
17607    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17608$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17609
17610    # Need to check if the found msvcr is correct architecture
17611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17612$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17613    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17614    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17615      CORRECT_MSVCR_ARCH=386
17616    else
17617      CORRECT_MSVCR_ARCH=x86-64
17618    fi
17619    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17621$as_echo "ok" >&6; }
17622      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17624$as_echo_n "checking for msvcr100.dll... " >&6; }
17625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17626$as_echo "$MSVCR_DLL" >&6; }
17627    else
17628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17629$as_echo "incorrect, ignoring" >&6; }
17630      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17631$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17632    fi
17633  fi
17634
17635  fi
17636
17637  if test "x$MSVCR_DLL" = x; then
17638    # Probe: Look in the Windows system32 directory
17639    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17640
17641  windows_path="$CYGWIN_SYSTEMROOT"
17642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17643    unix_path=`$CYGPATH -u "$windows_path"`
17644    CYGWIN_SYSTEMROOT="$unix_path"
17645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17647    CYGWIN_SYSTEMROOT="$unix_path"
17648  fi
17649
17650    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17651
17652  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17653  METHOD="well-known location in SYSTEMROOT"
17654  if test -e "$POSSIBLE_MSVCR_DLL"; then
17655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17656$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17657
17658    # Need to check if the found msvcr is correct architecture
17659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17660$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17661    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17662    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17663      CORRECT_MSVCR_ARCH=386
17664    else
17665      CORRECT_MSVCR_ARCH=x86-64
17666    fi
17667    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17668      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17669$as_echo "ok" >&6; }
17670      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17672$as_echo_n "checking for msvcr100.dll... " >&6; }
17673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17674$as_echo "$MSVCR_DLL" >&6; }
17675    else
17676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17677$as_echo "incorrect, ignoring" >&6; }
17678      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17679$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17680    fi
17681  fi
17682
17683  fi
17684
17685  if test "x$MSVCR_DLL" = x; then
17686    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17687    if test "x$VS100COMNTOOLS" != x; then
17688      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17689
17690  windows_path="$CYGWIN_VS_TOOLS_DIR"
17691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17692    unix_path=`$CYGPATH -u "$windows_path"`
17693    CYGWIN_VS_TOOLS_DIR="$unix_path"
17694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17696    CYGWIN_VS_TOOLS_DIR="$unix_path"
17697  fi
17698
17699      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17700        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17701      else
17702        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17703      fi
17704
17705  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17706  METHOD="search of VS100COMNTOOLS"
17707  if test -e "$POSSIBLE_MSVCR_DLL"; then
17708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17709$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17710
17711    # Need to check if the found msvcr is correct architecture
17712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17713$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17714    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17715    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17716      CORRECT_MSVCR_ARCH=386
17717    else
17718      CORRECT_MSVCR_ARCH=x86-64
17719    fi
17720    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17722$as_echo "ok" >&6; }
17723      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17725$as_echo_n "checking for msvcr100.dll... " >&6; }
17726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17727$as_echo "$MSVCR_DLL" >&6; }
17728    else
17729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17730$as_echo "incorrect, ignoring" >&6; }
17731      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17732$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17733    fi
17734  fi
17735
17736    fi
17737  fi
17738
17739  if test "x$MSVCR_DLL" = x; then
17740    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17741    # (This was the original behaviour; kept since it might turn up something)
17742    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17743      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17744        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17745      else
17746        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17747        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17748          # We're grasping at straws now...
17749          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17750        fi
17751      fi
17752
17753
17754  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17755  METHOD="search of VCINSTALLDIR"
17756  if test -e "$POSSIBLE_MSVCR_DLL"; then
17757    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17758$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17759
17760    # Need to check if the found msvcr is correct architecture
17761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17762$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17763    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17764    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17765      CORRECT_MSVCR_ARCH=386
17766    else
17767      CORRECT_MSVCR_ARCH=x86-64
17768    fi
17769    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17771$as_echo "ok" >&6; }
17772      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17774$as_echo_n "checking for msvcr100.dll... " >&6; }
17775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17776$as_echo "$MSVCR_DLL" >&6; }
17777    else
17778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17779$as_echo "incorrect, ignoring" >&6; }
17780      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17781$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17782    fi
17783  fi
17784
17785    fi
17786  fi
17787
17788  if test "x$MSVCR_DLL" = x; then
17789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17790$as_echo_n "checking for msvcr100.dll... " >&6; }
17791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17792$as_echo "no" >&6; }
17793    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17794  fi
17795
17796
17797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17798
17799  # Input might be given as Windows format, start by converting to
17800  # unix format.
17801  path="$MSVCR_DLL"
17802  new_path=`$CYGPATH -u "$path"`
17803
17804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17807  # "foo.exe" is OK but "foo" is an error.
17808  #
17809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17810  # It is also a way to make sure we got the proper file name for the real test later on.
17811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17812  if test "x$test_shortpath" = x; then
17813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17814$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17815    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17816  fi
17817
17818  # Call helper function which possibly converts this using DOS-style short mode.
17819  # If so, the updated path is stored in $new_path.
17820
17821  input_path="$new_path"
17822  # Check if we need to convert this using DOS-style short mode. If the path
17823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17824  # take no chances and rewrite it.
17825  # Note: m4 eats our [], so we need to use [ and ] instead.
17826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17827  if test "x$has_forbidden_chars" != x; then
17828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17832      # Going to short mode and back again did indeed matter. Since short mode is
17833      # case insensitive, let's make it lowercase to improve readability.
17834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17835      # Now convert it back to Unix-stile (cygpath)
17836      input_path=`$CYGPATH -u "$shortmode_path"`
17837      new_path="$input_path"
17838    fi
17839  fi
17840
17841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17842  if test "x$test_cygdrive_prefix" = x; then
17843    # As a simple fix, exclude /usr/bin since it's not a real path.
17844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17846      # a path prefixed by /cygdrive for fixpath to work.
17847      new_path="$CYGWIN_ROOT_PATH$input_path"
17848    fi
17849  fi
17850
17851
17852  if test "x$path" != "x$new_path"; then
17853    MSVCR_DLL="$new_path"
17854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17855$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17856  fi
17857
17858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17859
17860  path="$MSVCR_DLL"
17861  has_colon=`$ECHO $path | $GREP ^.:`
17862  new_path="$path"
17863  if test "x$has_colon" = x; then
17864    # Not in mixed or Windows style, start by that.
17865    new_path=`cmd //c echo $path`
17866  fi
17867
17868
17869  input_path="$new_path"
17870  # Check if we need to convert this using DOS-style short mode. If the path
17871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17872  # take no chances and rewrite it.
17873  # Note: m4 eats our [], so we need to use [ and ] instead.
17874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17875  if test "x$has_forbidden_chars" != x; then
17876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17878  fi
17879
17880
17881  windows_path="$new_path"
17882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17883    unix_path=`$CYGPATH -u "$windows_path"`
17884    new_path="$unix_path"
17885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17887    new_path="$unix_path"
17888  fi
17889
17890  if test "x$path" != "x$new_path"; then
17891    MSVCR_DLL="$new_path"
17892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17893$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17894  fi
17895
17896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17898
17899  else
17900    # We're on a posix platform. Hooray! :)
17901    path="$MSVCR_DLL"
17902    has_space=`$ECHO "$path" | $GREP " "`
17903    if test "x$has_space" != x; then
17904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17905$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17906      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17907    fi
17908
17909    # Use eval to expand a potential ~
17910    eval path="$path"
17911    if test ! -f "$path" && test ! -d "$path"; then
17912      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17913    fi
17914
17915    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17916  fi
17917
17918
17919
17920
17921# Check whether --with-dxsdk was given.
17922if test "${with_dxsdk+set}" = set; then :
17923  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
17924$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
17925fi
17926
17927
17928
17929
17930# Check whether --with-dxsdk-lib was given.
17931if test "${with_dxsdk_lib+set}" = set; then :
17932  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
17933$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
17934fi
17935
17936
17937
17938
17939# Check whether --with-dxsdk-include was given.
17940if test "${with_dxsdk_include+set}" = set; then :
17941  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
17942$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
17943fi
17944
17945
17946  fi
17947
17948
17949
17950  # If --build AND --host is set, then the configure script will find any
17951  # cross compilation tools in the PATH. Cross compilation tools
17952  # follows the cross compilation standard where they are prefixed with ${host}.
17953  # For example the binary i686-sun-solaris2.10-gcc
17954  # will cross compile for i686-sun-solaris2.10
17955  # If neither of build and host is not set, then build=host and the
17956  # default compiler found in the path will be used.
17957  # Setting only --host, does not seem to be really supported.
17958  # Please set both --build and --host if you want to cross compile.
17959
17960  if test "x$COMPILE_TYPE" = "xcross"; then
17961    # Now we to find a C/C++ compiler that can build executables for the build
17962    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17963    # once. Also, we need to do this before adding a tools dir to the path,
17964    # otherwise we might pick up cross-compilers which don't use standard naming.
17965    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17966    # to wait until they are properly discovered.
17967    for ac_prog in cl cc gcc
17968do
17969  # Extract the first word of "$ac_prog", so it can be a program name with args.
17970set dummy $ac_prog; ac_word=$2
17971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17972$as_echo_n "checking for $ac_word... " >&6; }
17973if ${ac_cv_path_BUILD_CC+:} false; then :
17974  $as_echo_n "(cached) " >&6
17975else
17976  case $BUILD_CC in
17977  [\\/]* | ?:[\\/]*)
17978  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17979  ;;
17980  *)
17981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17982for as_dir in $PATH
17983do
17984  IFS=$as_save_IFS
17985  test -z "$as_dir" && as_dir=.
17986    for ac_exec_ext in '' $ac_executable_extensions; do
17987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17988    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17990    break 2
17991  fi
17992done
17993  done
17994IFS=$as_save_IFS
17995
17996  ;;
17997esac
17998fi
17999BUILD_CC=$ac_cv_path_BUILD_CC
18000if test -n "$BUILD_CC"; then
18001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18002$as_echo "$BUILD_CC" >&6; }
18003else
18004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18005$as_echo "no" >&6; }
18006fi
18007
18008
18009  test -n "$BUILD_CC" && break
18010done
18011
18012
18013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18014
18015  # First separate the path from the arguments. This will split at the first
18016  # space.
18017  complete="$BUILD_CC"
18018  path="${complete%% *}"
18019  tmp="$complete EOL"
18020  arguments="${tmp#* }"
18021
18022  # Input might be given as Windows format, start by converting to
18023  # unix format.
18024  new_path=`$CYGPATH -u "$path"`
18025
18026  # Now try to locate executable using which
18027  new_path=`$WHICH "$new_path" 2> /dev/null`
18028  # bat and cmd files are not always considered executable in cygwin causing which
18029  # to not find them
18030  if test "x$new_path" = x \
18031      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18032      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18033    new_path=`$CYGPATH -u "$path"`
18034  fi
18035  if test "x$new_path" = x; then
18036    # Oops. Which didn't find the executable.
18037    # The splitting of arguments from the executable at a space might have been incorrect,
18038    # since paths with space are more likely in Windows. Give it another try with the whole
18039    # argument.
18040    path="$complete"
18041    arguments="EOL"
18042    new_path=`$CYGPATH -u "$path"`
18043    new_path=`$WHICH "$new_path" 2> /dev/null`
18044    # bat and cmd files are not always considered executable in cygwin causing which
18045    # to not find them
18046    if test "x$new_path" = x \
18047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18049      new_path=`$CYGPATH -u "$path"`
18050    fi
18051    if test "x$new_path" = x; then
18052      # It's still not found. Now this is an unrecoverable error.
18053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18054$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18055      has_space=`$ECHO "$complete" | $GREP " "`
18056      if test "x$has_space" != x; then
18057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18059      fi
18060      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18061    fi
18062  fi
18063
18064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18067  # "foo.exe" is OK but "foo" is an error.
18068  #
18069  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18070  # It is also a way to make sure we got the proper file name for the real test later on.
18071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18072  if test "x$test_shortpath" = x; then
18073    # Short path failed, file does not exist as specified.
18074    # Try adding .exe or .cmd
18075    if test -f "${new_path}.exe"; then
18076      input_to_shortpath="${new_path}.exe"
18077    elif test -f "${new_path}.cmd"; then
18078      input_to_shortpath="${new_path}.cmd"
18079    else
18080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18081$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18084      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18085    fi
18086  else
18087    input_to_shortpath="$new_path"
18088  fi
18089
18090  # Call helper function which possibly converts this using DOS-style short mode.
18091  # If so, the updated path is stored in $new_path.
18092  new_path="$input_to_shortpath"
18093
18094  input_path="$input_to_shortpath"
18095  # Check if we need to convert this using DOS-style short mode. If the path
18096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18097  # take no chances and rewrite it.
18098  # Note: m4 eats our [], so we need to use [ and ] instead.
18099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18100  if test "x$has_forbidden_chars" != x; then
18101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18105      # Going to short mode and back again did indeed matter. Since short mode is
18106      # case insensitive, let's make it lowercase to improve readability.
18107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18108      # Now convert it back to Unix-stile (cygpath)
18109      input_path=`$CYGPATH -u "$shortmode_path"`
18110      new_path="$input_path"
18111    fi
18112  fi
18113
18114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18115  if test "x$test_cygdrive_prefix" = x; then
18116    # As a simple fix, exclude /usr/bin since it's not a real path.
18117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18119      # a path prefixed by /cygdrive for fixpath to work.
18120      new_path="$CYGWIN_ROOT_PATH$input_path"
18121    fi
18122  fi
18123
18124  # remove trailing .exe if any
18125  new_path="${new_path/%.exe/}"
18126
18127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18128
18129  # First separate the path from the arguments. This will split at the first
18130  # space.
18131  complete="$BUILD_CC"
18132  path="${complete%% *}"
18133  tmp="$complete EOL"
18134  arguments="${tmp#* }"
18135
18136  # Input might be given as Windows format, start by converting to
18137  # unix format.
18138  new_path="$path"
18139
18140  windows_path="$new_path"
18141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18142    unix_path=`$CYGPATH -u "$windows_path"`
18143    new_path="$unix_path"
18144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18146    new_path="$unix_path"
18147  fi
18148
18149
18150  # Now try to locate executable using which
18151  new_path=`$WHICH "$new_path" 2> /dev/null`
18152
18153  if test "x$new_path" = x; then
18154    # Oops. Which didn't find the executable.
18155    # The splitting of arguments from the executable at a space might have been incorrect,
18156    # since paths with space are more likely in Windows. Give it another try with the whole
18157    # argument.
18158    path="$complete"
18159    arguments="EOL"
18160    new_path="$path"
18161
18162  windows_path="$new_path"
18163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18164    unix_path=`$CYGPATH -u "$windows_path"`
18165    new_path="$unix_path"
18166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18168    new_path="$unix_path"
18169  fi
18170
18171
18172    new_path=`$WHICH "$new_path" 2> /dev/null`
18173
18174    if test "x$new_path" = x; then
18175      # It's still not found. Now this is an unrecoverable error.
18176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18177$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18178      has_space=`$ECHO "$complete" | $GREP " "`
18179      if test "x$has_space" != x; then
18180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18182      fi
18183      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18184    fi
18185  fi
18186
18187  # Now new_path has a complete unix path to the binary
18188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18189    # Keep paths in /bin as-is, but remove trailing .exe if any
18190    new_path="${new_path/%.exe/}"
18191    # Do not save /bin paths to all_fixpath_prefixes!
18192  else
18193    # Not in mixed or Windows style, start by that.
18194    new_path=`cmd //c echo $new_path`
18195
18196  input_path="$new_path"
18197  # Check if we need to convert this using DOS-style short mode. If the path
18198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18199  # take no chances and rewrite it.
18200  # Note: m4 eats our [], so we need to use [ and ] instead.
18201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18202  if test "x$has_forbidden_chars" != x; then
18203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18205  fi
18206
18207    # Output is in $new_path
18208
18209  windows_path="$new_path"
18210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18211    unix_path=`$CYGPATH -u "$windows_path"`
18212    new_path="$unix_path"
18213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18215    new_path="$unix_path"
18216  fi
18217
18218    # remove trailing .exe if any
18219    new_path="${new_path/%.exe/}"
18220
18221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18223  fi
18224
18225  else
18226    # We're on a posix platform. Hooray! :)
18227    # First separate the path from the arguments. This will split at the first
18228    # space.
18229    complete="$BUILD_CC"
18230    path="${complete%% *}"
18231    tmp="$complete EOL"
18232    arguments="${tmp#* }"
18233
18234    # Cannot rely on the command "which" here since it doesn't always work.
18235    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18236    if test -z "$is_absolute_path"; then
18237      # Path to executable is not absolute. Find it.
18238      IFS_save="$IFS"
18239      IFS=:
18240      for p in $PATH; do
18241        if test -f "$p/$path" && test -x "$p/$path"; then
18242          new_path="$p/$path"
18243          break
18244        fi
18245      done
18246      IFS="$IFS_save"
18247    else
18248      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18249$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18250      new_path="$path"
18251    fi
18252
18253    if test "x$new_path" = x; then
18254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18255$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18256      has_space=`$ECHO "$complete" | $GREP " "`
18257      if test "x$has_space" != x; then
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18260      fi
18261      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18262    fi
18263  fi
18264
18265  # Now join together the path and the arguments once again
18266  if test "x$arguments" != xEOL; then
18267    new_complete="$new_path ${arguments% *}"
18268  else
18269    new_complete="$new_path"
18270  fi
18271
18272  if test "x$complete" != "x$new_complete"; then
18273    BUILD_CC="$new_complete"
18274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18275$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18276  fi
18277
18278    for ac_prog in cl CC g++
18279do
18280  # Extract the first word of "$ac_prog", so it can be a program name with args.
18281set dummy $ac_prog; ac_word=$2
18282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18283$as_echo_n "checking for $ac_word... " >&6; }
18284if ${ac_cv_path_BUILD_CXX+:} false; then :
18285  $as_echo_n "(cached) " >&6
18286else
18287  case $BUILD_CXX in
18288  [\\/]* | ?:[\\/]*)
18289  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18290  ;;
18291  *)
18292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18293for as_dir in $PATH
18294do
18295  IFS=$as_save_IFS
18296  test -z "$as_dir" && as_dir=.
18297    for ac_exec_ext in '' $ac_executable_extensions; do
18298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18299    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18301    break 2
18302  fi
18303done
18304  done
18305IFS=$as_save_IFS
18306
18307  ;;
18308esac
18309fi
18310BUILD_CXX=$ac_cv_path_BUILD_CXX
18311if test -n "$BUILD_CXX"; then
18312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18313$as_echo "$BUILD_CXX" >&6; }
18314else
18315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18316$as_echo "no" >&6; }
18317fi
18318
18319
18320  test -n "$BUILD_CXX" && break
18321done
18322
18323
18324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18325
18326  # First separate the path from the arguments. This will split at the first
18327  # space.
18328  complete="$BUILD_CXX"
18329  path="${complete%% *}"
18330  tmp="$complete EOL"
18331  arguments="${tmp#* }"
18332
18333  # Input might be given as Windows format, start by converting to
18334  # unix format.
18335  new_path=`$CYGPATH -u "$path"`
18336
18337  # Now try to locate executable using which
18338  new_path=`$WHICH "$new_path" 2> /dev/null`
18339  # bat and cmd files are not always considered executable in cygwin causing which
18340  # to not find them
18341  if test "x$new_path" = x \
18342      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18343      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18344    new_path=`$CYGPATH -u "$path"`
18345  fi
18346  if test "x$new_path" = x; then
18347    # Oops. Which didn't find the executable.
18348    # The splitting of arguments from the executable at a space might have been incorrect,
18349    # since paths with space are more likely in Windows. Give it another try with the whole
18350    # argument.
18351    path="$complete"
18352    arguments="EOL"
18353    new_path=`$CYGPATH -u "$path"`
18354    new_path=`$WHICH "$new_path" 2> /dev/null`
18355    # bat and cmd files are not always considered executable in cygwin causing which
18356    # to not find them
18357    if test "x$new_path" = x \
18358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18360      new_path=`$CYGPATH -u "$path"`
18361    fi
18362    if test "x$new_path" = x; then
18363      # It's still not found. Now this is an unrecoverable error.
18364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18365$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18366      has_space=`$ECHO "$complete" | $GREP " "`
18367      if test "x$has_space" != x; then
18368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18370      fi
18371      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18372    fi
18373  fi
18374
18375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18378  # "foo.exe" is OK but "foo" is an error.
18379  #
18380  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18381  # It is also a way to make sure we got the proper file name for the real test later on.
18382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18383  if test "x$test_shortpath" = x; then
18384    # Short path failed, file does not exist as specified.
18385    # Try adding .exe or .cmd
18386    if test -f "${new_path}.exe"; then
18387      input_to_shortpath="${new_path}.exe"
18388    elif test -f "${new_path}.cmd"; then
18389      input_to_shortpath="${new_path}.cmd"
18390    else
18391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18392$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18395      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18396    fi
18397  else
18398    input_to_shortpath="$new_path"
18399  fi
18400
18401  # Call helper function which possibly converts this using DOS-style short mode.
18402  # If so, the updated path is stored in $new_path.
18403  new_path="$input_to_shortpath"
18404
18405  input_path="$input_to_shortpath"
18406  # Check if we need to convert this using DOS-style short mode. If the path
18407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18408  # take no chances and rewrite it.
18409  # Note: m4 eats our [], so we need to use [ and ] instead.
18410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18411  if test "x$has_forbidden_chars" != x; then
18412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18416      # Going to short mode and back again did indeed matter. Since short mode is
18417      # case insensitive, let's make it lowercase to improve readability.
18418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18419      # Now convert it back to Unix-stile (cygpath)
18420      input_path=`$CYGPATH -u "$shortmode_path"`
18421      new_path="$input_path"
18422    fi
18423  fi
18424
18425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18426  if test "x$test_cygdrive_prefix" = x; then
18427    # As a simple fix, exclude /usr/bin since it's not a real path.
18428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18430      # a path prefixed by /cygdrive for fixpath to work.
18431      new_path="$CYGWIN_ROOT_PATH$input_path"
18432    fi
18433  fi
18434
18435  # remove trailing .exe if any
18436  new_path="${new_path/%.exe/}"
18437
18438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18439
18440  # First separate the path from the arguments. This will split at the first
18441  # space.
18442  complete="$BUILD_CXX"
18443  path="${complete%% *}"
18444  tmp="$complete EOL"
18445  arguments="${tmp#* }"
18446
18447  # Input might be given as Windows format, start by converting to
18448  # unix format.
18449  new_path="$path"
18450
18451  windows_path="$new_path"
18452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18453    unix_path=`$CYGPATH -u "$windows_path"`
18454    new_path="$unix_path"
18455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18457    new_path="$unix_path"
18458  fi
18459
18460
18461  # Now try to locate executable using which
18462  new_path=`$WHICH "$new_path" 2> /dev/null`
18463
18464  if test "x$new_path" = x; then
18465    # Oops. Which didn't find the executable.
18466    # The splitting of arguments from the executable at a space might have been incorrect,
18467    # since paths with space are more likely in Windows. Give it another try with the whole
18468    # argument.
18469    path="$complete"
18470    arguments="EOL"
18471    new_path="$path"
18472
18473  windows_path="$new_path"
18474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18475    unix_path=`$CYGPATH -u "$windows_path"`
18476    new_path="$unix_path"
18477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18479    new_path="$unix_path"
18480  fi
18481
18482
18483    new_path=`$WHICH "$new_path" 2> /dev/null`
18484
18485    if test "x$new_path" = x; then
18486      # It's still not found. Now this is an unrecoverable error.
18487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18488$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18489      has_space=`$ECHO "$complete" | $GREP " "`
18490      if test "x$has_space" != x; then
18491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18493      fi
18494      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18495    fi
18496  fi
18497
18498  # Now new_path has a complete unix path to the binary
18499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18500    # Keep paths in /bin as-is, but remove trailing .exe if any
18501    new_path="${new_path/%.exe/}"
18502    # Do not save /bin paths to all_fixpath_prefixes!
18503  else
18504    # Not in mixed or Windows style, start by that.
18505    new_path=`cmd //c echo $new_path`
18506
18507  input_path="$new_path"
18508  # Check if we need to convert this using DOS-style short mode. If the path
18509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18510  # take no chances and rewrite it.
18511  # Note: m4 eats our [], so we need to use [ and ] instead.
18512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18513  if test "x$has_forbidden_chars" != x; then
18514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18516  fi
18517
18518    # Output is in $new_path
18519
18520  windows_path="$new_path"
18521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18522    unix_path=`$CYGPATH -u "$windows_path"`
18523    new_path="$unix_path"
18524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18526    new_path="$unix_path"
18527  fi
18528
18529    # remove trailing .exe if any
18530    new_path="${new_path/%.exe/}"
18531
18532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18534  fi
18535
18536  else
18537    # We're on a posix platform. Hooray! :)
18538    # First separate the path from the arguments. This will split at the first
18539    # space.
18540    complete="$BUILD_CXX"
18541    path="${complete%% *}"
18542    tmp="$complete EOL"
18543    arguments="${tmp#* }"
18544
18545    # Cannot rely on the command "which" here since it doesn't always work.
18546    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18547    if test -z "$is_absolute_path"; then
18548      # Path to executable is not absolute. Find it.
18549      IFS_save="$IFS"
18550      IFS=:
18551      for p in $PATH; do
18552        if test -f "$p/$path" && test -x "$p/$path"; then
18553          new_path="$p/$path"
18554          break
18555        fi
18556      done
18557      IFS="$IFS_save"
18558    else
18559      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18560$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18561      new_path="$path"
18562    fi
18563
18564    if test "x$new_path" = x; then
18565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18566$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18567      has_space=`$ECHO "$complete" | $GREP " "`
18568      if test "x$has_space" != x; then
18569        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18570$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18571      fi
18572      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18573    fi
18574  fi
18575
18576  # Now join together the path and the arguments once again
18577  if test "x$arguments" != xEOL; then
18578    new_complete="$new_path ${arguments% *}"
18579  else
18580    new_complete="$new_path"
18581  fi
18582
18583  if test "x$complete" != "x$new_complete"; then
18584    BUILD_CXX="$new_complete"
18585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18586$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18587  fi
18588
18589    # Extract the first word of "ld", so it can be a program name with args.
18590set dummy ld; ac_word=$2
18591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18592$as_echo_n "checking for $ac_word... " >&6; }
18593if ${ac_cv_path_BUILD_LD+:} false; then :
18594  $as_echo_n "(cached) " >&6
18595else
18596  case $BUILD_LD in
18597  [\\/]* | ?:[\\/]*)
18598  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18599  ;;
18600  *)
18601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18602for as_dir in $PATH
18603do
18604  IFS=$as_save_IFS
18605  test -z "$as_dir" && as_dir=.
18606    for ac_exec_ext in '' $ac_executable_extensions; do
18607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18608    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18610    break 2
18611  fi
18612done
18613  done
18614IFS=$as_save_IFS
18615
18616  ;;
18617esac
18618fi
18619BUILD_LD=$ac_cv_path_BUILD_LD
18620if test -n "$BUILD_LD"; then
18621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18622$as_echo "$BUILD_LD" >&6; }
18623else
18624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18625$as_echo "no" >&6; }
18626fi
18627
18628
18629
18630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18631
18632  # First separate the path from the arguments. This will split at the first
18633  # space.
18634  complete="$BUILD_LD"
18635  path="${complete%% *}"
18636  tmp="$complete EOL"
18637  arguments="${tmp#* }"
18638
18639  # Input might be given as Windows format, start by converting to
18640  # unix format.
18641  new_path=`$CYGPATH -u "$path"`
18642
18643  # Now try to locate executable using which
18644  new_path=`$WHICH "$new_path" 2> /dev/null`
18645  # bat and cmd files are not always considered executable in cygwin causing which
18646  # to not find them
18647  if test "x$new_path" = x \
18648      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18649      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18650    new_path=`$CYGPATH -u "$path"`
18651  fi
18652  if test "x$new_path" = x; then
18653    # Oops. Which didn't find the executable.
18654    # The splitting of arguments from the executable at a space might have been incorrect,
18655    # since paths with space are more likely in Windows. Give it another try with the whole
18656    # argument.
18657    path="$complete"
18658    arguments="EOL"
18659    new_path=`$CYGPATH -u "$path"`
18660    new_path=`$WHICH "$new_path" 2> /dev/null`
18661    # bat and cmd files are not always considered executable in cygwin causing which
18662    # to not find them
18663    if test "x$new_path" = x \
18664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18666      new_path=`$CYGPATH -u "$path"`
18667    fi
18668    if test "x$new_path" = x; then
18669      # It's still not found. Now this is an unrecoverable error.
18670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18671$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18672      has_space=`$ECHO "$complete" | $GREP " "`
18673      if test "x$has_space" != x; then
18674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18676      fi
18677      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18678    fi
18679  fi
18680
18681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18684  # "foo.exe" is OK but "foo" is an error.
18685  #
18686  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18687  # It is also a way to make sure we got the proper file name for the real test later on.
18688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18689  if test "x$test_shortpath" = x; then
18690    # Short path failed, file does not exist as specified.
18691    # Try adding .exe or .cmd
18692    if test -f "${new_path}.exe"; then
18693      input_to_shortpath="${new_path}.exe"
18694    elif test -f "${new_path}.cmd"; then
18695      input_to_shortpath="${new_path}.cmd"
18696    else
18697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18698$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18701      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18702    fi
18703  else
18704    input_to_shortpath="$new_path"
18705  fi
18706
18707  # Call helper function which possibly converts this using DOS-style short mode.
18708  # If so, the updated path is stored in $new_path.
18709  new_path="$input_to_shortpath"
18710
18711  input_path="$input_to_shortpath"
18712  # Check if we need to convert this using DOS-style short mode. If the path
18713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18714  # take no chances and rewrite it.
18715  # Note: m4 eats our [], so we need to use [ and ] instead.
18716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18717  if test "x$has_forbidden_chars" != x; then
18718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18722      # Going to short mode and back again did indeed matter. Since short mode is
18723      # case insensitive, let's make it lowercase to improve readability.
18724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18725      # Now convert it back to Unix-stile (cygpath)
18726      input_path=`$CYGPATH -u "$shortmode_path"`
18727      new_path="$input_path"
18728    fi
18729  fi
18730
18731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18732  if test "x$test_cygdrive_prefix" = x; then
18733    # As a simple fix, exclude /usr/bin since it's not a real path.
18734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18736      # a path prefixed by /cygdrive for fixpath to work.
18737      new_path="$CYGWIN_ROOT_PATH$input_path"
18738    fi
18739  fi
18740
18741  # remove trailing .exe if any
18742  new_path="${new_path/%.exe/}"
18743
18744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18745
18746  # First separate the path from the arguments. This will split at the first
18747  # space.
18748  complete="$BUILD_LD"
18749  path="${complete%% *}"
18750  tmp="$complete EOL"
18751  arguments="${tmp#* }"
18752
18753  # Input might be given as Windows format, start by converting to
18754  # unix format.
18755  new_path="$path"
18756
18757  windows_path="$new_path"
18758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18759    unix_path=`$CYGPATH -u "$windows_path"`
18760    new_path="$unix_path"
18761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18763    new_path="$unix_path"
18764  fi
18765
18766
18767  # Now try to locate executable using which
18768  new_path=`$WHICH "$new_path" 2> /dev/null`
18769
18770  if test "x$new_path" = x; then
18771    # Oops. Which didn't find the executable.
18772    # The splitting of arguments from the executable at a space might have been incorrect,
18773    # since paths with space are more likely in Windows. Give it another try with the whole
18774    # argument.
18775    path="$complete"
18776    arguments="EOL"
18777    new_path="$path"
18778
18779  windows_path="$new_path"
18780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18781    unix_path=`$CYGPATH -u "$windows_path"`
18782    new_path="$unix_path"
18783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18785    new_path="$unix_path"
18786  fi
18787
18788
18789    new_path=`$WHICH "$new_path" 2> /dev/null`
18790
18791    if test "x$new_path" = x; then
18792      # It's still not found. Now this is an unrecoverable error.
18793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18794$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18795      has_space=`$ECHO "$complete" | $GREP " "`
18796      if test "x$has_space" != x; then
18797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18799      fi
18800      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18801    fi
18802  fi
18803
18804  # Now new_path has a complete unix path to the binary
18805  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18806    # Keep paths in /bin as-is, but remove trailing .exe if any
18807    new_path="${new_path/%.exe/}"
18808    # Do not save /bin paths to all_fixpath_prefixes!
18809  else
18810    # Not in mixed or Windows style, start by that.
18811    new_path=`cmd //c echo $new_path`
18812
18813  input_path="$new_path"
18814  # Check if we need to convert this using DOS-style short mode. If the path
18815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18816  # take no chances and rewrite it.
18817  # Note: m4 eats our [], so we need to use [ and ] instead.
18818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18819  if test "x$has_forbidden_chars" != x; then
18820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18822  fi
18823
18824    # Output is in $new_path
18825
18826  windows_path="$new_path"
18827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18828    unix_path=`$CYGPATH -u "$windows_path"`
18829    new_path="$unix_path"
18830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18832    new_path="$unix_path"
18833  fi
18834
18835    # remove trailing .exe if any
18836    new_path="${new_path/%.exe/}"
18837
18838    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18839    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18840  fi
18841
18842  else
18843    # We're on a posix platform. Hooray! :)
18844    # First separate the path from the arguments. This will split at the first
18845    # space.
18846    complete="$BUILD_LD"
18847    path="${complete%% *}"
18848    tmp="$complete EOL"
18849    arguments="${tmp#* }"
18850
18851    # Cannot rely on the command "which" here since it doesn't always work.
18852    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18853    if test -z "$is_absolute_path"; then
18854      # Path to executable is not absolute. Find it.
18855      IFS_save="$IFS"
18856      IFS=:
18857      for p in $PATH; do
18858        if test -f "$p/$path" && test -x "$p/$path"; then
18859          new_path="$p/$path"
18860          break
18861        fi
18862      done
18863      IFS="$IFS_save"
18864    else
18865      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18866$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18867      new_path="$path"
18868    fi
18869
18870    if test "x$new_path" = x; then
18871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18872$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18873      has_space=`$ECHO "$complete" | $GREP " "`
18874      if test "x$has_space" != x; then
18875        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18877      fi
18878      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18879    fi
18880  fi
18881
18882  # Now join together the path and the arguments once again
18883  if test "x$arguments" != xEOL; then
18884    new_complete="$new_path ${arguments% *}"
18885  else
18886    new_complete="$new_path"
18887  fi
18888
18889  if test "x$complete" != "x$new_complete"; then
18890    BUILD_LD="$new_complete"
18891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18892$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18893  fi
18894
18895  fi
18896
18897
18898
18899
18900  # If a devkit is found on the builddeps server, then prepend its path to the
18901  # PATH variable. If there are cross compilers available in the devkit, these
18902  # will be found by AC_PROG_CC et al.
18903  DEVKIT=
18904
18905
18906  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18907    # Source the builddeps file again, to make sure it uses the latest variables!
18908    . $builddepsfile
18909    # Look for a target and build machine specific resource!
18910    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18911    if test "x$resource" = x; then
18912      # Ok, lets instead look for a target specific resource
18913      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18914    fi
18915    if test "x$resource" = x; then
18916      # Ok, lets instead look for a build specific resource
18917      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18918    fi
18919    if test "x$resource" = x; then
18920      # Ok, lets instead look for a generic resource
18921      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18922      resource=${builddep_devkit}
18923    fi
18924    if test "x$resource" != x; then
18925      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18926$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18927      # If the resource in the builddeps.conf file is an existing directory,
18928      # for example /java/linux/cups
18929      if test -d ${resource}; then
18930        depdir=${resource}
18931      else
18932
18933  # devkit is for example mymodule
18934  # $resource is for example libs/general/libmymod_1_2_3.zip
18935  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18936  # $with_builddeps_dir is for example /localhome/builddeps
18937  # depdir is the name of the variable into which we store the depdir, eg MYMOD
18938  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18939  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18940  filename=`basename $resource`
18941  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18942  filebase=${filename%%.*}
18943  extension=${filename#*.}
18944  installdir=$with_builddeps_dir/$filebase
18945  if test ! -f $installdir/$filename.unpacked; then
18946    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18947$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18948    if test ! -d $installdir; then
18949      mkdir -p $installdir
18950    fi
18951    if test ! -d $installdir; then
18952      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18953    fi
18954    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18955    touch $tmpfile
18956    if test ! -f $tmpfile; then
18957      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18958    fi
18959
18960  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18961  # $tmpfile is the local file name for the downloaded file.
18962  VALID_TOOL=no
18963  if test "x$BDEPS_FTP" = xwget; then
18964    VALID_TOOL=yes
18965    wget -O $tmpfile $with_builddeps_server/$resource
18966  fi
18967  if test "x$BDEPS_FTP" = xlftp; then
18968    VALID_TOOL=yes
18969    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18970  fi
18971  if test "x$BDEPS_FTP" = xftp; then
18972    VALID_TOOL=yes
18973    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18974    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18975    FTPUSERPWD=${FTPSERVER%%@*}
18976    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18977      FTPUSER=${userpwd%%:*}
18978      FTPPWD=${userpwd#*@}
18979      FTPSERVER=${FTPSERVER#*@}
18980    else
18981      FTPUSER=ftp
18982      FTPPWD=ftp
18983    fi
18984    # the "pass" command does not work on some
18985    # ftp clients (read ftp.exe) but if it works,
18986    # passive mode is better!
18987    ( \
18988        echo "user $FTPUSER $FTPPWD"        ; \
18989        echo "pass"                         ; \
18990        echo "bin"                          ; \
18991        echo "get $FTPPATH $tmpfile"              ; \
18992    ) | ftp -in $FTPSERVER
18993  fi
18994  if test "x$VALID_TOOL" != xyes; then
18995    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18996  fi
18997
18998    mv $tmpfile $installdir/$filename
18999    if test ! -s $installdir/$filename; then
19000      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19001    fi
19002    case "$extension" in
19003      zip)  echo "Unzipping $installdir/$filename..."
19004        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19005        ;;
19006      tar.gz) echo "Untaring $installdir/$filename..."
19007        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19008        ;;
19009      tgz) echo "Untaring $installdir/$filename..."
19010        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19011        ;;
19012      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19013        ;;
19014    esac
19015  fi
19016  if test -f $installdir/$filename.unpacked; then
19017    depdir=$installdir
19018  fi
19019
19020      fi
19021      # Source the builddeps file again, because in the previous command, the depdir
19022      # was updated to point at the current build dependency install directory.
19023      . $builddepsfile
19024      # Now extract variables from the builddeps.conf files.
19025      theroot=${builddep_devkit_ROOT}
19026      thecflags=${builddep_devkit_CFLAGS}
19027      thelibs=${builddep_devkit_LIBS}
19028      if test "x$depdir" = x; then
19029        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19030      fi
19031      DEVKIT=$depdir
19032      if test "x$theroot" != x; then
19033        DEVKIT="$theroot"
19034      fi
19035      if test "x$thecflags" != x; then
19036        DEVKIT_CFLAGS="$thecflags"
19037      fi
19038      if test "x$thelibs" != x; then
19039        DEVKIT_LIBS="$thelibs"
19040      fi
19041
19042        # Found devkit
19043        PATH="$DEVKIT/bin:$PATH"
19044        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19045        if test "x$x_includes" = "xNONE"; then
19046          x_includes="$SYS_ROOT/usr/include/X11"
19047        fi
19048        if test "x$x_libraries" = "xNONE"; then
19049          x_libraries="$SYS_ROOT/usr/lib"
19050        fi
19051
19052
19053    fi
19054
19055  fi
19056
19057
19058  # Store the CFLAGS etal passed to the configure script.
19059  ORG_CFLAGS="$CFLAGS"
19060  ORG_CXXFLAGS="$CXXFLAGS"
19061  ORG_OBJCFLAGS="$OBJCFLAGS"
19062
19063  # autoconf magic only relies on PATH, so update it if tools dir is specified
19064  OLD_PATH="$PATH"
19065  if test "x$TOOLS_DIR" != x; then
19066    PATH=$TOOLS_DIR:$PATH
19067  fi
19068
19069
19070  ### Locate C compiler (CC)
19071
19072  # On windows, only cl.exe is supported.
19073  # On Solaris, cc is preferred to gcc.
19074  # Elsewhere, gcc is preferred to cc.
19075
19076  if test "x$CC" != x; then
19077    COMPILER_CHECK_LIST="$CC"
19078  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19079    COMPILER_CHECK_LIST="cl"
19080  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19081    COMPILER_CHECK_LIST="cc gcc"
19082  else
19083    COMPILER_CHECK_LIST="gcc cc"
19084  fi
19085
19086
19087  COMPILER_NAME=C
19088
19089  CC=
19090  # If TOOLS_DIR is set, check for all compiler names in there first
19091  # before checking the rest of the PATH.
19092  if test -n "$TOOLS_DIR"; then
19093    PATH_save="$PATH"
19094    PATH="$TOOLS_DIR"
19095    for ac_prog in $COMPILER_CHECK_LIST
19096do
19097  # Extract the first word of "$ac_prog", so it can be a program name with args.
19098set dummy $ac_prog; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $TOOLS_DIR_CC in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19107  ;;
19108  *)
19109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110for as_dir in $PATH
19111do
19112  IFS=$as_save_IFS
19113  test -z "$as_dir" && as_dir=.
19114    for ac_exec_ext in '' $ac_executable_extensions; do
19115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19118    break 2
19119  fi
19120done
19121  done
19122IFS=$as_save_IFS
19123
19124  ;;
19125esac
19126fi
19127TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19128if test -n "$TOOLS_DIR_CC"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19130$as_echo "$TOOLS_DIR_CC" >&6; }
19131else
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19133$as_echo "no" >&6; }
19134fi
19135
19136
19137  test -n "$TOOLS_DIR_CC" && break
19138done
19139
19140    CC=$TOOLS_DIR_CC
19141    PATH="$PATH_save"
19142  fi
19143
19144  # AC_PATH_PROGS can't be run multiple times with the same variable,
19145  # so create a new name for this run.
19146  if test "x$CC" = x; then
19147    for ac_prog in $COMPILER_CHECK_LIST
19148do
19149  # Extract the first word of "$ac_prog", so it can be a program name with args.
19150set dummy $ac_prog; ac_word=$2
19151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19152$as_echo_n "checking for $ac_word... " >&6; }
19153if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19154  $as_echo_n "(cached) " >&6
19155else
19156  case $POTENTIAL_CC in
19157  [\\/]* | ?:[\\/]*)
19158  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19159  ;;
19160  *)
19161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19162for as_dir in $PATH
19163do
19164  IFS=$as_save_IFS
19165  test -z "$as_dir" && as_dir=.
19166    for ac_exec_ext in '' $ac_executable_extensions; do
19167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19168    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19170    break 2
19171  fi
19172done
19173  done
19174IFS=$as_save_IFS
19175
19176  ;;
19177esac
19178fi
19179POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19180if test -n "$POTENTIAL_CC"; then
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19182$as_echo "$POTENTIAL_CC" >&6; }
19183else
19184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19185$as_echo "no" >&6; }
19186fi
19187
19188
19189  test -n "$POTENTIAL_CC" && break
19190done
19191
19192    CC=$POTENTIAL_CC
19193  fi
19194
19195  if test "x$CC" = x; then
19196
19197  # Print a helpful message on how to acquire the necessary build dependency.
19198  # devkit is the help tag: freetype, cups, pulse, alsa etc
19199  MISSING_DEPENDENCY=devkit
19200
19201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19202    cygwin_help $MISSING_DEPENDENCY
19203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19204    msys_help $MISSING_DEPENDENCY
19205  else
19206    PKGHANDLER_COMMAND=
19207
19208    case $PKGHANDLER in
19209      apt-get)
19210        apt_help     $MISSING_DEPENDENCY ;;
19211      yum)
19212        yum_help     $MISSING_DEPENDENCY ;;
19213      port)
19214        port_help    $MISSING_DEPENDENCY ;;
19215      pkgutil)
19216        pkgutil_help $MISSING_DEPENDENCY ;;
19217      pkgadd)
19218        pkgadd_help  $MISSING_DEPENDENCY ;;
19219      * )
19220        break ;;
19221    esac
19222
19223    if test "x$PKGHANDLER_COMMAND" != x; then
19224      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19225    fi
19226  fi
19227
19228    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19229  fi
19230
19231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19232
19233  # First separate the path from the arguments. This will split at the first
19234  # space.
19235  complete="$CC"
19236  path="${complete%% *}"
19237  tmp="$complete EOL"
19238  arguments="${tmp#* }"
19239
19240  # Input might be given as Windows format, start by converting to
19241  # unix format.
19242  new_path=`$CYGPATH -u "$path"`
19243
19244  # Now try to locate executable using which
19245  new_path=`$WHICH "$new_path" 2> /dev/null`
19246  # bat and cmd files are not always considered executable in cygwin causing which
19247  # to not find them
19248  if test "x$new_path" = x \
19249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19251    new_path=`$CYGPATH -u "$path"`
19252  fi
19253  if test "x$new_path" = x; then
19254    # Oops. Which didn't find the executable.
19255    # The splitting of arguments from the executable at a space might have been incorrect,
19256    # since paths with space are more likely in Windows. Give it another try with the whole
19257    # argument.
19258    path="$complete"
19259    arguments="EOL"
19260    new_path=`$CYGPATH -u "$path"`
19261    new_path=`$WHICH "$new_path" 2> /dev/null`
19262    # bat and cmd files are not always considered executable in cygwin causing which
19263    # to not find them
19264    if test "x$new_path" = x \
19265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19267      new_path=`$CYGPATH -u "$path"`
19268    fi
19269    if test "x$new_path" = x; then
19270      # It's still not found. Now this is an unrecoverable error.
19271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19272$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19273      has_space=`$ECHO "$complete" | $GREP " "`
19274      if test "x$has_space" != x; then
19275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19277      fi
19278      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19279    fi
19280  fi
19281
19282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19285  # "foo.exe" is OK but "foo" is an error.
19286  #
19287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19288  # It is also a way to make sure we got the proper file name for the real test later on.
19289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19290  if test "x$test_shortpath" = x; then
19291    # Short path failed, file does not exist as specified.
19292    # Try adding .exe or .cmd
19293    if test -f "${new_path}.exe"; then
19294      input_to_shortpath="${new_path}.exe"
19295    elif test -f "${new_path}.cmd"; then
19296      input_to_shortpath="${new_path}.cmd"
19297    else
19298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19299$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19302      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19303    fi
19304  else
19305    input_to_shortpath="$new_path"
19306  fi
19307
19308  # Call helper function which possibly converts this using DOS-style short mode.
19309  # If so, the updated path is stored in $new_path.
19310  new_path="$input_to_shortpath"
19311
19312  input_path="$input_to_shortpath"
19313  # Check if we need to convert this using DOS-style short mode. If the path
19314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19315  # take no chances and rewrite it.
19316  # Note: m4 eats our [], so we need to use [ and ] instead.
19317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19318  if test "x$has_forbidden_chars" != x; then
19319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19323      # Going to short mode and back again did indeed matter. Since short mode is
19324      # case insensitive, let's make it lowercase to improve readability.
19325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19326      # Now convert it back to Unix-stile (cygpath)
19327      input_path=`$CYGPATH -u "$shortmode_path"`
19328      new_path="$input_path"
19329    fi
19330  fi
19331
19332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19333  if test "x$test_cygdrive_prefix" = x; then
19334    # As a simple fix, exclude /usr/bin since it's not a real path.
19335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19337      # a path prefixed by /cygdrive for fixpath to work.
19338      new_path="$CYGWIN_ROOT_PATH$input_path"
19339    fi
19340  fi
19341
19342  # remove trailing .exe if any
19343  new_path="${new_path/%.exe/}"
19344
19345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346
19347  # First separate the path from the arguments. This will split at the first
19348  # space.
19349  complete="$CC"
19350  path="${complete%% *}"
19351  tmp="$complete EOL"
19352  arguments="${tmp#* }"
19353
19354  # Input might be given as Windows format, start by converting to
19355  # unix format.
19356  new_path="$path"
19357
19358  windows_path="$new_path"
19359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19360    unix_path=`$CYGPATH -u "$windows_path"`
19361    new_path="$unix_path"
19362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19364    new_path="$unix_path"
19365  fi
19366
19367
19368  # Now try to locate executable using which
19369  new_path=`$WHICH "$new_path" 2> /dev/null`
19370
19371  if test "x$new_path" = x; then
19372    # Oops. Which didn't find the executable.
19373    # The splitting of arguments from the executable at a space might have been incorrect,
19374    # since paths with space are more likely in Windows. Give it another try with the whole
19375    # argument.
19376    path="$complete"
19377    arguments="EOL"
19378    new_path="$path"
19379
19380  windows_path="$new_path"
19381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19382    unix_path=`$CYGPATH -u "$windows_path"`
19383    new_path="$unix_path"
19384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19386    new_path="$unix_path"
19387  fi
19388
19389
19390    new_path=`$WHICH "$new_path" 2> /dev/null`
19391
19392    if test "x$new_path" = x; then
19393      # It's still not found. Now this is an unrecoverable error.
19394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19395$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19396      has_space=`$ECHO "$complete" | $GREP " "`
19397      if test "x$has_space" != x; then
19398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19400      fi
19401      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19402    fi
19403  fi
19404
19405  # Now new_path has a complete unix path to the binary
19406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19407    # Keep paths in /bin as-is, but remove trailing .exe if any
19408    new_path="${new_path/%.exe/}"
19409    # Do not save /bin paths to all_fixpath_prefixes!
19410  else
19411    # Not in mixed or Windows style, start by that.
19412    new_path=`cmd //c echo $new_path`
19413
19414  input_path="$new_path"
19415  # Check if we need to convert this using DOS-style short mode. If the path
19416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19417  # take no chances and rewrite it.
19418  # Note: m4 eats our [], so we need to use [ and ] instead.
19419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19420  if test "x$has_forbidden_chars" != x; then
19421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19423  fi
19424
19425    # Output is in $new_path
19426
19427  windows_path="$new_path"
19428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19429    unix_path=`$CYGPATH -u "$windows_path"`
19430    new_path="$unix_path"
19431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19433    new_path="$unix_path"
19434  fi
19435
19436    # remove trailing .exe if any
19437    new_path="${new_path/%.exe/}"
19438
19439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19441  fi
19442
19443  else
19444    # We're on a posix platform. Hooray! :)
19445    # First separate the path from the arguments. This will split at the first
19446    # space.
19447    complete="$CC"
19448    path="${complete%% *}"
19449    tmp="$complete EOL"
19450    arguments="${tmp#* }"
19451
19452    # Cannot rely on the command "which" here since it doesn't always work.
19453    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19454    if test -z "$is_absolute_path"; then
19455      # Path to executable is not absolute. Find it.
19456      IFS_save="$IFS"
19457      IFS=:
19458      for p in $PATH; do
19459        if test -f "$p/$path" && test -x "$p/$path"; then
19460          new_path="$p/$path"
19461          break
19462        fi
19463      done
19464      IFS="$IFS_save"
19465    else
19466      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19467$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19468      new_path="$path"
19469    fi
19470
19471    if test "x$new_path" = x; then
19472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19473$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19474      has_space=`$ECHO "$complete" | $GREP " "`
19475      if test "x$has_space" != x; then
19476        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19478      fi
19479      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19480    fi
19481  fi
19482
19483  # Now join together the path and the arguments once again
19484  if test "x$arguments" != xEOL; then
19485    new_complete="$new_path ${arguments% *}"
19486  else
19487    new_complete="$new_path"
19488  fi
19489
19490  if test "x$complete" != "x$new_complete"; then
19491    CC="$new_complete"
19492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19493$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19494  fi
19495
19496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19497$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19498  TEST_COMPILER="$CC"
19499
19500  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19501    # Follow a chain of symbolic links. Use readlink
19502    # where it exists, else fall back to horribly
19503    # complicated shell code.
19504    if test "x$READLINK_TESTED" != yes; then
19505      # On MacOSX there is a readlink tool with a different
19506      # purpose than the GNU readlink tool. Check the found readlink.
19507      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19508      if test "x$ISGNU" = x; then
19509        # A readlink that we do not know how to use.
19510        # Are there other non-GNU readlinks out there?
19511        READLINK_TESTED=yes
19512        READLINK=
19513      fi
19514    fi
19515
19516    if test "x$READLINK" != x; then
19517      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19518    else
19519      # Save the current directory for restoring afterwards
19520      STARTDIR=$PWD
19521      COUNTER=0
19522      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19523      sym_link_file=`$BASENAME $TEST_COMPILER`
19524      cd $sym_link_dir
19525      # Use -P flag to resolve symlinks in directories.
19526      cd `$THEPWDCMD -P`
19527      sym_link_dir=`$THEPWDCMD -P`
19528      # Resolve file symlinks
19529      while test $COUNTER -lt 20; do
19530        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19531        if test "x$ISLINK" == x; then
19532          # This is not a symbolic link! We are done!
19533          break
19534        fi
19535        # Again resolve directory symlinks since the target of the just found
19536        # link could be in a different directory
19537        cd `$DIRNAME $ISLINK`
19538        sym_link_dir=`$THEPWDCMD -P`
19539        sym_link_file=`$BASENAME $ISLINK`
19540        let COUNTER=COUNTER+1
19541      done
19542      cd $STARTDIR
19543      TEST_COMPILER=$sym_link_dir/$sym_link_file
19544    fi
19545  fi
19546
19547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19548$as_echo "$TEST_COMPILER" >&6; }
19549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19550$as_echo_n "checking if CC is disguised ccache... " >&6; }
19551
19552  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19553  if test "x$COMPILER_BASENAME" = "xccache"; then
19554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19555$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19556    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19557    # We want to control ccache invocation ourselves, so ignore this cc and try
19558    # searching again.
19559
19560    # Remove the path to the fake ccache cc from the PATH
19561    RETRY_COMPILER_SAVED_PATH="$PATH"
19562    COMPILER_DIRNAME=`$DIRNAME $CC`
19563    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19564
19565    # Try again looking for our compiler
19566    if test -n "$ac_tool_prefix"; then
19567  for ac_prog in $COMPILER_CHECK_LIST
19568  do
19569    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19572$as_echo_n "checking for $ac_word... " >&6; }
19573if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19574  $as_echo_n "(cached) " >&6
19575else
19576  if test -n "$PROPER_COMPILER_CC"; then
19577  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19578else
19579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19580for as_dir in $PATH
19581do
19582  IFS=$as_save_IFS
19583  test -z "$as_dir" && as_dir=.
19584    for ac_exec_ext in '' $ac_executable_extensions; do
19585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19586    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19588    break 2
19589  fi
19590done
19591  done
19592IFS=$as_save_IFS
19593
19594fi
19595fi
19596PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19597if test -n "$PROPER_COMPILER_CC"; then
19598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19599$as_echo "$PROPER_COMPILER_CC" >&6; }
19600else
19601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19602$as_echo "no" >&6; }
19603fi
19604
19605
19606    test -n "$PROPER_COMPILER_CC" && break
19607  done
19608fi
19609if test -z "$PROPER_COMPILER_CC"; then
19610  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19611  for ac_prog in $COMPILER_CHECK_LIST
19612do
19613  # Extract the first word of "$ac_prog", so it can be a program name with args.
19614set dummy $ac_prog; ac_word=$2
19615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19616$as_echo_n "checking for $ac_word... " >&6; }
19617if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19618  $as_echo_n "(cached) " >&6
19619else
19620  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19621  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19622else
19623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19624for as_dir in $PATH
19625do
19626  IFS=$as_save_IFS
19627  test -z "$as_dir" && as_dir=.
19628    for ac_exec_ext in '' $ac_executable_extensions; do
19629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19630    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19632    break 2
19633  fi
19634done
19635  done
19636IFS=$as_save_IFS
19637
19638fi
19639fi
19640ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19641if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19643$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19644else
19645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19646$as_echo "no" >&6; }
19647fi
19648
19649
19650  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19651done
19652
19653  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19654    PROPER_COMPILER_CC=""
19655  else
19656    case $cross_compiling:$ac_tool_warned in
19657yes:)
19658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19660ac_tool_warned=yes ;;
19661esac
19662    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19663  fi
19664fi
19665
19666
19667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19668
19669  # First separate the path from the arguments. This will split at the first
19670  # space.
19671  complete="$PROPER_COMPILER_CC"
19672  path="${complete%% *}"
19673  tmp="$complete EOL"
19674  arguments="${tmp#* }"
19675
19676  # Input might be given as Windows format, start by converting to
19677  # unix format.
19678  new_path=`$CYGPATH -u "$path"`
19679
19680  # Now try to locate executable using which
19681  new_path=`$WHICH "$new_path" 2> /dev/null`
19682  # bat and cmd files are not always considered executable in cygwin causing which
19683  # to not find them
19684  if test "x$new_path" = x \
19685      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19686      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19687    new_path=`$CYGPATH -u "$path"`
19688  fi
19689  if test "x$new_path" = x; then
19690    # Oops. Which didn't find the executable.
19691    # The splitting of arguments from the executable at a space might have been incorrect,
19692    # since paths with space are more likely in Windows. Give it another try with the whole
19693    # argument.
19694    path="$complete"
19695    arguments="EOL"
19696    new_path=`$CYGPATH -u "$path"`
19697    new_path=`$WHICH "$new_path" 2> /dev/null`
19698    # bat and cmd files are not always considered executable in cygwin causing which
19699    # to not find them
19700    if test "x$new_path" = x \
19701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19703      new_path=`$CYGPATH -u "$path"`
19704    fi
19705    if test "x$new_path" = x; then
19706      # It's still not found. Now this is an unrecoverable error.
19707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19708$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19709      has_space=`$ECHO "$complete" | $GREP " "`
19710      if test "x$has_space" != x; then
19711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19713      fi
19714      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19715    fi
19716  fi
19717
19718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19721  # "foo.exe" is OK but "foo" is an error.
19722  #
19723  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19724  # It is also a way to make sure we got the proper file name for the real test later on.
19725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19726  if test "x$test_shortpath" = x; then
19727    # Short path failed, file does not exist as specified.
19728    # Try adding .exe or .cmd
19729    if test -f "${new_path}.exe"; then
19730      input_to_shortpath="${new_path}.exe"
19731    elif test -f "${new_path}.cmd"; then
19732      input_to_shortpath="${new_path}.cmd"
19733    else
19734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19735$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19738      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19739    fi
19740  else
19741    input_to_shortpath="$new_path"
19742  fi
19743
19744  # Call helper function which possibly converts this using DOS-style short mode.
19745  # If so, the updated path is stored in $new_path.
19746  new_path="$input_to_shortpath"
19747
19748  input_path="$input_to_shortpath"
19749  # Check if we need to convert this using DOS-style short mode. If the path
19750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19751  # take no chances and rewrite it.
19752  # Note: m4 eats our [], so we need to use [ and ] instead.
19753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19754  if test "x$has_forbidden_chars" != x; then
19755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19759      # Going to short mode and back again did indeed matter. Since short mode is
19760      # case insensitive, let's make it lowercase to improve readability.
19761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19762      # Now convert it back to Unix-stile (cygpath)
19763      input_path=`$CYGPATH -u "$shortmode_path"`
19764      new_path="$input_path"
19765    fi
19766  fi
19767
19768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19769  if test "x$test_cygdrive_prefix" = x; then
19770    # As a simple fix, exclude /usr/bin since it's not a real path.
19771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19773      # a path prefixed by /cygdrive for fixpath to work.
19774      new_path="$CYGWIN_ROOT_PATH$input_path"
19775    fi
19776  fi
19777
19778  # remove trailing .exe if any
19779  new_path="${new_path/%.exe/}"
19780
19781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19782
19783  # First separate the path from the arguments. This will split at the first
19784  # space.
19785  complete="$PROPER_COMPILER_CC"
19786  path="${complete%% *}"
19787  tmp="$complete EOL"
19788  arguments="${tmp#* }"
19789
19790  # Input might be given as Windows format, start by converting to
19791  # unix format.
19792  new_path="$path"
19793
19794  windows_path="$new_path"
19795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19796    unix_path=`$CYGPATH -u "$windows_path"`
19797    new_path="$unix_path"
19798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19800    new_path="$unix_path"
19801  fi
19802
19803
19804  # Now try to locate executable using which
19805  new_path=`$WHICH "$new_path" 2> /dev/null`
19806
19807  if test "x$new_path" = x; then
19808    # Oops. Which didn't find the executable.
19809    # The splitting of arguments from the executable at a space might have been incorrect,
19810    # since paths with space are more likely in Windows. Give it another try with the whole
19811    # argument.
19812    path="$complete"
19813    arguments="EOL"
19814    new_path="$path"
19815
19816  windows_path="$new_path"
19817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19818    unix_path=`$CYGPATH -u "$windows_path"`
19819    new_path="$unix_path"
19820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19822    new_path="$unix_path"
19823  fi
19824
19825
19826    new_path=`$WHICH "$new_path" 2> /dev/null`
19827
19828    if test "x$new_path" = x; then
19829      # It's still not found. Now this is an unrecoverable error.
19830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19831$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19832      has_space=`$ECHO "$complete" | $GREP " "`
19833      if test "x$has_space" != x; then
19834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19836      fi
19837      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19838    fi
19839  fi
19840
19841  # Now new_path has a complete unix path to the binary
19842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19843    # Keep paths in /bin as-is, but remove trailing .exe if any
19844    new_path="${new_path/%.exe/}"
19845    # Do not save /bin paths to all_fixpath_prefixes!
19846  else
19847    # Not in mixed or Windows style, start by that.
19848    new_path=`cmd //c echo $new_path`
19849
19850  input_path="$new_path"
19851  # Check if we need to convert this using DOS-style short mode. If the path
19852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19853  # take no chances and rewrite it.
19854  # Note: m4 eats our [], so we need to use [ and ] instead.
19855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19856  if test "x$has_forbidden_chars" != x; then
19857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19859  fi
19860
19861    # Output is in $new_path
19862
19863  windows_path="$new_path"
19864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19865    unix_path=`$CYGPATH -u "$windows_path"`
19866    new_path="$unix_path"
19867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19869    new_path="$unix_path"
19870  fi
19871
19872    # remove trailing .exe if any
19873    new_path="${new_path/%.exe/}"
19874
19875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19877  fi
19878
19879  else
19880    # We're on a posix platform. Hooray! :)
19881    # First separate the path from the arguments. This will split at the first
19882    # space.
19883    complete="$PROPER_COMPILER_CC"
19884    path="${complete%% *}"
19885    tmp="$complete EOL"
19886    arguments="${tmp#* }"
19887
19888    # Cannot rely on the command "which" here since it doesn't always work.
19889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19890    if test -z "$is_absolute_path"; then
19891      # Path to executable is not absolute. Find it.
19892      IFS_save="$IFS"
19893      IFS=:
19894      for p in $PATH; do
19895        if test -f "$p/$path" && test -x "$p/$path"; then
19896          new_path="$p/$path"
19897          break
19898        fi
19899      done
19900      IFS="$IFS_save"
19901    else
19902      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19903$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19904      new_path="$path"
19905    fi
19906
19907    if test "x$new_path" = x; then
19908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19909$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19910      has_space=`$ECHO "$complete" | $GREP " "`
19911      if test "x$has_space" != x; then
19912        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19914      fi
19915      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19916    fi
19917  fi
19918
19919  # Now join together the path and the arguments once again
19920  if test "x$arguments" != xEOL; then
19921    new_complete="$new_path ${arguments% *}"
19922  else
19923    new_complete="$new_path"
19924  fi
19925
19926  if test "x$complete" != "x$new_complete"; then
19927    PROPER_COMPILER_CC="$new_complete"
19928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19929$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19930  fi
19931
19932    PATH="$RETRY_COMPILER_SAVED_PATH"
19933
19934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19935$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19936
19937  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19938    # Follow a chain of symbolic links. Use readlink
19939    # where it exists, else fall back to horribly
19940    # complicated shell code.
19941    if test "x$READLINK_TESTED" != yes; then
19942      # On MacOSX there is a readlink tool with a different
19943      # purpose than the GNU readlink tool. Check the found readlink.
19944      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19945      if test "x$ISGNU" = x; then
19946        # A readlink that we do not know how to use.
19947        # Are there other non-GNU readlinks out there?
19948        READLINK_TESTED=yes
19949        READLINK=
19950      fi
19951    fi
19952
19953    if test "x$READLINK" != x; then
19954      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19955    else
19956      # Save the current directory for restoring afterwards
19957      STARTDIR=$PWD
19958      COUNTER=0
19959      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19960      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19961      cd $sym_link_dir
19962      # Use -P flag to resolve symlinks in directories.
19963      cd `$THEPWDCMD -P`
19964      sym_link_dir=`$THEPWDCMD -P`
19965      # Resolve file symlinks
19966      while test $COUNTER -lt 20; do
19967        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19968        if test "x$ISLINK" == x; then
19969          # This is not a symbolic link! We are done!
19970          break
19971        fi
19972        # Again resolve directory symlinks since the target of the just found
19973        # link could be in a different directory
19974        cd `$DIRNAME $ISLINK`
19975        sym_link_dir=`$THEPWDCMD -P`
19976        sym_link_file=`$BASENAME $ISLINK`
19977        let COUNTER=COUNTER+1
19978      done
19979      cd $STARTDIR
19980      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19981    fi
19982  fi
19983
19984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19985$as_echo "$PROPER_COMPILER_CC" >&6; }
19986    CC="$PROPER_COMPILER_CC"
19987  else
19988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19989$as_echo "no, keeping CC" >&6; }
19990  fi
19991
19992
19993  COMPILER=$CC
19994  COMPILER_NAME=$COMPILER_NAME
19995
19996  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19997    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19998    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19999    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20000    if test $? -ne 0; then
20001      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20002
20003      { $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
20004$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20005      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20006$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20007      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20008    else
20009      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20010      COMPILER_VENDOR="Sun Studio"
20011    fi
20012  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20013    # First line typically looks something like:
20014    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20015    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20016    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20017    COMPILER_VENDOR="Microsoft CL.EXE"
20018    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20019    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20020      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20021        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20022      fi
20023    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20024      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20025        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20026      fi
20027    fi
20028  else
20029    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20030    # Check that this is likely to be GCC.
20031    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20032    if test $? -ne 0; then
20033      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20034$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20035      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20036$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20037      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20038    fi
20039
20040    # First line typically looks something like:
20041    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20042    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20043    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20044  fi
20045  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20046  CC_VERSION="$COMPILER_VERSION"
20047  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20048  CC_VENDOR="$COMPILER_VENDOR"
20049
20050  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20051$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20052
20053
20054  # Now that we have resolved CC ourself, let autoconf have its go at it
20055  ac_ext=c
20056ac_cpp='$CPP $CPPFLAGS'
20057ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20058ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20059ac_compiler_gnu=$ac_cv_c_compiler_gnu
20060if test -n "$ac_tool_prefix"; then
20061  for ac_prog in $CC
20062  do
20063    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20064set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20066$as_echo_n "checking for $ac_word... " >&6; }
20067if ${ac_cv_prog_CC+:} false; then :
20068  $as_echo_n "(cached) " >&6
20069else
20070  if test -n "$CC"; then
20071  ac_cv_prog_CC="$CC" # Let the user override the test.
20072else
20073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20074for as_dir in $PATH
20075do
20076  IFS=$as_save_IFS
20077  test -z "$as_dir" && as_dir=.
20078    for ac_exec_ext in '' $ac_executable_extensions; do
20079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20080    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20082    break 2
20083  fi
20084done
20085  done
20086IFS=$as_save_IFS
20087
20088fi
20089fi
20090CC=$ac_cv_prog_CC
20091if test -n "$CC"; then
20092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20093$as_echo "$CC" >&6; }
20094else
20095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20096$as_echo "no" >&6; }
20097fi
20098
20099
20100    test -n "$CC" && break
20101  done
20102fi
20103if test -z "$CC"; then
20104  ac_ct_CC=$CC
20105  for ac_prog in $CC
20106do
20107  # Extract the first word of "$ac_prog", so it can be a program name with args.
20108set dummy $ac_prog; ac_word=$2
20109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20110$as_echo_n "checking for $ac_word... " >&6; }
20111if ${ac_cv_prog_ac_ct_CC+:} false; then :
20112  $as_echo_n "(cached) " >&6
20113else
20114  if test -n "$ac_ct_CC"; then
20115  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20116else
20117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20118for as_dir in $PATH
20119do
20120  IFS=$as_save_IFS
20121  test -z "$as_dir" && as_dir=.
20122    for ac_exec_ext in '' $ac_executable_extensions; do
20123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20124    ac_cv_prog_ac_ct_CC="$ac_prog"
20125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20126    break 2
20127  fi
20128done
20129  done
20130IFS=$as_save_IFS
20131
20132fi
20133fi
20134ac_ct_CC=$ac_cv_prog_ac_ct_CC
20135if test -n "$ac_ct_CC"; then
20136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20137$as_echo "$ac_ct_CC" >&6; }
20138else
20139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20140$as_echo "no" >&6; }
20141fi
20142
20143
20144  test -n "$ac_ct_CC" && break
20145done
20146
20147  if test "x$ac_ct_CC" = x; then
20148    CC=""
20149  else
20150    case $cross_compiling:$ac_tool_warned in
20151yes:)
20152{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20153$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20154ac_tool_warned=yes ;;
20155esac
20156    CC=$ac_ct_CC
20157  fi
20158fi
20159
20160
20161test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20163as_fn_error $? "no acceptable C compiler found in \$PATH
20164See \`config.log' for more details" "$LINENO" 5; }
20165
20166# Provide some information about the compiler.
20167$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20168set X $ac_compile
20169ac_compiler=$2
20170for ac_option in --version -v -V -qversion; do
20171  { { ac_try="$ac_compiler $ac_option >&5"
20172case "(($ac_try" in
20173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20174  *) ac_try_echo=$ac_try;;
20175esac
20176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20177$as_echo "$ac_try_echo"; } >&5
20178  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20179  ac_status=$?
20180  if test -s conftest.err; then
20181    sed '10a\
20182... rest of stderr output deleted ...
20183         10q' conftest.err >conftest.er1
20184    cat conftest.er1 >&5
20185  fi
20186  rm -f conftest.er1 conftest.err
20187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20188  test $ac_status = 0; }
20189done
20190
20191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20192/* end confdefs.h.  */
20193
20194int
20195main ()
20196{
20197
20198  ;
20199  return 0;
20200}
20201_ACEOF
20202ac_clean_files_save=$ac_clean_files
20203ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20204# Try to create an executable without -o first, disregard a.out.
20205# It will help us diagnose broken compilers, and finding out an intuition
20206# of exeext.
20207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20208$as_echo_n "checking whether the C compiler works... " >&6; }
20209ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20210
20211# The possible output files:
20212ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20213
20214ac_rmfiles=
20215for ac_file in $ac_files
20216do
20217  case $ac_file in
20218    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20219    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20220  esac
20221done
20222rm -f $ac_rmfiles
20223
20224if { { ac_try="$ac_link_default"
20225case "(($ac_try" in
20226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20227  *) ac_try_echo=$ac_try;;
20228esac
20229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20230$as_echo "$ac_try_echo"; } >&5
20231  (eval "$ac_link_default") 2>&5
20232  ac_status=$?
20233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20234  test $ac_status = 0; }; then :
20235  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20236# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20237# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20238# so that the user can short-circuit this test for compilers unknown to
20239# Autoconf.
20240for ac_file in $ac_files ''
20241do
20242  test -f "$ac_file" || continue
20243  case $ac_file in
20244    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20245	;;
20246    [ab].out )
20247	# We found the default executable, but exeext='' is most
20248	# certainly right.
20249	break;;
20250    *.* )
20251	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20252	then :; else
20253	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20254	fi
20255	# We set ac_cv_exeext here because the later test for it is not
20256	# safe: cross compilers may not add the suffix if given an `-o'
20257	# argument, so we may need to know it at that point already.
20258	# Even if this section looks crufty: it has the advantage of
20259	# actually working.
20260	break;;
20261    * )
20262	break;;
20263  esac
20264done
20265test "$ac_cv_exeext" = no && ac_cv_exeext=
20266
20267else
20268  ac_file=''
20269fi
20270if test -z "$ac_file"; then :
20271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20272$as_echo "no" >&6; }
20273$as_echo "$as_me: failed program was:" >&5
20274sed 's/^/| /' conftest.$ac_ext >&5
20275
20276{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20278as_fn_error 77 "C compiler cannot create executables
20279See \`config.log' for more details" "$LINENO" 5; }
20280else
20281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20282$as_echo "yes" >&6; }
20283fi
20284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20285$as_echo_n "checking for C compiler default output file name... " >&6; }
20286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20287$as_echo "$ac_file" >&6; }
20288ac_exeext=$ac_cv_exeext
20289
20290rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20291ac_clean_files=$ac_clean_files_save
20292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20293$as_echo_n "checking for suffix of executables... " >&6; }
20294if { { ac_try="$ac_link"
20295case "(($ac_try" in
20296  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20297  *) ac_try_echo=$ac_try;;
20298esac
20299eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20300$as_echo "$ac_try_echo"; } >&5
20301  (eval "$ac_link") 2>&5
20302  ac_status=$?
20303  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20304  test $ac_status = 0; }; then :
20305  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20306# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20307# work properly (i.e., refer to `conftest.exe'), while it won't with
20308# `rm'.
20309for ac_file in conftest.exe conftest conftest.*; do
20310  test -f "$ac_file" || continue
20311  case $ac_file in
20312    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20313    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20314	  break;;
20315    * ) break;;
20316  esac
20317done
20318else
20319  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20321as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20322See \`config.log' for more details" "$LINENO" 5; }
20323fi
20324rm -f conftest conftest$ac_cv_exeext
20325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20326$as_echo "$ac_cv_exeext" >&6; }
20327
20328rm -f conftest.$ac_ext
20329EXEEXT=$ac_cv_exeext
20330ac_exeext=$EXEEXT
20331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20332/* end confdefs.h.  */
20333#include <stdio.h>
20334int
20335main ()
20336{
20337FILE *f = fopen ("conftest.out", "w");
20338 return ferror (f) || fclose (f) != 0;
20339
20340  ;
20341  return 0;
20342}
20343_ACEOF
20344ac_clean_files="$ac_clean_files conftest.out"
20345# Check that the compiler produces executables we can run.  If not, either
20346# the compiler is broken, or we cross compile.
20347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20348$as_echo_n "checking whether we are cross compiling... " >&6; }
20349if test "$cross_compiling" != yes; then
20350  { { ac_try="$ac_link"
20351case "(($ac_try" in
20352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20353  *) ac_try_echo=$ac_try;;
20354esac
20355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20356$as_echo "$ac_try_echo"; } >&5
20357  (eval "$ac_link") 2>&5
20358  ac_status=$?
20359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20360  test $ac_status = 0; }
20361  if { ac_try='./conftest$ac_cv_exeext'
20362  { { case "(($ac_try" in
20363  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20364  *) ac_try_echo=$ac_try;;
20365esac
20366eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20367$as_echo "$ac_try_echo"; } >&5
20368  (eval "$ac_try") 2>&5
20369  ac_status=$?
20370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20371  test $ac_status = 0; }; }; then
20372    cross_compiling=no
20373  else
20374    if test "$cross_compiling" = maybe; then
20375	cross_compiling=yes
20376    else
20377	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20379as_fn_error $? "cannot run C compiled programs.
20380If you meant to cross compile, use \`--host'.
20381See \`config.log' for more details" "$LINENO" 5; }
20382    fi
20383  fi
20384fi
20385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20386$as_echo "$cross_compiling" >&6; }
20387
20388rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20389ac_clean_files=$ac_clean_files_save
20390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20391$as_echo_n "checking for suffix of object files... " >&6; }
20392if ${ac_cv_objext+:} false; then :
20393  $as_echo_n "(cached) " >&6
20394else
20395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20396/* end confdefs.h.  */
20397
20398int
20399main ()
20400{
20401
20402  ;
20403  return 0;
20404}
20405_ACEOF
20406rm -f conftest.o conftest.obj
20407if { { ac_try="$ac_compile"
20408case "(($ac_try" in
20409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20410  *) ac_try_echo=$ac_try;;
20411esac
20412eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20413$as_echo "$ac_try_echo"; } >&5
20414  (eval "$ac_compile") 2>&5
20415  ac_status=$?
20416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20417  test $ac_status = 0; }; then :
20418  for ac_file in conftest.o conftest.obj conftest.*; do
20419  test -f "$ac_file" || continue;
20420  case $ac_file in
20421    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20422    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20423       break;;
20424  esac
20425done
20426else
20427  $as_echo "$as_me: failed program was:" >&5
20428sed 's/^/| /' conftest.$ac_ext >&5
20429
20430{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20432as_fn_error $? "cannot compute suffix of object files: cannot compile
20433See \`config.log' for more details" "$LINENO" 5; }
20434fi
20435rm -f conftest.$ac_cv_objext conftest.$ac_ext
20436fi
20437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20438$as_echo "$ac_cv_objext" >&6; }
20439OBJEXT=$ac_cv_objext
20440ac_objext=$OBJEXT
20441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20442$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20443if ${ac_cv_c_compiler_gnu+:} false; then :
20444  $as_echo_n "(cached) " >&6
20445else
20446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20447/* end confdefs.h.  */
20448
20449int
20450main ()
20451{
20452#ifndef __GNUC__
20453       choke me
20454#endif
20455
20456  ;
20457  return 0;
20458}
20459_ACEOF
20460if ac_fn_c_try_compile "$LINENO"; then :
20461  ac_compiler_gnu=yes
20462else
20463  ac_compiler_gnu=no
20464fi
20465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20466ac_cv_c_compiler_gnu=$ac_compiler_gnu
20467
20468fi
20469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20470$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20471if test $ac_compiler_gnu = yes; then
20472  GCC=yes
20473else
20474  GCC=
20475fi
20476ac_test_CFLAGS=${CFLAGS+set}
20477ac_save_CFLAGS=$CFLAGS
20478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20479$as_echo_n "checking whether $CC accepts -g... " >&6; }
20480if ${ac_cv_prog_cc_g+:} false; then :
20481  $as_echo_n "(cached) " >&6
20482else
20483  ac_save_c_werror_flag=$ac_c_werror_flag
20484   ac_c_werror_flag=yes
20485   ac_cv_prog_cc_g=no
20486   CFLAGS="-g"
20487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20488/* end confdefs.h.  */
20489
20490int
20491main ()
20492{
20493
20494  ;
20495  return 0;
20496}
20497_ACEOF
20498if ac_fn_c_try_compile "$LINENO"; then :
20499  ac_cv_prog_cc_g=yes
20500else
20501  CFLAGS=""
20502      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20503/* end confdefs.h.  */
20504
20505int
20506main ()
20507{
20508
20509  ;
20510  return 0;
20511}
20512_ACEOF
20513if ac_fn_c_try_compile "$LINENO"; then :
20514
20515else
20516  ac_c_werror_flag=$ac_save_c_werror_flag
20517	 CFLAGS="-g"
20518	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20519/* end confdefs.h.  */
20520
20521int
20522main ()
20523{
20524
20525  ;
20526  return 0;
20527}
20528_ACEOF
20529if ac_fn_c_try_compile "$LINENO"; then :
20530  ac_cv_prog_cc_g=yes
20531fi
20532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20533fi
20534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20535fi
20536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20537   ac_c_werror_flag=$ac_save_c_werror_flag
20538fi
20539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20540$as_echo "$ac_cv_prog_cc_g" >&6; }
20541if test "$ac_test_CFLAGS" = set; then
20542  CFLAGS=$ac_save_CFLAGS
20543elif test $ac_cv_prog_cc_g = yes; then
20544  if test "$GCC" = yes; then
20545    CFLAGS="-g -O2"
20546  else
20547    CFLAGS="-g"
20548  fi
20549else
20550  if test "$GCC" = yes; then
20551    CFLAGS="-O2"
20552  else
20553    CFLAGS=
20554  fi
20555fi
20556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20557$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20558if ${ac_cv_prog_cc_c89+:} false; then :
20559  $as_echo_n "(cached) " >&6
20560else
20561  ac_cv_prog_cc_c89=no
20562ac_save_CC=$CC
20563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20564/* end confdefs.h.  */
20565#include <stdarg.h>
20566#include <stdio.h>
20567struct stat;
20568/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20569struct buf { int x; };
20570FILE * (*rcsopen) (struct buf *, struct stat *, int);
20571static char *e (p, i)
20572     char **p;
20573     int i;
20574{
20575  return p[i];
20576}
20577static char *f (char * (*g) (char **, int), char **p, ...)
20578{
20579  char *s;
20580  va_list v;
20581  va_start (v,p);
20582  s = g (p, va_arg (v,int));
20583  va_end (v);
20584  return s;
20585}
20586
20587/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20588   function prototypes and stuff, but not '\xHH' hex character constants.
20589   These don't provoke an error unfortunately, instead are silently treated
20590   as 'x'.  The following induces an error, until -std is added to get
20591   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20592   array size at least.  It's necessary to write '\x00'==0 to get something
20593   that's true only with -std.  */
20594int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20595
20596/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20597   inside strings and character constants.  */
20598#define FOO(x) 'x'
20599int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20600
20601int test (int i, double x);
20602struct s1 {int (*f) (int a);};
20603struct s2 {int (*f) (double a);};
20604int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20605int argc;
20606char **argv;
20607int
20608main ()
20609{
20610return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20611  ;
20612  return 0;
20613}
20614_ACEOF
20615for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20616	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20617do
20618  CC="$ac_save_CC $ac_arg"
20619  if ac_fn_c_try_compile "$LINENO"; then :
20620  ac_cv_prog_cc_c89=$ac_arg
20621fi
20622rm -f core conftest.err conftest.$ac_objext
20623  test "x$ac_cv_prog_cc_c89" != "xno" && break
20624done
20625rm -f conftest.$ac_ext
20626CC=$ac_save_CC
20627
20628fi
20629# AC_CACHE_VAL
20630case "x$ac_cv_prog_cc_c89" in
20631  x)
20632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20633$as_echo "none needed" >&6; } ;;
20634  xno)
20635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20636$as_echo "unsupported" >&6; } ;;
20637  *)
20638    CC="$CC $ac_cv_prog_cc_c89"
20639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20640$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20641esac
20642if test "x$ac_cv_prog_cc_c89" != xno; then :
20643
20644fi
20645
20646ac_ext=cpp
20647ac_cpp='$CXXCPP $CPPFLAGS'
20648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20651
20652
20653  ### Locate C++ compiler (CXX)
20654
20655  if test "x$CXX" != x; then
20656    COMPILER_CHECK_LIST="$CXX"
20657  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20658    COMPILER_CHECK_LIST="cl"
20659  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20660    COMPILER_CHECK_LIST="CC g++"
20661  else
20662    COMPILER_CHECK_LIST="g++ CC"
20663  fi
20664
20665
20666  COMPILER_NAME=C++
20667
20668  CXX=
20669  # If TOOLS_DIR is set, check for all compiler names in there first
20670  # before checking the rest of the PATH.
20671  if test -n "$TOOLS_DIR"; then
20672    PATH_save="$PATH"
20673    PATH="$TOOLS_DIR"
20674    for ac_prog in $COMPILER_CHECK_LIST
20675do
20676  # Extract the first word of "$ac_prog", so it can be a program name with args.
20677set dummy $ac_prog; ac_word=$2
20678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20679$as_echo_n "checking for $ac_word... " >&6; }
20680if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20681  $as_echo_n "(cached) " >&6
20682else
20683  case $TOOLS_DIR_CXX in
20684  [\\/]* | ?:[\\/]*)
20685  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20686  ;;
20687  *)
20688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20689for as_dir in $PATH
20690do
20691  IFS=$as_save_IFS
20692  test -z "$as_dir" && as_dir=.
20693    for ac_exec_ext in '' $ac_executable_extensions; do
20694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20695    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20697    break 2
20698  fi
20699done
20700  done
20701IFS=$as_save_IFS
20702
20703  ;;
20704esac
20705fi
20706TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20707if test -n "$TOOLS_DIR_CXX"; then
20708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20709$as_echo "$TOOLS_DIR_CXX" >&6; }
20710else
20711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20712$as_echo "no" >&6; }
20713fi
20714
20715
20716  test -n "$TOOLS_DIR_CXX" && break
20717done
20718
20719    CXX=$TOOLS_DIR_CXX
20720    PATH="$PATH_save"
20721  fi
20722
20723  # AC_PATH_PROGS can't be run multiple times with the same variable,
20724  # so create a new name for this run.
20725  if test "x$CXX" = x; then
20726    for ac_prog in $COMPILER_CHECK_LIST
20727do
20728  # Extract the first word of "$ac_prog", so it can be a program name with args.
20729set dummy $ac_prog; ac_word=$2
20730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20731$as_echo_n "checking for $ac_word... " >&6; }
20732if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20733  $as_echo_n "(cached) " >&6
20734else
20735  case $POTENTIAL_CXX in
20736  [\\/]* | ?:[\\/]*)
20737  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20738  ;;
20739  *)
20740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20741for as_dir in $PATH
20742do
20743  IFS=$as_save_IFS
20744  test -z "$as_dir" && as_dir=.
20745    for ac_exec_ext in '' $ac_executable_extensions; do
20746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20747    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20749    break 2
20750  fi
20751done
20752  done
20753IFS=$as_save_IFS
20754
20755  ;;
20756esac
20757fi
20758POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20759if test -n "$POTENTIAL_CXX"; then
20760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20761$as_echo "$POTENTIAL_CXX" >&6; }
20762else
20763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20764$as_echo "no" >&6; }
20765fi
20766
20767
20768  test -n "$POTENTIAL_CXX" && break
20769done
20770
20771    CXX=$POTENTIAL_CXX
20772  fi
20773
20774  if test "x$CXX" = x; then
20775
20776  # Print a helpful message on how to acquire the necessary build dependency.
20777  # devkit is the help tag: freetype, cups, pulse, alsa etc
20778  MISSING_DEPENDENCY=devkit
20779
20780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20781    cygwin_help $MISSING_DEPENDENCY
20782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20783    msys_help $MISSING_DEPENDENCY
20784  else
20785    PKGHANDLER_COMMAND=
20786
20787    case $PKGHANDLER in
20788      apt-get)
20789        apt_help     $MISSING_DEPENDENCY ;;
20790      yum)
20791        yum_help     $MISSING_DEPENDENCY ;;
20792      port)
20793        port_help    $MISSING_DEPENDENCY ;;
20794      pkgutil)
20795        pkgutil_help $MISSING_DEPENDENCY ;;
20796      pkgadd)
20797        pkgadd_help  $MISSING_DEPENDENCY ;;
20798      * )
20799        break ;;
20800    esac
20801
20802    if test "x$PKGHANDLER_COMMAND" != x; then
20803      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20804    fi
20805  fi
20806
20807    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20808  fi
20809
20810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20811
20812  # First separate the path from the arguments. This will split at the first
20813  # space.
20814  complete="$CXX"
20815  path="${complete%% *}"
20816  tmp="$complete EOL"
20817  arguments="${tmp#* }"
20818
20819  # Input might be given as Windows format, start by converting to
20820  # unix format.
20821  new_path=`$CYGPATH -u "$path"`
20822
20823  # Now try to locate executable using which
20824  new_path=`$WHICH "$new_path" 2> /dev/null`
20825  # bat and cmd files are not always considered executable in cygwin causing which
20826  # to not find them
20827  if test "x$new_path" = x \
20828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20830    new_path=`$CYGPATH -u "$path"`
20831  fi
20832  if test "x$new_path" = x; then
20833    # Oops. Which didn't find the executable.
20834    # The splitting of arguments from the executable at a space might have been incorrect,
20835    # since paths with space are more likely in Windows. Give it another try with the whole
20836    # argument.
20837    path="$complete"
20838    arguments="EOL"
20839    new_path=`$CYGPATH -u "$path"`
20840    new_path=`$WHICH "$new_path" 2> /dev/null`
20841    # bat and cmd files are not always considered executable in cygwin causing which
20842    # to not find them
20843    if test "x$new_path" = x \
20844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20846      new_path=`$CYGPATH -u "$path"`
20847    fi
20848    if test "x$new_path" = x; then
20849      # It's still not found. Now this is an unrecoverable error.
20850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20851$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20852      has_space=`$ECHO "$complete" | $GREP " "`
20853      if test "x$has_space" != x; then
20854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20856      fi
20857      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20858    fi
20859  fi
20860
20861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20864  # "foo.exe" is OK but "foo" is an error.
20865  #
20866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20867  # It is also a way to make sure we got the proper file name for the real test later on.
20868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20869  if test "x$test_shortpath" = x; then
20870    # Short path failed, file does not exist as specified.
20871    # Try adding .exe or .cmd
20872    if test -f "${new_path}.exe"; then
20873      input_to_shortpath="${new_path}.exe"
20874    elif test -f "${new_path}.cmd"; then
20875      input_to_shortpath="${new_path}.cmd"
20876    else
20877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20878$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20881      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20882    fi
20883  else
20884    input_to_shortpath="$new_path"
20885  fi
20886
20887  # Call helper function which possibly converts this using DOS-style short mode.
20888  # If so, the updated path is stored in $new_path.
20889  new_path="$input_to_shortpath"
20890
20891  input_path="$input_to_shortpath"
20892  # Check if we need to convert this using DOS-style short mode. If the path
20893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20894  # take no chances and rewrite it.
20895  # Note: m4 eats our [], so we need to use [ and ] instead.
20896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20897  if test "x$has_forbidden_chars" != x; then
20898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20902      # Going to short mode and back again did indeed matter. Since short mode is
20903      # case insensitive, let's make it lowercase to improve readability.
20904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20905      # Now convert it back to Unix-stile (cygpath)
20906      input_path=`$CYGPATH -u "$shortmode_path"`
20907      new_path="$input_path"
20908    fi
20909  fi
20910
20911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20912  if test "x$test_cygdrive_prefix" = x; then
20913    # As a simple fix, exclude /usr/bin since it's not a real path.
20914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20916      # a path prefixed by /cygdrive for fixpath to work.
20917      new_path="$CYGWIN_ROOT_PATH$input_path"
20918    fi
20919  fi
20920
20921  # remove trailing .exe if any
20922  new_path="${new_path/%.exe/}"
20923
20924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20925
20926  # First separate the path from the arguments. This will split at the first
20927  # space.
20928  complete="$CXX"
20929  path="${complete%% *}"
20930  tmp="$complete EOL"
20931  arguments="${tmp#* }"
20932
20933  # Input might be given as Windows format, start by converting to
20934  # unix format.
20935  new_path="$path"
20936
20937  windows_path="$new_path"
20938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20939    unix_path=`$CYGPATH -u "$windows_path"`
20940    new_path="$unix_path"
20941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20943    new_path="$unix_path"
20944  fi
20945
20946
20947  # Now try to locate executable using which
20948  new_path=`$WHICH "$new_path" 2> /dev/null`
20949
20950  if test "x$new_path" = x; then
20951    # Oops. Which didn't find the executable.
20952    # The splitting of arguments from the executable at a space might have been incorrect,
20953    # since paths with space are more likely in Windows. Give it another try with the whole
20954    # argument.
20955    path="$complete"
20956    arguments="EOL"
20957    new_path="$path"
20958
20959  windows_path="$new_path"
20960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20961    unix_path=`$CYGPATH -u "$windows_path"`
20962    new_path="$unix_path"
20963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20965    new_path="$unix_path"
20966  fi
20967
20968
20969    new_path=`$WHICH "$new_path" 2> /dev/null`
20970
20971    if test "x$new_path" = x; then
20972      # It's still not found. Now this is an unrecoverable error.
20973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20974$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20975      has_space=`$ECHO "$complete" | $GREP " "`
20976      if test "x$has_space" != x; then
20977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20979      fi
20980      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20981    fi
20982  fi
20983
20984  # Now new_path has a complete unix path to the binary
20985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20986    # Keep paths in /bin as-is, but remove trailing .exe if any
20987    new_path="${new_path/%.exe/}"
20988    # Do not save /bin paths to all_fixpath_prefixes!
20989  else
20990    # Not in mixed or Windows style, start by that.
20991    new_path=`cmd //c echo $new_path`
20992
20993  input_path="$new_path"
20994  # Check if we need to convert this using DOS-style short mode. If the path
20995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20996  # take no chances and rewrite it.
20997  # Note: m4 eats our [], so we need to use [ and ] instead.
20998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20999  if test "x$has_forbidden_chars" != x; then
21000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21002  fi
21003
21004    # Output is in $new_path
21005
21006  windows_path="$new_path"
21007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21008    unix_path=`$CYGPATH -u "$windows_path"`
21009    new_path="$unix_path"
21010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21012    new_path="$unix_path"
21013  fi
21014
21015    # remove trailing .exe if any
21016    new_path="${new_path/%.exe/}"
21017
21018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21020  fi
21021
21022  else
21023    # We're on a posix platform. Hooray! :)
21024    # First separate the path from the arguments. This will split at the first
21025    # space.
21026    complete="$CXX"
21027    path="${complete%% *}"
21028    tmp="$complete EOL"
21029    arguments="${tmp#* }"
21030
21031    # Cannot rely on the command "which" here since it doesn't always work.
21032    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21033    if test -z "$is_absolute_path"; then
21034      # Path to executable is not absolute. Find it.
21035      IFS_save="$IFS"
21036      IFS=:
21037      for p in $PATH; do
21038        if test -f "$p/$path" && test -x "$p/$path"; then
21039          new_path="$p/$path"
21040          break
21041        fi
21042      done
21043      IFS="$IFS_save"
21044    else
21045      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21046$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21047      new_path="$path"
21048    fi
21049
21050    if test "x$new_path" = x; then
21051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21052$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21053      has_space=`$ECHO "$complete" | $GREP " "`
21054      if test "x$has_space" != x; then
21055        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21057      fi
21058      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21059    fi
21060  fi
21061
21062  # Now join together the path and the arguments once again
21063  if test "x$arguments" != xEOL; then
21064    new_complete="$new_path ${arguments% *}"
21065  else
21066    new_complete="$new_path"
21067  fi
21068
21069  if test "x$complete" != "x$new_complete"; then
21070    CXX="$new_complete"
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21072$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21073  fi
21074
21075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21076$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21077  TEST_COMPILER="$CXX"
21078
21079  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21080    # Follow a chain of symbolic links. Use readlink
21081    # where it exists, else fall back to horribly
21082    # complicated shell code.
21083    if test "x$READLINK_TESTED" != yes; then
21084      # On MacOSX there is a readlink tool with a different
21085      # purpose than the GNU readlink tool. Check the found readlink.
21086      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21087      if test "x$ISGNU" = x; then
21088        # A readlink that we do not know how to use.
21089        # Are there other non-GNU readlinks out there?
21090        READLINK_TESTED=yes
21091        READLINK=
21092      fi
21093    fi
21094
21095    if test "x$READLINK" != x; then
21096      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21097    else
21098      # Save the current directory for restoring afterwards
21099      STARTDIR=$PWD
21100      COUNTER=0
21101      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21102      sym_link_file=`$BASENAME $TEST_COMPILER`
21103      cd $sym_link_dir
21104      # Use -P flag to resolve symlinks in directories.
21105      cd `$THEPWDCMD -P`
21106      sym_link_dir=`$THEPWDCMD -P`
21107      # Resolve file symlinks
21108      while test $COUNTER -lt 20; do
21109        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21110        if test "x$ISLINK" == x; then
21111          # This is not a symbolic link! We are done!
21112          break
21113        fi
21114        # Again resolve directory symlinks since the target of the just found
21115        # link could be in a different directory
21116        cd `$DIRNAME $ISLINK`
21117        sym_link_dir=`$THEPWDCMD -P`
21118        sym_link_file=`$BASENAME $ISLINK`
21119        let COUNTER=COUNTER+1
21120      done
21121      cd $STARTDIR
21122      TEST_COMPILER=$sym_link_dir/$sym_link_file
21123    fi
21124  fi
21125
21126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21127$as_echo "$TEST_COMPILER" >&6; }
21128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21129$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21130
21131  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21132  if test "x$COMPILER_BASENAME" = "xccache"; then
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21134$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21135    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21136    # We want to control ccache invocation ourselves, so ignore this cc and try
21137    # searching again.
21138
21139    # Remove the path to the fake ccache cc from the PATH
21140    RETRY_COMPILER_SAVED_PATH="$PATH"
21141    COMPILER_DIRNAME=`$DIRNAME $CXX`
21142    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21143
21144    # Try again looking for our compiler
21145    if test -n "$ac_tool_prefix"; then
21146  for ac_prog in $COMPILER_CHECK_LIST
21147  do
21148    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21151$as_echo_n "checking for $ac_word... " >&6; }
21152if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21153  $as_echo_n "(cached) " >&6
21154else
21155  if test -n "$PROPER_COMPILER_CXX"; then
21156  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21157else
21158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21159for as_dir in $PATH
21160do
21161  IFS=$as_save_IFS
21162  test -z "$as_dir" && as_dir=.
21163    for ac_exec_ext in '' $ac_executable_extensions; do
21164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21165    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21167    break 2
21168  fi
21169done
21170  done
21171IFS=$as_save_IFS
21172
21173fi
21174fi
21175PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21176if test -n "$PROPER_COMPILER_CXX"; then
21177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21178$as_echo "$PROPER_COMPILER_CXX" >&6; }
21179else
21180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21181$as_echo "no" >&6; }
21182fi
21183
21184
21185    test -n "$PROPER_COMPILER_CXX" && break
21186  done
21187fi
21188if test -z "$PROPER_COMPILER_CXX"; then
21189  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21190  for ac_prog in $COMPILER_CHECK_LIST
21191do
21192  # Extract the first word of "$ac_prog", so it can be a program name with args.
21193set dummy $ac_prog; ac_word=$2
21194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21195$as_echo_n "checking for $ac_word... " >&6; }
21196if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21197  $as_echo_n "(cached) " >&6
21198else
21199  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21200  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21201else
21202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21203for as_dir in $PATH
21204do
21205  IFS=$as_save_IFS
21206  test -z "$as_dir" && as_dir=.
21207    for ac_exec_ext in '' $ac_executable_extensions; do
21208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21209    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21211    break 2
21212  fi
21213done
21214  done
21215IFS=$as_save_IFS
21216
21217fi
21218fi
21219ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21220if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21222$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21223else
21224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21225$as_echo "no" >&6; }
21226fi
21227
21228
21229  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21230done
21231
21232  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21233    PROPER_COMPILER_CXX=""
21234  else
21235    case $cross_compiling:$ac_tool_warned in
21236yes:)
21237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21239ac_tool_warned=yes ;;
21240esac
21241    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21242  fi
21243fi
21244
21245
21246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21247
21248  # First separate the path from the arguments. This will split at the first
21249  # space.
21250  complete="$PROPER_COMPILER_CXX"
21251  path="${complete%% *}"
21252  tmp="$complete EOL"
21253  arguments="${tmp#* }"
21254
21255  # Input might be given as Windows format, start by converting to
21256  # unix format.
21257  new_path=`$CYGPATH -u "$path"`
21258
21259  # Now try to locate executable using which
21260  new_path=`$WHICH "$new_path" 2> /dev/null`
21261  # bat and cmd files are not always considered executable in cygwin causing which
21262  # to not find them
21263  if test "x$new_path" = x \
21264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21266    new_path=`$CYGPATH -u "$path"`
21267  fi
21268  if test "x$new_path" = x; then
21269    # Oops. Which didn't find the executable.
21270    # The splitting of arguments from the executable at a space might have been incorrect,
21271    # since paths with space are more likely in Windows. Give it another try with the whole
21272    # argument.
21273    path="$complete"
21274    arguments="EOL"
21275    new_path=`$CYGPATH -u "$path"`
21276    new_path=`$WHICH "$new_path" 2> /dev/null`
21277    # bat and cmd files are not always considered executable in cygwin causing which
21278    # to not find them
21279    if test "x$new_path" = x \
21280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21282      new_path=`$CYGPATH -u "$path"`
21283    fi
21284    if test "x$new_path" = x; then
21285      # It's still not found. Now this is an unrecoverable error.
21286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21287$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21288      has_space=`$ECHO "$complete" | $GREP " "`
21289      if test "x$has_space" != x; then
21290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21292      fi
21293      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21294    fi
21295  fi
21296
21297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21300  # "foo.exe" is OK but "foo" is an error.
21301  #
21302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21303  # It is also a way to make sure we got the proper file name for the real test later on.
21304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21305  if test "x$test_shortpath" = x; then
21306    # Short path failed, file does not exist as specified.
21307    # Try adding .exe or .cmd
21308    if test -f "${new_path}.exe"; then
21309      input_to_shortpath="${new_path}.exe"
21310    elif test -f "${new_path}.cmd"; then
21311      input_to_shortpath="${new_path}.cmd"
21312    else
21313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21314$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21317      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21318    fi
21319  else
21320    input_to_shortpath="$new_path"
21321  fi
21322
21323  # Call helper function which possibly converts this using DOS-style short mode.
21324  # If so, the updated path is stored in $new_path.
21325  new_path="$input_to_shortpath"
21326
21327  input_path="$input_to_shortpath"
21328  # Check if we need to convert this using DOS-style short mode. If the path
21329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21330  # take no chances and rewrite it.
21331  # Note: m4 eats our [], so we need to use [ and ] instead.
21332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21333  if test "x$has_forbidden_chars" != x; then
21334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21338      # Going to short mode and back again did indeed matter. Since short mode is
21339      # case insensitive, let's make it lowercase to improve readability.
21340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21341      # Now convert it back to Unix-stile (cygpath)
21342      input_path=`$CYGPATH -u "$shortmode_path"`
21343      new_path="$input_path"
21344    fi
21345  fi
21346
21347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21348  if test "x$test_cygdrive_prefix" = x; then
21349    # As a simple fix, exclude /usr/bin since it's not a real path.
21350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21352      # a path prefixed by /cygdrive for fixpath to work.
21353      new_path="$CYGWIN_ROOT_PATH$input_path"
21354    fi
21355  fi
21356
21357  # remove trailing .exe if any
21358  new_path="${new_path/%.exe/}"
21359
21360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21361
21362  # First separate the path from the arguments. This will split at the first
21363  # space.
21364  complete="$PROPER_COMPILER_CXX"
21365  path="${complete%% *}"
21366  tmp="$complete EOL"
21367  arguments="${tmp#* }"
21368
21369  # Input might be given as Windows format, start by converting to
21370  # unix format.
21371  new_path="$path"
21372
21373  windows_path="$new_path"
21374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21375    unix_path=`$CYGPATH -u "$windows_path"`
21376    new_path="$unix_path"
21377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21379    new_path="$unix_path"
21380  fi
21381
21382
21383  # Now try to locate executable using which
21384  new_path=`$WHICH "$new_path" 2> /dev/null`
21385
21386  if test "x$new_path" = x; then
21387    # Oops. Which didn't find the executable.
21388    # The splitting of arguments from the executable at a space might have been incorrect,
21389    # since paths with space are more likely in Windows. Give it another try with the whole
21390    # argument.
21391    path="$complete"
21392    arguments="EOL"
21393    new_path="$path"
21394
21395  windows_path="$new_path"
21396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21397    unix_path=`$CYGPATH -u "$windows_path"`
21398    new_path="$unix_path"
21399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21401    new_path="$unix_path"
21402  fi
21403
21404
21405    new_path=`$WHICH "$new_path" 2> /dev/null`
21406
21407    if test "x$new_path" = x; then
21408      # It's still not found. Now this is an unrecoverable error.
21409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21410$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21411      has_space=`$ECHO "$complete" | $GREP " "`
21412      if test "x$has_space" != x; then
21413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21415      fi
21416      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21417    fi
21418  fi
21419
21420  # Now new_path has a complete unix path to the binary
21421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21422    # Keep paths in /bin as-is, but remove trailing .exe if any
21423    new_path="${new_path/%.exe/}"
21424    # Do not save /bin paths to all_fixpath_prefixes!
21425  else
21426    # Not in mixed or Windows style, start by that.
21427    new_path=`cmd //c echo $new_path`
21428
21429  input_path="$new_path"
21430  # Check if we need to convert this using DOS-style short mode. If the path
21431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21432  # take no chances and rewrite it.
21433  # Note: m4 eats our [], so we need to use [ and ] instead.
21434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21435  if test "x$has_forbidden_chars" != x; then
21436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21438  fi
21439
21440    # Output is in $new_path
21441
21442  windows_path="$new_path"
21443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21444    unix_path=`$CYGPATH -u "$windows_path"`
21445    new_path="$unix_path"
21446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21448    new_path="$unix_path"
21449  fi
21450
21451    # remove trailing .exe if any
21452    new_path="${new_path/%.exe/}"
21453
21454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21456  fi
21457
21458  else
21459    # We're on a posix platform. Hooray! :)
21460    # First separate the path from the arguments. This will split at the first
21461    # space.
21462    complete="$PROPER_COMPILER_CXX"
21463    path="${complete%% *}"
21464    tmp="$complete EOL"
21465    arguments="${tmp#* }"
21466
21467    # Cannot rely on the command "which" here since it doesn't always work.
21468    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21469    if test -z "$is_absolute_path"; then
21470      # Path to executable is not absolute. Find it.
21471      IFS_save="$IFS"
21472      IFS=:
21473      for p in $PATH; do
21474        if test -f "$p/$path" && test -x "$p/$path"; then
21475          new_path="$p/$path"
21476          break
21477        fi
21478      done
21479      IFS="$IFS_save"
21480    else
21481      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21482$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21483      new_path="$path"
21484    fi
21485
21486    if test "x$new_path" = x; then
21487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21488$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21489      has_space=`$ECHO "$complete" | $GREP " "`
21490      if test "x$has_space" != x; then
21491        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21493      fi
21494      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21495    fi
21496  fi
21497
21498  # Now join together the path and the arguments once again
21499  if test "x$arguments" != xEOL; then
21500    new_complete="$new_path ${arguments% *}"
21501  else
21502    new_complete="$new_path"
21503  fi
21504
21505  if test "x$complete" != "x$new_complete"; then
21506    PROPER_COMPILER_CXX="$new_complete"
21507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21508$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21509  fi
21510
21511    PATH="$RETRY_COMPILER_SAVED_PATH"
21512
21513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21514$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21515
21516  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21517    # Follow a chain of symbolic links. Use readlink
21518    # where it exists, else fall back to horribly
21519    # complicated shell code.
21520    if test "x$READLINK_TESTED" != yes; then
21521      # On MacOSX there is a readlink tool with a different
21522      # purpose than the GNU readlink tool. Check the found readlink.
21523      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21524      if test "x$ISGNU" = x; then
21525        # A readlink that we do not know how to use.
21526        # Are there other non-GNU readlinks out there?
21527        READLINK_TESTED=yes
21528        READLINK=
21529      fi
21530    fi
21531
21532    if test "x$READLINK" != x; then
21533      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21534    else
21535      # Save the current directory for restoring afterwards
21536      STARTDIR=$PWD
21537      COUNTER=0
21538      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21539      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21540      cd $sym_link_dir
21541      # Use -P flag to resolve symlinks in directories.
21542      cd `$THEPWDCMD -P`
21543      sym_link_dir=`$THEPWDCMD -P`
21544      # Resolve file symlinks
21545      while test $COUNTER -lt 20; do
21546        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21547        if test "x$ISLINK" == x; then
21548          # This is not a symbolic link! We are done!
21549          break
21550        fi
21551        # Again resolve directory symlinks since the target of the just found
21552        # link could be in a different directory
21553        cd `$DIRNAME $ISLINK`
21554        sym_link_dir=`$THEPWDCMD -P`
21555        sym_link_file=`$BASENAME $ISLINK`
21556        let COUNTER=COUNTER+1
21557      done
21558      cd $STARTDIR
21559      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21560    fi
21561  fi
21562
21563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21564$as_echo "$PROPER_COMPILER_CXX" >&6; }
21565    CXX="$PROPER_COMPILER_CXX"
21566  else
21567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21568$as_echo "no, keeping CXX" >&6; }
21569  fi
21570
21571
21572  COMPILER=$CXX
21573  COMPILER_NAME=$COMPILER_NAME
21574
21575  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21576    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21577    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21578    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21579    if test $? -ne 0; then
21580      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21581
21582      { $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
21583$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21585$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21586      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21587    else
21588      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21589      COMPILER_VENDOR="Sun Studio"
21590    fi
21591  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21592    # First line typically looks something like:
21593    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21594    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21595    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21596    COMPILER_VENDOR="Microsoft CL.EXE"
21597    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21598    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21599      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21600        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21601      fi
21602    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21603      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21604        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21605      fi
21606    fi
21607  else
21608    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21609    # Check that this is likely to be GCC.
21610    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21611    if test $? -ne 0; then
21612      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21613$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21614      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21615$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21616      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21617    fi
21618
21619    # First line typically looks something like:
21620    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21621    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21622    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21623  fi
21624  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21625  CXX_VERSION="$COMPILER_VERSION"
21626  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21627  CXX_VENDOR="$COMPILER_VENDOR"
21628
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21630$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21631
21632
21633  # Now that we have resolved CXX ourself, let autoconf have its go at it
21634  ac_ext=cpp
21635ac_cpp='$CXXCPP $CPPFLAGS'
21636ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21637ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21638ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21639if test -z "$CXX"; then
21640  if test -n "$CCC"; then
21641    CXX=$CCC
21642  else
21643    if test -n "$ac_tool_prefix"; then
21644  for ac_prog in $CXX
21645  do
21646    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21649$as_echo_n "checking for $ac_word... " >&6; }
21650if ${ac_cv_prog_CXX+:} false; then :
21651  $as_echo_n "(cached) " >&6
21652else
21653  if test -n "$CXX"; then
21654  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21655else
21656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21657for as_dir in $PATH
21658do
21659  IFS=$as_save_IFS
21660  test -z "$as_dir" && as_dir=.
21661    for ac_exec_ext in '' $ac_executable_extensions; do
21662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21663    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21665    break 2
21666  fi
21667done
21668  done
21669IFS=$as_save_IFS
21670
21671fi
21672fi
21673CXX=$ac_cv_prog_CXX
21674if test -n "$CXX"; then
21675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21676$as_echo "$CXX" >&6; }
21677else
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21679$as_echo "no" >&6; }
21680fi
21681
21682
21683    test -n "$CXX" && break
21684  done
21685fi
21686if test -z "$CXX"; then
21687  ac_ct_CXX=$CXX
21688  for ac_prog in $CXX
21689do
21690  # Extract the first word of "$ac_prog", so it can be a program name with args.
21691set dummy $ac_prog; ac_word=$2
21692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21693$as_echo_n "checking for $ac_word... " >&6; }
21694if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21695  $as_echo_n "(cached) " >&6
21696else
21697  if test -n "$ac_ct_CXX"; then
21698  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21699else
21700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21701for as_dir in $PATH
21702do
21703  IFS=$as_save_IFS
21704  test -z "$as_dir" && as_dir=.
21705    for ac_exec_ext in '' $ac_executable_extensions; do
21706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21707    ac_cv_prog_ac_ct_CXX="$ac_prog"
21708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21709    break 2
21710  fi
21711done
21712  done
21713IFS=$as_save_IFS
21714
21715fi
21716fi
21717ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21718if test -n "$ac_ct_CXX"; then
21719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21720$as_echo "$ac_ct_CXX" >&6; }
21721else
21722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21723$as_echo "no" >&6; }
21724fi
21725
21726
21727  test -n "$ac_ct_CXX" && break
21728done
21729
21730  if test "x$ac_ct_CXX" = x; then
21731    CXX="g++"
21732  else
21733    case $cross_compiling:$ac_tool_warned in
21734yes:)
21735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21737ac_tool_warned=yes ;;
21738esac
21739    CXX=$ac_ct_CXX
21740  fi
21741fi
21742
21743  fi
21744fi
21745# Provide some information about the compiler.
21746$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21747set X $ac_compile
21748ac_compiler=$2
21749for ac_option in --version -v -V -qversion; do
21750  { { ac_try="$ac_compiler $ac_option >&5"
21751case "(($ac_try" in
21752  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21753  *) ac_try_echo=$ac_try;;
21754esac
21755eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21756$as_echo "$ac_try_echo"; } >&5
21757  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21758  ac_status=$?
21759  if test -s conftest.err; then
21760    sed '10a\
21761... rest of stderr output deleted ...
21762         10q' conftest.err >conftest.er1
21763    cat conftest.er1 >&5
21764  fi
21765  rm -f conftest.er1 conftest.err
21766  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21767  test $ac_status = 0; }
21768done
21769
21770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21771$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21772if ${ac_cv_cxx_compiler_gnu+:} false; then :
21773  $as_echo_n "(cached) " >&6
21774else
21775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21776/* end confdefs.h.  */
21777
21778int
21779main ()
21780{
21781#ifndef __GNUC__
21782       choke me
21783#endif
21784
21785  ;
21786  return 0;
21787}
21788_ACEOF
21789if ac_fn_cxx_try_compile "$LINENO"; then :
21790  ac_compiler_gnu=yes
21791else
21792  ac_compiler_gnu=no
21793fi
21794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21795ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21796
21797fi
21798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21799$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21800if test $ac_compiler_gnu = yes; then
21801  GXX=yes
21802else
21803  GXX=
21804fi
21805ac_test_CXXFLAGS=${CXXFLAGS+set}
21806ac_save_CXXFLAGS=$CXXFLAGS
21807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21808$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21809if ${ac_cv_prog_cxx_g+:} false; then :
21810  $as_echo_n "(cached) " >&6
21811else
21812  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21813   ac_cxx_werror_flag=yes
21814   ac_cv_prog_cxx_g=no
21815   CXXFLAGS="-g"
21816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21817/* end confdefs.h.  */
21818
21819int
21820main ()
21821{
21822
21823  ;
21824  return 0;
21825}
21826_ACEOF
21827if ac_fn_cxx_try_compile "$LINENO"; then :
21828  ac_cv_prog_cxx_g=yes
21829else
21830  CXXFLAGS=""
21831      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21832/* end confdefs.h.  */
21833
21834int
21835main ()
21836{
21837
21838  ;
21839  return 0;
21840}
21841_ACEOF
21842if ac_fn_cxx_try_compile "$LINENO"; then :
21843
21844else
21845  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21846	 CXXFLAGS="-g"
21847	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21848/* end confdefs.h.  */
21849
21850int
21851main ()
21852{
21853
21854  ;
21855  return 0;
21856}
21857_ACEOF
21858if ac_fn_cxx_try_compile "$LINENO"; then :
21859  ac_cv_prog_cxx_g=yes
21860fi
21861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21862fi
21863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21864fi
21865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21866   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21867fi
21868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21869$as_echo "$ac_cv_prog_cxx_g" >&6; }
21870if test "$ac_test_CXXFLAGS" = set; then
21871  CXXFLAGS=$ac_save_CXXFLAGS
21872elif test $ac_cv_prog_cxx_g = yes; then
21873  if test "$GXX" = yes; then
21874    CXXFLAGS="-g -O2"
21875  else
21876    CXXFLAGS="-g"
21877  fi
21878else
21879  if test "$GXX" = yes; then
21880    CXXFLAGS="-O2"
21881  else
21882    CXXFLAGS=
21883  fi
21884fi
21885ac_ext=cpp
21886ac_cpp='$CXXCPP $CPPFLAGS'
21887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21890
21891
21892  ### Locate other tools
21893
21894  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21895    ac_ext=m
21896ac_cpp='$OBJCPP $CPPFLAGS'
21897ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21898ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21899ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21900if test -n "$ac_tool_prefix"; then
21901  for ac_prog in gcc objcc objc cc CC
21902  do
21903    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21904set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21906$as_echo_n "checking for $ac_word... " >&6; }
21907if ${ac_cv_prog_OBJC+:} false; then :
21908  $as_echo_n "(cached) " >&6
21909else
21910  if test -n "$OBJC"; then
21911  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21912else
21913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21914for as_dir in $PATH
21915do
21916  IFS=$as_save_IFS
21917  test -z "$as_dir" && as_dir=.
21918    for ac_exec_ext in '' $ac_executable_extensions; do
21919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21920    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21922    break 2
21923  fi
21924done
21925  done
21926IFS=$as_save_IFS
21927
21928fi
21929fi
21930OBJC=$ac_cv_prog_OBJC
21931if test -n "$OBJC"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21933$as_echo "$OBJC" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940    test -n "$OBJC" && break
21941  done
21942fi
21943if test -z "$OBJC"; then
21944  ac_ct_OBJC=$OBJC
21945  for ac_prog in gcc objcc objc cc CC
21946do
21947  # Extract the first word of "$ac_prog", so it can be a program name with args.
21948set dummy $ac_prog; ac_word=$2
21949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21950$as_echo_n "checking for $ac_word... " >&6; }
21951if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21952  $as_echo_n "(cached) " >&6
21953else
21954  if test -n "$ac_ct_OBJC"; then
21955  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21956else
21957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21958for as_dir in $PATH
21959do
21960  IFS=$as_save_IFS
21961  test -z "$as_dir" && as_dir=.
21962    for ac_exec_ext in '' $ac_executable_extensions; do
21963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21964    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21966    break 2
21967  fi
21968done
21969  done
21970IFS=$as_save_IFS
21971
21972fi
21973fi
21974ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21975if test -n "$ac_ct_OBJC"; then
21976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21977$as_echo "$ac_ct_OBJC" >&6; }
21978else
21979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21980$as_echo "no" >&6; }
21981fi
21982
21983
21984  test -n "$ac_ct_OBJC" && break
21985done
21986
21987  if test "x$ac_ct_OBJC" = x; then
21988    OBJC="gcc"
21989  else
21990    case $cross_compiling:$ac_tool_warned in
21991yes:)
21992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21994ac_tool_warned=yes ;;
21995esac
21996    OBJC=$ac_ct_OBJC
21997  fi
21998fi
21999
22000# Provide some information about the compiler.
22001$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22002set X $ac_compile
22003ac_compiler=$2
22004for ac_option in --version -v -V -qversion; do
22005  { { ac_try="$ac_compiler $ac_option >&5"
22006case "(($ac_try" in
22007  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22008  *) ac_try_echo=$ac_try;;
22009esac
22010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22011$as_echo "$ac_try_echo"; } >&5
22012  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22013  ac_status=$?
22014  if test -s conftest.err; then
22015    sed '10a\
22016... rest of stderr output deleted ...
22017         10q' conftest.err >conftest.er1
22018    cat conftest.er1 >&5
22019  fi
22020  rm -f conftest.er1 conftest.err
22021  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22022  test $ac_status = 0; }
22023done
22024
22025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22026$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22027if ${ac_cv_objc_compiler_gnu+:} false; then :
22028  $as_echo_n "(cached) " >&6
22029else
22030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22031/* end confdefs.h.  */
22032
22033int
22034main ()
22035{
22036#ifndef __GNUC__
22037       choke me
22038#endif
22039
22040  ;
22041  return 0;
22042}
22043_ACEOF
22044if ac_fn_objc_try_compile "$LINENO"; then :
22045  ac_compiler_gnu=yes
22046else
22047  ac_compiler_gnu=no
22048fi
22049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22050ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22051
22052fi
22053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22054$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22055if test $ac_compiler_gnu = yes; then
22056  GOBJC=yes
22057else
22058  GOBJC=
22059fi
22060ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22061ac_save_OBJCFLAGS=$OBJCFLAGS
22062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22063$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22064if ${ac_cv_prog_objc_g+:} false; then :
22065  $as_echo_n "(cached) " >&6
22066else
22067  ac_save_objc_werror_flag=$ac_objc_werror_flag
22068   ac_objc_werror_flag=yes
22069   ac_cv_prog_objc_g=no
22070   OBJCFLAGS="-g"
22071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22072/* end confdefs.h.  */
22073
22074int
22075main ()
22076{
22077
22078  ;
22079  return 0;
22080}
22081_ACEOF
22082if ac_fn_objc_try_compile "$LINENO"; then :
22083  ac_cv_prog_objc_g=yes
22084else
22085  OBJCFLAGS=""
22086      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22087/* end confdefs.h.  */
22088
22089int
22090main ()
22091{
22092
22093  ;
22094  return 0;
22095}
22096_ACEOF
22097if ac_fn_objc_try_compile "$LINENO"; then :
22098
22099else
22100  ac_objc_werror_flag=$ac_save_objc_werror_flag
22101	 OBJCFLAGS="-g"
22102	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22103/* end confdefs.h.  */
22104
22105int
22106main ()
22107{
22108
22109  ;
22110  return 0;
22111}
22112_ACEOF
22113if ac_fn_objc_try_compile "$LINENO"; then :
22114  ac_cv_prog_objc_g=yes
22115fi
22116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22117fi
22118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22119fi
22120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22121   ac_objc_werror_flag=$ac_save_objc_werror_flag
22122fi
22123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22124$as_echo "$ac_cv_prog_objc_g" >&6; }
22125if test "$ac_test_OBJCFLAGS" = set; then
22126  OBJCFLAGS=$ac_save_OBJCFLAGS
22127elif test $ac_cv_prog_objc_g = yes; then
22128  if test "$GOBJC" = yes; then
22129    OBJCFLAGS="-g -O2"
22130  else
22131    OBJCFLAGS="-g"
22132  fi
22133else
22134  if test "$GOBJC" = yes; then
22135    OBJCFLAGS="-O2"
22136  else
22137    OBJCFLAGS=
22138  fi
22139fi
22140ac_ext=cpp
22141ac_cpp='$CXXCPP $CPPFLAGS'
22142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22145
22146
22147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22148
22149  # First separate the path from the arguments. This will split at the first
22150  # space.
22151  complete="$OBJC"
22152  path="${complete%% *}"
22153  tmp="$complete EOL"
22154  arguments="${tmp#* }"
22155
22156  # Input might be given as Windows format, start by converting to
22157  # unix format.
22158  new_path=`$CYGPATH -u "$path"`
22159
22160  # Now try to locate executable using which
22161  new_path=`$WHICH "$new_path" 2> /dev/null`
22162  # bat and cmd files are not always considered executable in cygwin causing which
22163  # to not find them
22164  if test "x$new_path" = x \
22165      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22166      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22167    new_path=`$CYGPATH -u "$path"`
22168  fi
22169  if test "x$new_path" = x; then
22170    # Oops. Which didn't find the executable.
22171    # The splitting of arguments from the executable at a space might have been incorrect,
22172    # since paths with space are more likely in Windows. Give it another try with the whole
22173    # argument.
22174    path="$complete"
22175    arguments="EOL"
22176    new_path=`$CYGPATH -u "$path"`
22177    new_path=`$WHICH "$new_path" 2> /dev/null`
22178    # bat and cmd files are not always considered executable in cygwin causing which
22179    # to not find them
22180    if test "x$new_path" = x \
22181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22183      new_path=`$CYGPATH -u "$path"`
22184    fi
22185    if test "x$new_path" = x; then
22186      # It's still not found. Now this is an unrecoverable error.
22187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22188$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22189      has_space=`$ECHO "$complete" | $GREP " "`
22190      if test "x$has_space" != x; then
22191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22193      fi
22194      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22195    fi
22196  fi
22197
22198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22201  # "foo.exe" is OK but "foo" is an error.
22202  #
22203  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22204  # It is also a way to make sure we got the proper file name for the real test later on.
22205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22206  if test "x$test_shortpath" = x; then
22207    # Short path failed, file does not exist as specified.
22208    # Try adding .exe or .cmd
22209    if test -f "${new_path}.exe"; then
22210      input_to_shortpath="${new_path}.exe"
22211    elif test -f "${new_path}.cmd"; then
22212      input_to_shortpath="${new_path}.cmd"
22213    else
22214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22215$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22216      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22217$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22218      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22219    fi
22220  else
22221    input_to_shortpath="$new_path"
22222  fi
22223
22224  # Call helper function which possibly converts this using DOS-style short mode.
22225  # If so, the updated path is stored in $new_path.
22226  new_path="$input_to_shortpath"
22227
22228  input_path="$input_to_shortpath"
22229  # Check if we need to convert this using DOS-style short mode. If the path
22230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22231  # take no chances and rewrite it.
22232  # Note: m4 eats our [], so we need to use [ and ] instead.
22233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22234  if test "x$has_forbidden_chars" != x; then
22235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22239      # Going to short mode and back again did indeed matter. Since short mode is
22240      # case insensitive, let's make it lowercase to improve readability.
22241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22242      # Now convert it back to Unix-stile (cygpath)
22243      input_path=`$CYGPATH -u "$shortmode_path"`
22244      new_path="$input_path"
22245    fi
22246  fi
22247
22248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22249  if test "x$test_cygdrive_prefix" = x; then
22250    # As a simple fix, exclude /usr/bin since it's not a real path.
22251    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22253      # a path prefixed by /cygdrive for fixpath to work.
22254      new_path="$CYGWIN_ROOT_PATH$input_path"
22255    fi
22256  fi
22257
22258  # remove trailing .exe if any
22259  new_path="${new_path/%.exe/}"
22260
22261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22262
22263  # First separate the path from the arguments. This will split at the first
22264  # space.
22265  complete="$OBJC"
22266  path="${complete%% *}"
22267  tmp="$complete EOL"
22268  arguments="${tmp#* }"
22269
22270  # Input might be given as Windows format, start by converting to
22271  # unix format.
22272  new_path="$path"
22273
22274  windows_path="$new_path"
22275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22276    unix_path=`$CYGPATH -u "$windows_path"`
22277    new_path="$unix_path"
22278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22280    new_path="$unix_path"
22281  fi
22282
22283
22284  # Now try to locate executable using which
22285  new_path=`$WHICH "$new_path" 2> /dev/null`
22286
22287  if test "x$new_path" = x; then
22288    # Oops. Which didn't find the executable.
22289    # The splitting of arguments from the executable at a space might have been incorrect,
22290    # since paths with space are more likely in Windows. Give it another try with the whole
22291    # argument.
22292    path="$complete"
22293    arguments="EOL"
22294    new_path="$path"
22295
22296  windows_path="$new_path"
22297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22298    unix_path=`$CYGPATH -u "$windows_path"`
22299    new_path="$unix_path"
22300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22302    new_path="$unix_path"
22303  fi
22304
22305
22306    new_path=`$WHICH "$new_path" 2> /dev/null`
22307
22308    if test "x$new_path" = x; then
22309      # It's still not found. Now this is an unrecoverable error.
22310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22311$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22312      has_space=`$ECHO "$complete" | $GREP " "`
22313      if test "x$has_space" != x; then
22314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22316      fi
22317      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22318    fi
22319  fi
22320
22321  # Now new_path has a complete unix path to the binary
22322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22323    # Keep paths in /bin as-is, but remove trailing .exe if any
22324    new_path="${new_path/%.exe/}"
22325    # Do not save /bin paths to all_fixpath_prefixes!
22326  else
22327    # Not in mixed or Windows style, start by that.
22328    new_path=`cmd //c echo $new_path`
22329
22330  input_path="$new_path"
22331  # Check if we need to convert this using DOS-style short mode. If the path
22332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22333  # take no chances and rewrite it.
22334  # Note: m4 eats our [], so we need to use [ and ] instead.
22335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22336  if test "x$has_forbidden_chars" != x; then
22337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22339  fi
22340
22341    # Output is in $new_path
22342
22343  windows_path="$new_path"
22344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22345    unix_path=`$CYGPATH -u "$windows_path"`
22346    new_path="$unix_path"
22347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22349    new_path="$unix_path"
22350  fi
22351
22352    # remove trailing .exe if any
22353    new_path="${new_path/%.exe/}"
22354
22355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22357  fi
22358
22359  else
22360    # We're on a posix platform. Hooray! :)
22361    # First separate the path from the arguments. This will split at the first
22362    # space.
22363    complete="$OBJC"
22364    path="${complete%% *}"
22365    tmp="$complete EOL"
22366    arguments="${tmp#* }"
22367
22368    # Cannot rely on the command "which" here since it doesn't always work.
22369    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22370    if test -z "$is_absolute_path"; then
22371      # Path to executable is not absolute. Find it.
22372      IFS_save="$IFS"
22373      IFS=:
22374      for p in $PATH; do
22375        if test -f "$p/$path" && test -x "$p/$path"; then
22376          new_path="$p/$path"
22377          break
22378        fi
22379      done
22380      IFS="$IFS_save"
22381    else
22382      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22383$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22384      new_path="$path"
22385    fi
22386
22387    if test "x$new_path" = x; then
22388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22389$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22390      has_space=`$ECHO "$complete" | $GREP " "`
22391      if test "x$has_space" != x; then
22392        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22393$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22394      fi
22395      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22396    fi
22397  fi
22398
22399  # Now join together the path and the arguments once again
22400  if test "x$arguments" != xEOL; then
22401    new_complete="$new_path ${arguments% *}"
22402  else
22403    new_complete="$new_path"
22404  fi
22405
22406  if test "x$complete" != "x$new_complete"; then
22407    OBJC="$new_complete"
22408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22409$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22410  fi
22411
22412  else
22413    OBJC=
22414  fi
22415
22416  # Restore the flags to the user specified values.
22417  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22418  CFLAGS="$ORG_CFLAGS"
22419  CXXFLAGS="$ORG_CXXFLAGS"
22420  OBJCFLAGS="$ORG_OBJCFLAGS"
22421
22422  LD="$CC"
22423  LDEXE="$CC"
22424  LDCXX="$CXX"
22425  LDEXECXX="$CXX"
22426
22427  # LDEXE is the linker to use, when creating executables.
22428
22429  # Linking C++ libraries.
22430
22431  # Linking C++ executables.
22432
22433
22434  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22435    if test -n "$ac_tool_prefix"; then
22436  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22437set dummy ${ac_tool_prefix}ar; ac_word=$2
22438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22439$as_echo_n "checking for $ac_word... " >&6; }
22440if ${ac_cv_prog_AR+:} false; then :
22441  $as_echo_n "(cached) " >&6
22442else
22443  if test -n "$AR"; then
22444  ac_cv_prog_AR="$AR" # Let the user override the test.
22445else
22446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22447for as_dir in $PATH
22448do
22449  IFS=$as_save_IFS
22450  test -z "$as_dir" && as_dir=.
22451    for ac_exec_ext in '' $ac_executable_extensions; do
22452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22453    ac_cv_prog_AR="${ac_tool_prefix}ar"
22454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22455    break 2
22456  fi
22457done
22458  done
22459IFS=$as_save_IFS
22460
22461fi
22462fi
22463AR=$ac_cv_prog_AR
22464if test -n "$AR"; then
22465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22466$as_echo "$AR" >&6; }
22467else
22468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22469$as_echo "no" >&6; }
22470fi
22471
22472
22473fi
22474if test -z "$ac_cv_prog_AR"; then
22475  ac_ct_AR=$AR
22476  # Extract the first word of "ar", so it can be a program name with args.
22477set dummy ar; ac_word=$2
22478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22479$as_echo_n "checking for $ac_word... " >&6; }
22480if ${ac_cv_prog_ac_ct_AR+:} false; then :
22481  $as_echo_n "(cached) " >&6
22482else
22483  if test -n "$ac_ct_AR"; then
22484  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22485else
22486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22487for as_dir in $PATH
22488do
22489  IFS=$as_save_IFS
22490  test -z "$as_dir" && as_dir=.
22491    for ac_exec_ext in '' $ac_executable_extensions; do
22492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22493    ac_cv_prog_ac_ct_AR="ar"
22494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22495    break 2
22496  fi
22497done
22498  done
22499IFS=$as_save_IFS
22500
22501fi
22502fi
22503ac_ct_AR=$ac_cv_prog_ac_ct_AR
22504if test -n "$ac_ct_AR"; then
22505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22506$as_echo "$ac_ct_AR" >&6; }
22507else
22508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22509$as_echo "no" >&6; }
22510fi
22511
22512  if test "x$ac_ct_AR" = x; then
22513    AR=""
22514  else
22515    case $cross_compiling:$ac_tool_warned in
22516yes:)
22517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22519ac_tool_warned=yes ;;
22520esac
22521    AR=$ac_ct_AR
22522  fi
22523else
22524  AR="$ac_cv_prog_AR"
22525fi
22526
22527
22528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22529
22530  # First separate the path from the arguments. This will split at the first
22531  # space.
22532  complete="$AR"
22533  path="${complete%% *}"
22534  tmp="$complete EOL"
22535  arguments="${tmp#* }"
22536
22537  # Input might be given as Windows format, start by converting to
22538  # unix format.
22539  new_path=`$CYGPATH -u "$path"`
22540
22541  # Now try to locate executable using which
22542  new_path=`$WHICH "$new_path" 2> /dev/null`
22543  # bat and cmd files are not always considered executable in cygwin causing which
22544  # to not find them
22545  if test "x$new_path" = x \
22546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22548    new_path=`$CYGPATH -u "$path"`
22549  fi
22550  if test "x$new_path" = x; then
22551    # Oops. Which didn't find the executable.
22552    # The splitting of arguments from the executable at a space might have been incorrect,
22553    # since paths with space are more likely in Windows. Give it another try with the whole
22554    # argument.
22555    path="$complete"
22556    arguments="EOL"
22557    new_path=`$CYGPATH -u "$path"`
22558    new_path=`$WHICH "$new_path" 2> /dev/null`
22559    # bat and cmd files are not always considered executable in cygwin causing which
22560    # to not find them
22561    if test "x$new_path" = x \
22562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22564      new_path=`$CYGPATH -u "$path"`
22565    fi
22566    if test "x$new_path" = x; then
22567      # It's still not found. Now this is an unrecoverable error.
22568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22569$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22570      has_space=`$ECHO "$complete" | $GREP " "`
22571      if test "x$has_space" != x; then
22572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22574      fi
22575      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22576    fi
22577  fi
22578
22579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22582  # "foo.exe" is OK but "foo" is an error.
22583  #
22584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22585  # It is also a way to make sure we got the proper file name for the real test later on.
22586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22587  if test "x$test_shortpath" = x; then
22588    # Short path failed, file does not exist as specified.
22589    # Try adding .exe or .cmd
22590    if test -f "${new_path}.exe"; then
22591      input_to_shortpath="${new_path}.exe"
22592    elif test -f "${new_path}.cmd"; then
22593      input_to_shortpath="${new_path}.cmd"
22594    else
22595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22596$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22599      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22600    fi
22601  else
22602    input_to_shortpath="$new_path"
22603  fi
22604
22605  # Call helper function which possibly converts this using DOS-style short mode.
22606  # If so, the updated path is stored in $new_path.
22607  new_path="$input_to_shortpath"
22608
22609  input_path="$input_to_shortpath"
22610  # Check if we need to convert this using DOS-style short mode. If the path
22611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22612  # take no chances and rewrite it.
22613  # Note: m4 eats our [], so we need to use [ and ] instead.
22614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22615  if test "x$has_forbidden_chars" != x; then
22616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22620      # Going to short mode and back again did indeed matter. Since short mode is
22621      # case insensitive, let's make it lowercase to improve readability.
22622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22623      # Now convert it back to Unix-stile (cygpath)
22624      input_path=`$CYGPATH -u "$shortmode_path"`
22625      new_path="$input_path"
22626    fi
22627  fi
22628
22629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22630  if test "x$test_cygdrive_prefix" = x; then
22631    # As a simple fix, exclude /usr/bin since it's not a real path.
22632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22634      # a path prefixed by /cygdrive for fixpath to work.
22635      new_path="$CYGWIN_ROOT_PATH$input_path"
22636    fi
22637  fi
22638
22639  # remove trailing .exe if any
22640  new_path="${new_path/%.exe/}"
22641
22642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22643
22644  # First separate the path from the arguments. This will split at the first
22645  # space.
22646  complete="$AR"
22647  path="${complete%% *}"
22648  tmp="$complete EOL"
22649  arguments="${tmp#* }"
22650
22651  # Input might be given as Windows format, start by converting to
22652  # unix format.
22653  new_path="$path"
22654
22655  windows_path="$new_path"
22656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22657    unix_path=`$CYGPATH -u "$windows_path"`
22658    new_path="$unix_path"
22659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22661    new_path="$unix_path"
22662  fi
22663
22664
22665  # Now try to locate executable using which
22666  new_path=`$WHICH "$new_path" 2> /dev/null`
22667
22668  if test "x$new_path" = x; then
22669    # Oops. Which didn't find the executable.
22670    # The splitting of arguments from the executable at a space might have been incorrect,
22671    # since paths with space are more likely in Windows. Give it another try with the whole
22672    # argument.
22673    path="$complete"
22674    arguments="EOL"
22675    new_path="$path"
22676
22677  windows_path="$new_path"
22678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22679    unix_path=`$CYGPATH -u "$windows_path"`
22680    new_path="$unix_path"
22681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22683    new_path="$unix_path"
22684  fi
22685
22686
22687    new_path=`$WHICH "$new_path" 2> /dev/null`
22688
22689    if test "x$new_path" = x; then
22690      # It's still not found. Now this is an unrecoverable error.
22691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22692$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22693      has_space=`$ECHO "$complete" | $GREP " "`
22694      if test "x$has_space" != x; then
22695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22697      fi
22698      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22699    fi
22700  fi
22701
22702  # Now new_path has a complete unix path to the binary
22703  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22704    # Keep paths in /bin as-is, but remove trailing .exe if any
22705    new_path="${new_path/%.exe/}"
22706    # Do not save /bin paths to all_fixpath_prefixes!
22707  else
22708    # Not in mixed or Windows style, start by that.
22709    new_path=`cmd //c echo $new_path`
22710
22711  input_path="$new_path"
22712  # Check if we need to convert this using DOS-style short mode. If the path
22713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22714  # take no chances and rewrite it.
22715  # Note: m4 eats our [], so we need to use [ and ] instead.
22716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22717  if test "x$has_forbidden_chars" != x; then
22718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22720  fi
22721
22722    # Output is in $new_path
22723
22724  windows_path="$new_path"
22725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22726    unix_path=`$CYGPATH -u "$windows_path"`
22727    new_path="$unix_path"
22728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22730    new_path="$unix_path"
22731  fi
22732
22733    # remove trailing .exe if any
22734    new_path="${new_path/%.exe/}"
22735
22736    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22737    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22738  fi
22739
22740  else
22741    # We're on a posix platform. Hooray! :)
22742    # First separate the path from the arguments. This will split at the first
22743    # space.
22744    complete="$AR"
22745    path="${complete%% *}"
22746    tmp="$complete EOL"
22747    arguments="${tmp#* }"
22748
22749    # Cannot rely on the command "which" here since it doesn't always work.
22750    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22751    if test -z "$is_absolute_path"; then
22752      # Path to executable is not absolute. Find it.
22753      IFS_save="$IFS"
22754      IFS=:
22755      for p in $PATH; do
22756        if test -f "$p/$path" && test -x "$p/$path"; then
22757          new_path="$p/$path"
22758          break
22759        fi
22760      done
22761      IFS="$IFS_save"
22762    else
22763      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22764$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22765      new_path="$path"
22766    fi
22767
22768    if test "x$new_path" = x; then
22769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22770$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22771      has_space=`$ECHO "$complete" | $GREP " "`
22772      if test "x$has_space" != x; then
22773        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22774$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22775      fi
22776      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22777    fi
22778  fi
22779
22780  # Now join together the path and the arguments once again
22781  if test "x$arguments" != xEOL; then
22782    new_complete="$new_path ${arguments% *}"
22783  else
22784    new_complete="$new_path"
22785  fi
22786
22787  if test "x$complete" != "x$new_complete"; then
22788    AR="$new_complete"
22789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22790$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22791  fi
22792
22793  fi
22794  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22795    ARFLAGS="-r"
22796  else
22797    ARFLAGS=""
22798  fi
22799
22800
22801  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22802  HOTSPOT_CXX="$CXX"
22803  HOTSPOT_LD="$LD"
22804
22805
22806
22807  COMPILER_NAME=gcc
22808  COMPILER_TYPE=CC
22809  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22810
22811    # For now, assume that we are always compiling using cl.exe.
22812    CC_OUT_OPTION=-Fo
22813    EXE_OUT_OPTION=-out:
22814    LD_OUT_OPTION=-out:
22815    AR_OUT_OPTION=-out:
22816    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22817    # program for something completely different.
22818    # Extract the first word of "link", so it can be a program name with args.
22819set dummy link; ac_word=$2
22820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22821$as_echo_n "checking for $ac_word... " >&6; }
22822if ${ac_cv_prog_WINLD+:} false; then :
22823  $as_echo_n "(cached) " >&6
22824else
22825  if test -n "$WINLD"; then
22826  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22827else
22828  ac_prog_rejected=no
22829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22830for as_dir in $PATH
22831do
22832  IFS=$as_save_IFS
22833  test -z "$as_dir" && as_dir=.
22834    for ac_exec_ext in '' $ac_executable_extensions; do
22835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22836    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22837       ac_prog_rejected=yes
22838       continue
22839     fi
22840    ac_cv_prog_WINLD="link"
22841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22842    break 2
22843  fi
22844done
22845  done
22846IFS=$as_save_IFS
22847
22848if test $ac_prog_rejected = yes; then
22849  # We found a bogon in the path, so make sure we never use it.
22850  set dummy $ac_cv_prog_WINLD
22851  shift
22852  if test $# != 0; then
22853    # We chose a different compiler from the bogus one.
22854    # However, it has the same basename, so the bogon will be chosen
22855    # first if we set WINLD to just the basename; use the full file name.
22856    shift
22857    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22858  fi
22859fi
22860fi
22861fi
22862WINLD=$ac_cv_prog_WINLD
22863if test -n "$WINLD"; then
22864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22865$as_echo "$WINLD" >&6; }
22866else
22867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22868$as_echo "no" >&6; }
22869fi
22870
22871
22872    # Since we must ignore the first found link, WINLD will contain
22873    # the full path to the link.exe program.
22874
22875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22876
22877  # First separate the path from the arguments. This will split at the first
22878  # space.
22879  complete="$WINLD"
22880  path="${complete%% *}"
22881  tmp="$complete EOL"
22882  arguments="${tmp#* }"
22883
22884  # Input might be given as Windows format, start by converting to
22885  # unix format.
22886  new_path=`$CYGPATH -u "$path"`
22887
22888  # Now try to locate executable using which
22889  new_path=`$WHICH "$new_path" 2> /dev/null`
22890  # bat and cmd files are not always considered executable in cygwin causing which
22891  # to not find them
22892  if test "x$new_path" = x \
22893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22895    new_path=`$CYGPATH -u "$path"`
22896  fi
22897  if test "x$new_path" = x; then
22898    # Oops. Which didn't find the executable.
22899    # The splitting of arguments from the executable at a space might have been incorrect,
22900    # since paths with space are more likely in Windows. Give it another try with the whole
22901    # argument.
22902    path="$complete"
22903    arguments="EOL"
22904    new_path=`$CYGPATH -u "$path"`
22905    new_path=`$WHICH "$new_path" 2> /dev/null`
22906    # bat and cmd files are not always considered executable in cygwin causing which
22907    # to not find them
22908    if test "x$new_path" = x \
22909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22911      new_path=`$CYGPATH -u "$path"`
22912    fi
22913    if test "x$new_path" = x; then
22914      # It's still not found. Now this is an unrecoverable error.
22915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22916$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22917      has_space=`$ECHO "$complete" | $GREP " "`
22918      if test "x$has_space" != x; then
22919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22921      fi
22922      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22923    fi
22924  fi
22925
22926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22929  # "foo.exe" is OK but "foo" is an error.
22930  #
22931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22932  # It is also a way to make sure we got the proper file name for the real test later on.
22933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22934  if test "x$test_shortpath" = x; then
22935    # Short path failed, file does not exist as specified.
22936    # Try adding .exe or .cmd
22937    if test -f "${new_path}.exe"; then
22938      input_to_shortpath="${new_path}.exe"
22939    elif test -f "${new_path}.cmd"; then
22940      input_to_shortpath="${new_path}.cmd"
22941    else
22942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22943$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22946      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22947    fi
22948  else
22949    input_to_shortpath="$new_path"
22950  fi
22951
22952  # Call helper function which possibly converts this using DOS-style short mode.
22953  # If so, the updated path is stored in $new_path.
22954  new_path="$input_to_shortpath"
22955
22956  input_path="$input_to_shortpath"
22957  # Check if we need to convert this using DOS-style short mode. If the path
22958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22959  # take no chances and rewrite it.
22960  # Note: m4 eats our [], so we need to use [ and ] instead.
22961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22962  if test "x$has_forbidden_chars" != x; then
22963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22967      # Going to short mode and back again did indeed matter. Since short mode is
22968      # case insensitive, let's make it lowercase to improve readability.
22969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22970      # Now convert it back to Unix-stile (cygpath)
22971      input_path=`$CYGPATH -u "$shortmode_path"`
22972      new_path="$input_path"
22973    fi
22974  fi
22975
22976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22977  if test "x$test_cygdrive_prefix" = x; then
22978    # As a simple fix, exclude /usr/bin since it's not a real path.
22979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22981      # a path prefixed by /cygdrive for fixpath to work.
22982      new_path="$CYGWIN_ROOT_PATH$input_path"
22983    fi
22984  fi
22985
22986  # remove trailing .exe if any
22987  new_path="${new_path/%.exe/}"
22988
22989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22990
22991  # First separate the path from the arguments. This will split at the first
22992  # space.
22993  complete="$WINLD"
22994  path="${complete%% *}"
22995  tmp="$complete EOL"
22996  arguments="${tmp#* }"
22997
22998  # Input might be given as Windows format, start by converting to
22999  # unix format.
23000  new_path="$path"
23001
23002  windows_path="$new_path"
23003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23004    unix_path=`$CYGPATH -u "$windows_path"`
23005    new_path="$unix_path"
23006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23008    new_path="$unix_path"
23009  fi
23010
23011
23012  # Now try to locate executable using which
23013  new_path=`$WHICH "$new_path" 2> /dev/null`
23014
23015  if test "x$new_path" = x; then
23016    # Oops. Which didn't find the executable.
23017    # The splitting of arguments from the executable at a space might have been incorrect,
23018    # since paths with space are more likely in Windows. Give it another try with the whole
23019    # argument.
23020    path="$complete"
23021    arguments="EOL"
23022    new_path="$path"
23023
23024  windows_path="$new_path"
23025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23026    unix_path=`$CYGPATH -u "$windows_path"`
23027    new_path="$unix_path"
23028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23030    new_path="$unix_path"
23031  fi
23032
23033
23034    new_path=`$WHICH "$new_path" 2> /dev/null`
23035
23036    if test "x$new_path" = x; then
23037      # It's still not found. Now this is an unrecoverable error.
23038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23039$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23040      has_space=`$ECHO "$complete" | $GREP " "`
23041      if test "x$has_space" != x; then
23042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23044      fi
23045      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23046    fi
23047  fi
23048
23049  # Now new_path has a complete unix path to the binary
23050  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23051    # Keep paths in /bin as-is, but remove trailing .exe if any
23052    new_path="${new_path/%.exe/}"
23053    # Do not save /bin paths to all_fixpath_prefixes!
23054  else
23055    # Not in mixed or Windows style, start by that.
23056    new_path=`cmd //c echo $new_path`
23057
23058  input_path="$new_path"
23059  # Check if we need to convert this using DOS-style short mode. If the path
23060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23061  # take no chances and rewrite it.
23062  # Note: m4 eats our [], so we need to use [ and ] instead.
23063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23064  if test "x$has_forbidden_chars" != x; then
23065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23067  fi
23068
23069    # Output is in $new_path
23070
23071  windows_path="$new_path"
23072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23073    unix_path=`$CYGPATH -u "$windows_path"`
23074    new_path="$unix_path"
23075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23077    new_path="$unix_path"
23078  fi
23079
23080    # remove trailing .exe if any
23081    new_path="${new_path/%.exe/}"
23082
23083    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23084    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23085  fi
23086
23087  else
23088    # We're on a posix platform. Hooray! :)
23089    # First separate the path from the arguments. This will split at the first
23090    # space.
23091    complete="$WINLD"
23092    path="${complete%% *}"
23093    tmp="$complete EOL"
23094    arguments="${tmp#* }"
23095
23096    # Cannot rely on the command "which" here since it doesn't always work.
23097    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23098    if test -z "$is_absolute_path"; then
23099      # Path to executable is not absolute. Find it.
23100      IFS_save="$IFS"
23101      IFS=:
23102      for p in $PATH; do
23103        if test -f "$p/$path" && test -x "$p/$path"; then
23104          new_path="$p/$path"
23105          break
23106        fi
23107      done
23108      IFS="$IFS_save"
23109    else
23110      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23111$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23112      new_path="$path"
23113    fi
23114
23115    if test "x$new_path" = x; then
23116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23117$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23118      has_space=`$ECHO "$complete" | $GREP " "`
23119      if test "x$has_space" != x; then
23120        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23121$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23122      fi
23123      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23124    fi
23125  fi
23126
23127  # Now join together the path and the arguments once again
23128  if test "x$arguments" != xEOL; then
23129    new_complete="$new_path ${arguments% *}"
23130  else
23131    new_complete="$new_path"
23132  fi
23133
23134  if test "x$complete" != "x$new_complete"; then
23135    WINLD="$new_complete"
23136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23137$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23138  fi
23139
23140    printf "Windows linker was found at $WINLD\n"
23141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23142$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23143    "$WINLD" --version > /dev/null
23144    if test $? -eq 0 ; then
23145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23146$as_echo "no" >&6; }
23147      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23148    else
23149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23150$as_echo "yes" >&6; }
23151    fi
23152    LD="$WINLD"
23153    LDEXE="$WINLD"
23154    LDCXX="$WINLD"
23155    LDEXECXX="$WINLD"
23156
23157    # Extract the first word of "mt", so it can be a program name with args.
23158set dummy mt; ac_word=$2
23159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23160$as_echo_n "checking for $ac_word... " >&6; }
23161if ${ac_cv_prog_MT+:} false; then :
23162  $as_echo_n "(cached) " >&6
23163else
23164  if test -n "$MT"; then
23165  ac_cv_prog_MT="$MT" # Let the user override the test.
23166else
23167  ac_prog_rejected=no
23168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23169for as_dir in $PATH
23170do
23171  IFS=$as_save_IFS
23172  test -z "$as_dir" && as_dir=.
23173    for ac_exec_ext in '' $ac_executable_extensions; do
23174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23175    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23176       ac_prog_rejected=yes
23177       continue
23178     fi
23179    ac_cv_prog_MT="mt"
23180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23181    break 2
23182  fi
23183done
23184  done
23185IFS=$as_save_IFS
23186
23187if test $ac_prog_rejected = yes; then
23188  # We found a bogon in the path, so make sure we never use it.
23189  set dummy $ac_cv_prog_MT
23190  shift
23191  if test $# != 0; then
23192    # We chose a different compiler from the bogus one.
23193    # However, it has the same basename, so the bogon will be chosen
23194    # first if we set MT to just the basename; use the full file name.
23195    shift
23196    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23197  fi
23198fi
23199fi
23200fi
23201MT=$ac_cv_prog_MT
23202if test -n "$MT"; then
23203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23204$as_echo "$MT" >&6; }
23205else
23206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23207$as_echo "no" >&6; }
23208fi
23209
23210
23211
23212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23213
23214  # First separate the path from the arguments. This will split at the first
23215  # space.
23216  complete="$MT"
23217  path="${complete%% *}"
23218  tmp="$complete EOL"
23219  arguments="${tmp#* }"
23220
23221  # Input might be given as Windows format, start by converting to
23222  # unix format.
23223  new_path=`$CYGPATH -u "$path"`
23224
23225  # Now try to locate executable using which
23226  new_path=`$WHICH "$new_path" 2> /dev/null`
23227  # bat and cmd files are not always considered executable in cygwin causing which
23228  # to not find them
23229  if test "x$new_path" = x \
23230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23232    new_path=`$CYGPATH -u "$path"`
23233  fi
23234  if test "x$new_path" = x; then
23235    # Oops. Which didn't find the executable.
23236    # The splitting of arguments from the executable at a space might have been incorrect,
23237    # since paths with space are more likely in Windows. Give it another try with the whole
23238    # argument.
23239    path="$complete"
23240    arguments="EOL"
23241    new_path=`$CYGPATH -u "$path"`
23242    new_path=`$WHICH "$new_path" 2> /dev/null`
23243    # bat and cmd files are not always considered executable in cygwin causing which
23244    # to not find them
23245    if test "x$new_path" = x \
23246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23248      new_path=`$CYGPATH -u "$path"`
23249    fi
23250    if test "x$new_path" = x; then
23251      # It's still not found. Now this is an unrecoverable error.
23252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23253$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23254      has_space=`$ECHO "$complete" | $GREP " "`
23255      if test "x$has_space" != x; then
23256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23258      fi
23259      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23260    fi
23261  fi
23262
23263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23266  # "foo.exe" is OK but "foo" is an error.
23267  #
23268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23269  # It is also a way to make sure we got the proper file name for the real test later on.
23270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23271  if test "x$test_shortpath" = x; then
23272    # Short path failed, file does not exist as specified.
23273    # Try adding .exe or .cmd
23274    if test -f "${new_path}.exe"; then
23275      input_to_shortpath="${new_path}.exe"
23276    elif test -f "${new_path}.cmd"; then
23277      input_to_shortpath="${new_path}.cmd"
23278    else
23279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23280$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23283      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23284    fi
23285  else
23286    input_to_shortpath="$new_path"
23287  fi
23288
23289  # Call helper function which possibly converts this using DOS-style short mode.
23290  # If so, the updated path is stored in $new_path.
23291  new_path="$input_to_shortpath"
23292
23293  input_path="$input_to_shortpath"
23294  # Check if we need to convert this using DOS-style short mode. If the path
23295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23296  # take no chances and rewrite it.
23297  # Note: m4 eats our [], so we need to use [ and ] instead.
23298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23299  if test "x$has_forbidden_chars" != x; then
23300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23304      # Going to short mode and back again did indeed matter. Since short mode is
23305      # case insensitive, let's make it lowercase to improve readability.
23306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23307      # Now convert it back to Unix-stile (cygpath)
23308      input_path=`$CYGPATH -u "$shortmode_path"`
23309      new_path="$input_path"
23310    fi
23311  fi
23312
23313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23314  if test "x$test_cygdrive_prefix" = x; then
23315    # As a simple fix, exclude /usr/bin since it's not a real path.
23316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23318      # a path prefixed by /cygdrive for fixpath to work.
23319      new_path="$CYGWIN_ROOT_PATH$input_path"
23320    fi
23321  fi
23322
23323  # remove trailing .exe if any
23324  new_path="${new_path/%.exe/}"
23325
23326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23327
23328  # First separate the path from the arguments. This will split at the first
23329  # space.
23330  complete="$MT"
23331  path="${complete%% *}"
23332  tmp="$complete EOL"
23333  arguments="${tmp#* }"
23334
23335  # Input might be given as Windows format, start by converting to
23336  # unix format.
23337  new_path="$path"
23338
23339  windows_path="$new_path"
23340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23341    unix_path=`$CYGPATH -u "$windows_path"`
23342    new_path="$unix_path"
23343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23345    new_path="$unix_path"
23346  fi
23347
23348
23349  # Now try to locate executable using which
23350  new_path=`$WHICH "$new_path" 2> /dev/null`
23351
23352  if test "x$new_path" = x; then
23353    # Oops. Which didn't find the executable.
23354    # The splitting of arguments from the executable at a space might have been incorrect,
23355    # since paths with space are more likely in Windows. Give it another try with the whole
23356    # argument.
23357    path="$complete"
23358    arguments="EOL"
23359    new_path="$path"
23360
23361  windows_path="$new_path"
23362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23363    unix_path=`$CYGPATH -u "$windows_path"`
23364    new_path="$unix_path"
23365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23367    new_path="$unix_path"
23368  fi
23369
23370
23371    new_path=`$WHICH "$new_path" 2> /dev/null`
23372
23373    if test "x$new_path" = x; then
23374      # It's still not found. Now this is an unrecoverable error.
23375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23376$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23377      has_space=`$ECHO "$complete" | $GREP " "`
23378      if test "x$has_space" != x; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23381      fi
23382      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23383    fi
23384  fi
23385
23386  # Now new_path has a complete unix path to the binary
23387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23388    # Keep paths in /bin as-is, but remove trailing .exe if any
23389    new_path="${new_path/%.exe/}"
23390    # Do not save /bin paths to all_fixpath_prefixes!
23391  else
23392    # Not in mixed or Windows style, start by that.
23393    new_path=`cmd //c echo $new_path`
23394
23395  input_path="$new_path"
23396  # Check if we need to convert this using DOS-style short mode. If the path
23397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23398  # take no chances and rewrite it.
23399  # Note: m4 eats our [], so we need to use [ and ] instead.
23400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23401  if test "x$has_forbidden_chars" != x; then
23402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23404  fi
23405
23406    # Output is in $new_path
23407
23408  windows_path="$new_path"
23409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23410    unix_path=`$CYGPATH -u "$windows_path"`
23411    new_path="$unix_path"
23412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23414    new_path="$unix_path"
23415  fi
23416
23417    # remove trailing .exe if any
23418    new_path="${new_path/%.exe/}"
23419
23420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23422  fi
23423
23424  else
23425    # We're on a posix platform. Hooray! :)
23426    # First separate the path from the arguments. This will split at the first
23427    # space.
23428    complete="$MT"
23429    path="${complete%% *}"
23430    tmp="$complete EOL"
23431    arguments="${tmp#* }"
23432
23433    # Cannot rely on the command "which" here since it doesn't always work.
23434    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23435    if test -z "$is_absolute_path"; then
23436      # Path to executable is not absolute. Find it.
23437      IFS_save="$IFS"
23438      IFS=:
23439      for p in $PATH; do
23440        if test -f "$p/$path" && test -x "$p/$path"; then
23441          new_path="$p/$path"
23442          break
23443        fi
23444      done
23445      IFS="$IFS_save"
23446    else
23447      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23448$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23449      new_path="$path"
23450    fi
23451
23452    if test "x$new_path" = x; then
23453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23454$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23455      has_space=`$ECHO "$complete" | $GREP " "`
23456      if test "x$has_space" != x; then
23457        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23459      fi
23460      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23461    fi
23462  fi
23463
23464  # Now join together the path and the arguments once again
23465  if test "x$arguments" != xEOL; then
23466    new_complete="$new_path ${arguments% *}"
23467  else
23468    new_complete="$new_path"
23469  fi
23470
23471  if test "x$complete" != "x$new_complete"; then
23472    MT="$new_complete"
23473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23474$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23475  fi
23476
23477    # The resource compiler
23478    # Extract the first word of "rc", so it can be a program name with args.
23479set dummy rc; ac_word=$2
23480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23481$as_echo_n "checking for $ac_word... " >&6; }
23482if ${ac_cv_prog_RC+:} false; then :
23483  $as_echo_n "(cached) " >&6
23484else
23485  if test -n "$RC"; then
23486  ac_cv_prog_RC="$RC" # Let the user override the test.
23487else
23488  ac_prog_rejected=no
23489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23490for as_dir in $PATH
23491do
23492  IFS=$as_save_IFS
23493  test -z "$as_dir" && as_dir=.
23494    for ac_exec_ext in '' $ac_executable_extensions; do
23495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23496    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23497       ac_prog_rejected=yes
23498       continue
23499     fi
23500    ac_cv_prog_RC="rc"
23501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23502    break 2
23503  fi
23504done
23505  done
23506IFS=$as_save_IFS
23507
23508if test $ac_prog_rejected = yes; then
23509  # We found a bogon in the path, so make sure we never use it.
23510  set dummy $ac_cv_prog_RC
23511  shift
23512  if test $# != 0; then
23513    # We chose a different compiler from the bogus one.
23514    # However, it has the same basename, so the bogon will be chosen
23515    # first if we set RC to just the basename; use the full file name.
23516    shift
23517    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23518  fi
23519fi
23520fi
23521fi
23522RC=$ac_cv_prog_RC
23523if test -n "$RC"; then
23524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23525$as_echo "$RC" >&6; }
23526else
23527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23528$as_echo "no" >&6; }
23529fi
23530
23531
23532
23533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23534
23535  # First separate the path from the arguments. This will split at the first
23536  # space.
23537  complete="$RC"
23538  path="${complete%% *}"
23539  tmp="$complete EOL"
23540  arguments="${tmp#* }"
23541
23542  # Input might be given as Windows format, start by converting to
23543  # unix format.
23544  new_path=`$CYGPATH -u "$path"`
23545
23546  # Now try to locate executable using which
23547  new_path=`$WHICH "$new_path" 2> /dev/null`
23548  # bat and cmd files are not always considered executable in cygwin causing which
23549  # to not find them
23550  if test "x$new_path" = x \
23551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23553    new_path=`$CYGPATH -u "$path"`
23554  fi
23555  if test "x$new_path" = x; then
23556    # Oops. Which didn't find the executable.
23557    # The splitting of arguments from the executable at a space might have been incorrect,
23558    # since paths with space are more likely in Windows. Give it another try with the whole
23559    # argument.
23560    path="$complete"
23561    arguments="EOL"
23562    new_path=`$CYGPATH -u "$path"`
23563    new_path=`$WHICH "$new_path" 2> /dev/null`
23564    # bat and cmd files are not always considered executable in cygwin causing which
23565    # to not find them
23566    if test "x$new_path" = x \
23567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23569      new_path=`$CYGPATH -u "$path"`
23570    fi
23571    if test "x$new_path" = x; then
23572      # It's still not found. Now this is an unrecoverable error.
23573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23574$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23575      has_space=`$ECHO "$complete" | $GREP " "`
23576      if test "x$has_space" != x; then
23577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23579      fi
23580      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23581    fi
23582  fi
23583
23584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23587  # "foo.exe" is OK but "foo" is an error.
23588  #
23589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23590  # It is also a way to make sure we got the proper file name for the real test later on.
23591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23592  if test "x$test_shortpath" = x; then
23593    # Short path failed, file does not exist as specified.
23594    # Try adding .exe or .cmd
23595    if test -f "${new_path}.exe"; then
23596      input_to_shortpath="${new_path}.exe"
23597    elif test -f "${new_path}.cmd"; then
23598      input_to_shortpath="${new_path}.cmd"
23599    else
23600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23601$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23604      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23605    fi
23606  else
23607    input_to_shortpath="$new_path"
23608  fi
23609
23610  # Call helper function which possibly converts this using DOS-style short mode.
23611  # If so, the updated path is stored in $new_path.
23612  new_path="$input_to_shortpath"
23613
23614  input_path="$input_to_shortpath"
23615  # Check if we need to convert this using DOS-style short mode. If the path
23616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23617  # take no chances and rewrite it.
23618  # Note: m4 eats our [], so we need to use [ and ] instead.
23619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23620  if test "x$has_forbidden_chars" != x; then
23621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23625      # Going to short mode and back again did indeed matter. Since short mode is
23626      # case insensitive, let's make it lowercase to improve readability.
23627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23628      # Now convert it back to Unix-stile (cygpath)
23629      input_path=`$CYGPATH -u "$shortmode_path"`
23630      new_path="$input_path"
23631    fi
23632  fi
23633
23634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23635  if test "x$test_cygdrive_prefix" = x; then
23636    # As a simple fix, exclude /usr/bin since it's not a real path.
23637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23639      # a path prefixed by /cygdrive for fixpath to work.
23640      new_path="$CYGWIN_ROOT_PATH$input_path"
23641    fi
23642  fi
23643
23644  # remove trailing .exe if any
23645  new_path="${new_path/%.exe/}"
23646
23647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23648
23649  # First separate the path from the arguments. This will split at the first
23650  # space.
23651  complete="$RC"
23652  path="${complete%% *}"
23653  tmp="$complete EOL"
23654  arguments="${tmp#* }"
23655
23656  # Input might be given as Windows format, start by converting to
23657  # unix format.
23658  new_path="$path"
23659
23660  windows_path="$new_path"
23661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23662    unix_path=`$CYGPATH -u "$windows_path"`
23663    new_path="$unix_path"
23664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23666    new_path="$unix_path"
23667  fi
23668
23669
23670  # Now try to locate executable using which
23671  new_path=`$WHICH "$new_path" 2> /dev/null`
23672
23673  if test "x$new_path" = x; then
23674    # Oops. Which didn't find the executable.
23675    # The splitting of arguments from the executable at a space might have been incorrect,
23676    # since paths with space are more likely in Windows. Give it another try with the whole
23677    # argument.
23678    path="$complete"
23679    arguments="EOL"
23680    new_path="$path"
23681
23682  windows_path="$new_path"
23683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23684    unix_path=`$CYGPATH -u "$windows_path"`
23685    new_path="$unix_path"
23686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23688    new_path="$unix_path"
23689  fi
23690
23691
23692    new_path=`$WHICH "$new_path" 2> /dev/null`
23693
23694    if test "x$new_path" = x; then
23695      # It's still not found. Now this is an unrecoverable error.
23696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23697$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23698      has_space=`$ECHO "$complete" | $GREP " "`
23699      if test "x$has_space" != x; then
23700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23702      fi
23703      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23704    fi
23705  fi
23706
23707  # Now new_path has a complete unix path to the binary
23708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23709    # Keep paths in /bin as-is, but remove trailing .exe if any
23710    new_path="${new_path/%.exe/}"
23711    # Do not save /bin paths to all_fixpath_prefixes!
23712  else
23713    # Not in mixed or Windows style, start by that.
23714    new_path=`cmd //c echo $new_path`
23715
23716  input_path="$new_path"
23717  # Check if we need to convert this using DOS-style short mode. If the path
23718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23719  # take no chances and rewrite it.
23720  # Note: m4 eats our [], so we need to use [ and ] instead.
23721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23722  if test "x$has_forbidden_chars" != x; then
23723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23725  fi
23726
23727    # Output is in $new_path
23728
23729  windows_path="$new_path"
23730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23731    unix_path=`$CYGPATH -u "$windows_path"`
23732    new_path="$unix_path"
23733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23735    new_path="$unix_path"
23736  fi
23737
23738    # remove trailing .exe if any
23739    new_path="${new_path/%.exe/}"
23740
23741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23743  fi
23744
23745  else
23746    # We're on a posix platform. Hooray! :)
23747    # First separate the path from the arguments. This will split at the first
23748    # space.
23749    complete="$RC"
23750    path="${complete%% *}"
23751    tmp="$complete EOL"
23752    arguments="${tmp#* }"
23753
23754    # Cannot rely on the command "which" here since it doesn't always work.
23755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23756    if test -z "$is_absolute_path"; then
23757      # Path to executable is not absolute. Find it.
23758      IFS_save="$IFS"
23759      IFS=:
23760      for p in $PATH; do
23761        if test -f "$p/$path" && test -x "$p/$path"; then
23762          new_path="$p/$path"
23763          break
23764        fi
23765      done
23766      IFS="$IFS_save"
23767    else
23768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23769$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23770      new_path="$path"
23771    fi
23772
23773    if test "x$new_path" = x; then
23774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23775$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23776      has_space=`$ECHO "$complete" | $GREP " "`
23777      if test "x$has_space" != x; then
23778        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23780      fi
23781      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23782    fi
23783  fi
23784
23785  # Now join together the path and the arguments once again
23786  if test "x$arguments" != xEOL; then
23787    new_complete="$new_path ${arguments% *}"
23788  else
23789    new_complete="$new_path"
23790  fi
23791
23792  if test "x$complete" != "x$new_complete"; then
23793    RC="$new_complete"
23794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23795$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23796  fi
23797
23798
23799    # For hotspot, we need these in Windows mixed path,
23800    # so rewrite them all. Need added .exe suffix.
23801    HOTSPOT_CXX="$CXX.exe"
23802    HOTSPOT_LD="$LD.exe"
23803    HOTSPOT_MT="$MT.exe"
23804    HOTSPOT_RC="$RC.exe"
23805
23806  unix_path="$HOTSPOT_CXX"
23807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808    windows_path=`$CYGPATH -m "$unix_path"`
23809    HOTSPOT_CXX="$windows_path"
23810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23811    windows_path=`cmd //c echo $unix_path`
23812    HOTSPOT_CXX="$windows_path"
23813  fi
23814
23815
23816  unix_path="$HOTSPOT_LD"
23817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23818    windows_path=`$CYGPATH -m "$unix_path"`
23819    HOTSPOT_LD="$windows_path"
23820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23821    windows_path=`cmd //c echo $unix_path`
23822    HOTSPOT_LD="$windows_path"
23823  fi
23824
23825
23826  unix_path="$HOTSPOT_MT"
23827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23828    windows_path=`$CYGPATH -m "$unix_path"`
23829    HOTSPOT_MT="$windows_path"
23830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23831    windows_path=`cmd //c echo $unix_path`
23832    HOTSPOT_MT="$windows_path"
23833  fi
23834
23835
23836  unix_path="$HOTSPOT_RC"
23837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838    windows_path=`$CYGPATH -m "$unix_path"`
23839    HOTSPOT_RC="$windows_path"
23840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841    windows_path=`cmd //c echo $unix_path`
23842    HOTSPOT_RC="$windows_path"
23843  fi
23844
23845
23846
23847
23848    RC_FLAGS="-nologo -l 0x409 -r"
23849    if test "x$VARIANT" = xOPT; then :
23850
23851    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23852
23853fi
23854
23855  # The version variables used to create RC_FLAGS may be overridden
23856  # in a custom configure script, or possibly the command line.
23857  # Let those variables be expanded at make time in spec.gmk.
23858  # The \$ are escaped to the shell, and the $(...) variables
23859  # are evaluated by make.
23860  RC_FLAGS="$RC_FLAGS \
23861      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23862      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23863      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23864      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23865      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23866      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23867      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23868
23869  # lib.exe is used to create static libraries.
23870  # Extract the first word of "lib", so it can be a program name with args.
23871set dummy lib; ac_word=$2
23872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23873$as_echo_n "checking for $ac_word... " >&6; }
23874if ${ac_cv_prog_WINAR+:} false; then :
23875  $as_echo_n "(cached) " >&6
23876else
23877  if test -n "$WINAR"; then
23878  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23879else
23880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23881for as_dir in $PATH
23882do
23883  IFS=$as_save_IFS
23884  test -z "$as_dir" && as_dir=.
23885    for ac_exec_ext in '' $ac_executable_extensions; do
23886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23887    ac_cv_prog_WINAR="lib"
23888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23889    break 2
23890  fi
23891done
23892  done
23893IFS=$as_save_IFS
23894
23895fi
23896fi
23897WINAR=$ac_cv_prog_WINAR
23898if test -n "$WINAR"; then
23899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23900$as_echo "$WINAR" >&6; }
23901else
23902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23903$as_echo "no" >&6; }
23904fi
23905
23906
23907
23908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23909
23910  # First separate the path from the arguments. This will split at the first
23911  # space.
23912  complete="$WINAR"
23913  path="${complete%% *}"
23914  tmp="$complete EOL"
23915  arguments="${tmp#* }"
23916
23917  # Input might be given as Windows format, start by converting to
23918  # unix format.
23919  new_path=`$CYGPATH -u "$path"`
23920
23921  # Now try to locate executable using which
23922  new_path=`$WHICH "$new_path" 2> /dev/null`
23923  # bat and cmd files are not always considered executable in cygwin causing which
23924  # to not find them
23925  if test "x$new_path" = x \
23926      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23927      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23928    new_path=`$CYGPATH -u "$path"`
23929  fi
23930  if test "x$new_path" = x; then
23931    # Oops. Which didn't find the executable.
23932    # The splitting of arguments from the executable at a space might have been incorrect,
23933    # since paths with space are more likely in Windows. Give it another try with the whole
23934    # argument.
23935    path="$complete"
23936    arguments="EOL"
23937    new_path=`$CYGPATH -u "$path"`
23938    new_path=`$WHICH "$new_path" 2> /dev/null`
23939    # bat and cmd files are not always considered executable in cygwin causing which
23940    # to not find them
23941    if test "x$new_path" = x \
23942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23944      new_path=`$CYGPATH -u "$path"`
23945    fi
23946    if test "x$new_path" = x; then
23947      # It's still not found. Now this is an unrecoverable error.
23948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23949$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23950      has_space=`$ECHO "$complete" | $GREP " "`
23951      if test "x$has_space" != x; then
23952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23954      fi
23955      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23956    fi
23957  fi
23958
23959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23962  # "foo.exe" is OK but "foo" is an error.
23963  #
23964  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23965  # It is also a way to make sure we got the proper file name for the real test later on.
23966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23967  if test "x$test_shortpath" = x; then
23968    # Short path failed, file does not exist as specified.
23969    # Try adding .exe or .cmd
23970    if test -f "${new_path}.exe"; then
23971      input_to_shortpath="${new_path}.exe"
23972    elif test -f "${new_path}.cmd"; then
23973      input_to_shortpath="${new_path}.cmd"
23974    else
23975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23976$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23979      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23980    fi
23981  else
23982    input_to_shortpath="$new_path"
23983  fi
23984
23985  # Call helper function which possibly converts this using DOS-style short mode.
23986  # If so, the updated path is stored in $new_path.
23987  new_path="$input_to_shortpath"
23988
23989  input_path="$input_to_shortpath"
23990  # Check if we need to convert this using DOS-style short mode. If the path
23991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23992  # take no chances and rewrite it.
23993  # Note: m4 eats our [], so we need to use [ and ] instead.
23994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23995  if test "x$has_forbidden_chars" != x; then
23996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24000      # Going to short mode and back again did indeed matter. Since short mode is
24001      # case insensitive, let's make it lowercase to improve readability.
24002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24003      # Now convert it back to Unix-stile (cygpath)
24004      input_path=`$CYGPATH -u "$shortmode_path"`
24005      new_path="$input_path"
24006    fi
24007  fi
24008
24009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24010  if test "x$test_cygdrive_prefix" = x; then
24011    # As a simple fix, exclude /usr/bin since it's not a real path.
24012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24014      # a path prefixed by /cygdrive for fixpath to work.
24015      new_path="$CYGWIN_ROOT_PATH$input_path"
24016    fi
24017  fi
24018
24019  # remove trailing .exe if any
24020  new_path="${new_path/%.exe/}"
24021
24022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24023
24024  # First separate the path from the arguments. This will split at the first
24025  # space.
24026  complete="$WINAR"
24027  path="${complete%% *}"
24028  tmp="$complete EOL"
24029  arguments="${tmp#* }"
24030
24031  # Input might be given as Windows format, start by converting to
24032  # unix format.
24033  new_path="$path"
24034
24035  windows_path="$new_path"
24036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24037    unix_path=`$CYGPATH -u "$windows_path"`
24038    new_path="$unix_path"
24039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24041    new_path="$unix_path"
24042  fi
24043
24044
24045  # Now try to locate executable using which
24046  new_path=`$WHICH "$new_path" 2> /dev/null`
24047
24048  if test "x$new_path" = x; then
24049    # Oops. Which didn't find the executable.
24050    # The splitting of arguments from the executable at a space might have been incorrect,
24051    # since paths with space are more likely in Windows. Give it another try with the whole
24052    # argument.
24053    path="$complete"
24054    arguments="EOL"
24055    new_path="$path"
24056
24057  windows_path="$new_path"
24058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24059    unix_path=`$CYGPATH -u "$windows_path"`
24060    new_path="$unix_path"
24061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24063    new_path="$unix_path"
24064  fi
24065
24066
24067    new_path=`$WHICH "$new_path" 2> /dev/null`
24068
24069    if test "x$new_path" = x; then
24070      # It's still not found. Now this is an unrecoverable error.
24071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24072$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24073      has_space=`$ECHO "$complete" | $GREP " "`
24074      if test "x$has_space" != x; then
24075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24077      fi
24078      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24079    fi
24080  fi
24081
24082  # Now new_path has a complete unix path to the binary
24083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24084    # Keep paths in /bin as-is, but remove trailing .exe if any
24085    new_path="${new_path/%.exe/}"
24086    # Do not save /bin paths to all_fixpath_prefixes!
24087  else
24088    # Not in mixed or Windows style, start by that.
24089    new_path=`cmd //c echo $new_path`
24090
24091  input_path="$new_path"
24092  # Check if we need to convert this using DOS-style short mode. If the path
24093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24094  # take no chances and rewrite it.
24095  # Note: m4 eats our [], so we need to use [ and ] instead.
24096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24097  if test "x$has_forbidden_chars" != x; then
24098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24100  fi
24101
24102    # Output is in $new_path
24103
24104  windows_path="$new_path"
24105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24106    unix_path=`$CYGPATH -u "$windows_path"`
24107    new_path="$unix_path"
24108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24110    new_path="$unix_path"
24111  fi
24112
24113    # remove trailing .exe if any
24114    new_path="${new_path/%.exe/}"
24115
24116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24118  fi
24119
24120  else
24121    # We're on a posix platform. Hooray! :)
24122    # First separate the path from the arguments. This will split at the first
24123    # space.
24124    complete="$WINAR"
24125    path="${complete%% *}"
24126    tmp="$complete EOL"
24127    arguments="${tmp#* }"
24128
24129    # Cannot rely on the command "which" here since it doesn't always work.
24130    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24131    if test -z "$is_absolute_path"; then
24132      # Path to executable is not absolute. Find it.
24133      IFS_save="$IFS"
24134      IFS=:
24135      for p in $PATH; do
24136        if test -f "$p/$path" && test -x "$p/$path"; then
24137          new_path="$p/$path"
24138          break
24139        fi
24140      done
24141      IFS="$IFS_save"
24142    else
24143      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24144$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24145      new_path="$path"
24146    fi
24147
24148    if test "x$new_path" = x; then
24149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24150$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24151      has_space=`$ECHO "$complete" | $GREP " "`
24152      if test "x$has_space" != x; then
24153        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24155      fi
24156      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24157    fi
24158  fi
24159
24160  # Now join together the path and the arguments once again
24161  if test "x$arguments" != xEOL; then
24162    new_complete="$new_path ${arguments% *}"
24163  else
24164    new_complete="$new_path"
24165  fi
24166
24167  if test "x$complete" != "x$new_complete"; then
24168    WINAR="$new_complete"
24169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24170$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24171  fi
24172
24173  AR="$WINAR"
24174  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24175
24176  # Extract the first word of "dumpbin", so it can be a program name with args.
24177set dummy dumpbin; ac_word=$2
24178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24179$as_echo_n "checking for $ac_word... " >&6; }
24180if ${ac_cv_prog_DUMPBIN+:} false; then :
24181  $as_echo_n "(cached) " >&6
24182else
24183  if test -n "$DUMPBIN"; then
24184  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24185else
24186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24187for as_dir in $PATH
24188do
24189  IFS=$as_save_IFS
24190  test -z "$as_dir" && as_dir=.
24191    for ac_exec_ext in '' $ac_executable_extensions; do
24192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24193    ac_cv_prog_DUMPBIN="dumpbin"
24194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24195    break 2
24196  fi
24197done
24198  done
24199IFS=$as_save_IFS
24200
24201fi
24202fi
24203DUMPBIN=$ac_cv_prog_DUMPBIN
24204if test -n "$DUMPBIN"; then
24205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24206$as_echo "$DUMPBIN" >&6; }
24207else
24208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24209$as_echo "no" >&6; }
24210fi
24211
24212
24213
24214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24215
24216  # First separate the path from the arguments. This will split at the first
24217  # space.
24218  complete="$DUMPBIN"
24219  path="${complete%% *}"
24220  tmp="$complete EOL"
24221  arguments="${tmp#* }"
24222
24223  # Input might be given as Windows format, start by converting to
24224  # unix format.
24225  new_path=`$CYGPATH -u "$path"`
24226
24227  # Now try to locate executable using which
24228  new_path=`$WHICH "$new_path" 2> /dev/null`
24229  # bat and cmd files are not always considered executable in cygwin causing which
24230  # to not find them
24231  if test "x$new_path" = x \
24232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24234    new_path=`$CYGPATH -u "$path"`
24235  fi
24236  if test "x$new_path" = x; then
24237    # Oops. Which didn't find the executable.
24238    # The splitting of arguments from the executable at a space might have been incorrect,
24239    # since paths with space are more likely in Windows. Give it another try with the whole
24240    # argument.
24241    path="$complete"
24242    arguments="EOL"
24243    new_path=`$CYGPATH -u "$path"`
24244    new_path=`$WHICH "$new_path" 2> /dev/null`
24245    # bat and cmd files are not always considered executable in cygwin causing which
24246    # to not find them
24247    if test "x$new_path" = x \
24248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24250      new_path=`$CYGPATH -u "$path"`
24251    fi
24252    if test "x$new_path" = x; then
24253      # It's still not found. Now this is an unrecoverable error.
24254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24255$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24256      has_space=`$ECHO "$complete" | $GREP " "`
24257      if test "x$has_space" != x; then
24258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24260      fi
24261      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24262    fi
24263  fi
24264
24265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24268  # "foo.exe" is OK but "foo" is an error.
24269  #
24270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24271  # It is also a way to make sure we got the proper file name for the real test later on.
24272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24273  if test "x$test_shortpath" = x; then
24274    # Short path failed, file does not exist as specified.
24275    # Try adding .exe or .cmd
24276    if test -f "${new_path}.exe"; then
24277      input_to_shortpath="${new_path}.exe"
24278    elif test -f "${new_path}.cmd"; then
24279      input_to_shortpath="${new_path}.cmd"
24280    else
24281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24282$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24285      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24286    fi
24287  else
24288    input_to_shortpath="$new_path"
24289  fi
24290
24291  # Call helper function which possibly converts this using DOS-style short mode.
24292  # If so, the updated path is stored in $new_path.
24293  new_path="$input_to_shortpath"
24294
24295  input_path="$input_to_shortpath"
24296  # Check if we need to convert this using DOS-style short mode. If the path
24297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24298  # take no chances and rewrite it.
24299  # Note: m4 eats our [], so we need to use [ and ] instead.
24300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24301  if test "x$has_forbidden_chars" != x; then
24302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24306      # Going to short mode and back again did indeed matter. Since short mode is
24307      # case insensitive, let's make it lowercase to improve readability.
24308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24309      # Now convert it back to Unix-stile (cygpath)
24310      input_path=`$CYGPATH -u "$shortmode_path"`
24311      new_path="$input_path"
24312    fi
24313  fi
24314
24315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24316  if test "x$test_cygdrive_prefix" = x; then
24317    # As a simple fix, exclude /usr/bin since it's not a real path.
24318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24320      # a path prefixed by /cygdrive for fixpath to work.
24321      new_path="$CYGWIN_ROOT_PATH$input_path"
24322    fi
24323  fi
24324
24325  # remove trailing .exe if any
24326  new_path="${new_path/%.exe/}"
24327
24328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24329
24330  # First separate the path from the arguments. This will split at the first
24331  # space.
24332  complete="$DUMPBIN"
24333  path="${complete%% *}"
24334  tmp="$complete EOL"
24335  arguments="${tmp#* }"
24336
24337  # Input might be given as Windows format, start by converting to
24338  # unix format.
24339  new_path="$path"
24340
24341  windows_path="$new_path"
24342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24343    unix_path=`$CYGPATH -u "$windows_path"`
24344    new_path="$unix_path"
24345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24347    new_path="$unix_path"
24348  fi
24349
24350
24351  # Now try to locate executable using which
24352  new_path=`$WHICH "$new_path" 2> /dev/null`
24353
24354  if test "x$new_path" = x; then
24355    # Oops. Which didn't find the executable.
24356    # The splitting of arguments from the executable at a space might have been incorrect,
24357    # since paths with space are more likely in Windows. Give it another try with the whole
24358    # argument.
24359    path="$complete"
24360    arguments="EOL"
24361    new_path="$path"
24362
24363  windows_path="$new_path"
24364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24365    unix_path=`$CYGPATH -u "$windows_path"`
24366    new_path="$unix_path"
24367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24369    new_path="$unix_path"
24370  fi
24371
24372
24373    new_path=`$WHICH "$new_path" 2> /dev/null`
24374
24375    if test "x$new_path" = x; then
24376      # It's still not found. Now this is an unrecoverable error.
24377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24378$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24379      has_space=`$ECHO "$complete" | $GREP " "`
24380      if test "x$has_space" != x; then
24381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24383      fi
24384      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24385    fi
24386  fi
24387
24388  # Now new_path has a complete unix path to the binary
24389  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24390    # Keep paths in /bin as-is, but remove trailing .exe if any
24391    new_path="${new_path/%.exe/}"
24392    # Do not save /bin paths to all_fixpath_prefixes!
24393  else
24394    # Not in mixed or Windows style, start by that.
24395    new_path=`cmd //c echo $new_path`
24396
24397  input_path="$new_path"
24398  # Check if we need to convert this using DOS-style short mode. If the path
24399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24400  # take no chances and rewrite it.
24401  # Note: m4 eats our [], so we need to use [ and ] instead.
24402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24403  if test "x$has_forbidden_chars" != x; then
24404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24406  fi
24407
24408    # Output is in $new_path
24409
24410  windows_path="$new_path"
24411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24412    unix_path=`$CYGPATH -u "$windows_path"`
24413    new_path="$unix_path"
24414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24416    new_path="$unix_path"
24417  fi
24418
24419    # remove trailing .exe if any
24420    new_path="${new_path/%.exe/}"
24421
24422    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24423    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24424  fi
24425
24426  else
24427    # We're on a posix platform. Hooray! :)
24428    # First separate the path from the arguments. This will split at the first
24429    # space.
24430    complete="$DUMPBIN"
24431    path="${complete%% *}"
24432    tmp="$complete EOL"
24433    arguments="${tmp#* }"
24434
24435    # Cannot rely on the command "which" here since it doesn't always work.
24436    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24437    if test -z "$is_absolute_path"; then
24438      # Path to executable is not absolute. Find it.
24439      IFS_save="$IFS"
24440      IFS=:
24441      for p in $PATH; do
24442        if test -f "$p/$path" && test -x "$p/$path"; then
24443          new_path="$p/$path"
24444          break
24445        fi
24446      done
24447      IFS="$IFS_save"
24448    else
24449      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24450$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24451      new_path="$path"
24452    fi
24453
24454    if test "x$new_path" = x; then
24455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24456$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24457      has_space=`$ECHO "$complete" | $GREP " "`
24458      if test "x$has_space" != x; then
24459        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24461      fi
24462      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24463    fi
24464  fi
24465
24466  # Now join together the path and the arguments once again
24467  if test "x$arguments" != xEOL; then
24468    new_complete="$new_path ${arguments% *}"
24469  else
24470    new_complete="$new_path"
24471  fi
24472
24473  if test "x$complete" != "x$new_complete"; then
24474    DUMPBIN="$new_complete"
24475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24476$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24477  fi
24478
24479
24480      COMPILER_TYPE=CL
24481      CCXXFLAGS="$CCXXFLAGS -nologo"
24482
24483fi
24484
24485
24486
24487  ac_ext=c
24488ac_cpp='$CPP $CPPFLAGS'
24489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24491ac_compiler_gnu=$ac_cv_c_compiler_gnu
24492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24493$as_echo_n "checking how to run the C preprocessor... " >&6; }
24494# On Suns, sometimes $CPP names a directory.
24495if test -n "$CPP" && test -d "$CPP"; then
24496  CPP=
24497fi
24498if test -z "$CPP"; then
24499  if ${ac_cv_prog_CPP+:} false; then :
24500  $as_echo_n "(cached) " >&6
24501else
24502      # Double quotes because CPP needs to be expanded
24503    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24504    do
24505      ac_preproc_ok=false
24506for ac_c_preproc_warn_flag in '' yes
24507do
24508  # Use a header file that comes with gcc, so configuring glibc
24509  # with a fresh cross-compiler works.
24510  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24511  # <limits.h> exists even on freestanding compilers.
24512  # On the NeXT, cc -E runs the code through the compiler's parser,
24513  # not just through cpp. "Syntax error" is here to catch this case.
24514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24515/* end confdefs.h.  */
24516#ifdef __STDC__
24517# include <limits.h>
24518#else
24519# include <assert.h>
24520#endif
24521		     Syntax error
24522_ACEOF
24523if ac_fn_c_try_cpp "$LINENO"; then :
24524
24525else
24526  # Broken: fails on valid input.
24527continue
24528fi
24529rm -f conftest.err conftest.i conftest.$ac_ext
24530
24531  # OK, works on sane cases.  Now check whether nonexistent headers
24532  # can be detected and how.
24533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24534/* end confdefs.h.  */
24535#include <ac_nonexistent.h>
24536_ACEOF
24537if ac_fn_c_try_cpp "$LINENO"; then :
24538  # Broken: success on invalid input.
24539continue
24540else
24541  # Passes both tests.
24542ac_preproc_ok=:
24543break
24544fi
24545rm -f conftest.err conftest.i conftest.$ac_ext
24546
24547done
24548# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24549rm -f conftest.i conftest.err conftest.$ac_ext
24550if $ac_preproc_ok; then :
24551  break
24552fi
24553
24554    done
24555    ac_cv_prog_CPP=$CPP
24556
24557fi
24558  CPP=$ac_cv_prog_CPP
24559else
24560  ac_cv_prog_CPP=$CPP
24561fi
24562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24563$as_echo "$CPP" >&6; }
24564ac_preproc_ok=false
24565for ac_c_preproc_warn_flag in '' yes
24566do
24567  # Use a header file that comes with gcc, so configuring glibc
24568  # with a fresh cross-compiler works.
24569  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24570  # <limits.h> exists even on freestanding compilers.
24571  # On the NeXT, cc -E runs the code through the compiler's parser,
24572  # not just through cpp. "Syntax error" is here to catch this case.
24573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24574/* end confdefs.h.  */
24575#ifdef __STDC__
24576# include <limits.h>
24577#else
24578# include <assert.h>
24579#endif
24580		     Syntax error
24581_ACEOF
24582if ac_fn_c_try_cpp "$LINENO"; then :
24583
24584else
24585  # Broken: fails on valid input.
24586continue
24587fi
24588rm -f conftest.err conftest.i conftest.$ac_ext
24589
24590  # OK, works on sane cases.  Now check whether nonexistent headers
24591  # can be detected and how.
24592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24593/* end confdefs.h.  */
24594#include <ac_nonexistent.h>
24595_ACEOF
24596if ac_fn_c_try_cpp "$LINENO"; then :
24597  # Broken: success on invalid input.
24598continue
24599else
24600  # Passes both tests.
24601ac_preproc_ok=:
24602break
24603fi
24604rm -f conftest.err conftest.i conftest.$ac_ext
24605
24606done
24607# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24608rm -f conftest.i conftest.err conftest.$ac_ext
24609if $ac_preproc_ok; then :
24610
24611else
24612  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24614as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24615See \`config.log' for more details" "$LINENO" 5; }
24616fi
24617
24618ac_ext=cpp
24619ac_cpp='$CXXCPP $CPPFLAGS'
24620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24623
24624
24625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24626
24627  # First separate the path from the arguments. This will split at the first
24628  # space.
24629  complete="$CPP"
24630  path="${complete%% *}"
24631  tmp="$complete EOL"
24632  arguments="${tmp#* }"
24633
24634  # Input might be given as Windows format, start by converting to
24635  # unix format.
24636  new_path=`$CYGPATH -u "$path"`
24637
24638  # Now try to locate executable using which
24639  new_path=`$WHICH "$new_path" 2> /dev/null`
24640  # bat and cmd files are not always considered executable in cygwin causing which
24641  # to not find them
24642  if test "x$new_path" = x \
24643      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24644      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24645    new_path=`$CYGPATH -u "$path"`
24646  fi
24647  if test "x$new_path" = x; then
24648    # Oops. Which didn't find the executable.
24649    # The splitting of arguments from the executable at a space might have been incorrect,
24650    # since paths with space are more likely in Windows. Give it another try with the whole
24651    # argument.
24652    path="$complete"
24653    arguments="EOL"
24654    new_path=`$CYGPATH -u "$path"`
24655    new_path=`$WHICH "$new_path" 2> /dev/null`
24656    # bat and cmd files are not always considered executable in cygwin causing which
24657    # to not find them
24658    if test "x$new_path" = x \
24659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24661      new_path=`$CYGPATH -u "$path"`
24662    fi
24663    if test "x$new_path" = x; then
24664      # It's still not found. Now this is an unrecoverable error.
24665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24666$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24667      has_space=`$ECHO "$complete" | $GREP " "`
24668      if test "x$has_space" != x; then
24669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24671      fi
24672      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24673    fi
24674  fi
24675
24676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24679  # "foo.exe" is OK but "foo" is an error.
24680  #
24681  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24682  # It is also a way to make sure we got the proper file name for the real test later on.
24683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24684  if test "x$test_shortpath" = x; then
24685    # Short path failed, file does not exist as specified.
24686    # Try adding .exe or .cmd
24687    if test -f "${new_path}.exe"; then
24688      input_to_shortpath="${new_path}.exe"
24689    elif test -f "${new_path}.cmd"; then
24690      input_to_shortpath="${new_path}.cmd"
24691    else
24692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24693$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24696      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24697    fi
24698  else
24699    input_to_shortpath="$new_path"
24700  fi
24701
24702  # Call helper function which possibly converts this using DOS-style short mode.
24703  # If so, the updated path is stored in $new_path.
24704  new_path="$input_to_shortpath"
24705
24706  input_path="$input_to_shortpath"
24707  # Check if we need to convert this using DOS-style short mode. If the path
24708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24709  # take no chances and rewrite it.
24710  # Note: m4 eats our [], so we need to use [ and ] instead.
24711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24712  if test "x$has_forbidden_chars" != x; then
24713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24717      # Going to short mode and back again did indeed matter. Since short mode is
24718      # case insensitive, let's make it lowercase to improve readability.
24719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24720      # Now convert it back to Unix-stile (cygpath)
24721      input_path=`$CYGPATH -u "$shortmode_path"`
24722      new_path="$input_path"
24723    fi
24724  fi
24725
24726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24727  if test "x$test_cygdrive_prefix" = x; then
24728    # As a simple fix, exclude /usr/bin since it's not a real path.
24729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24731      # a path prefixed by /cygdrive for fixpath to work.
24732      new_path="$CYGWIN_ROOT_PATH$input_path"
24733    fi
24734  fi
24735
24736  # remove trailing .exe if any
24737  new_path="${new_path/%.exe/}"
24738
24739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24740
24741  # First separate the path from the arguments. This will split at the first
24742  # space.
24743  complete="$CPP"
24744  path="${complete%% *}"
24745  tmp="$complete EOL"
24746  arguments="${tmp#* }"
24747
24748  # Input might be given as Windows format, start by converting to
24749  # unix format.
24750  new_path="$path"
24751
24752  windows_path="$new_path"
24753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24754    unix_path=`$CYGPATH -u "$windows_path"`
24755    new_path="$unix_path"
24756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24758    new_path="$unix_path"
24759  fi
24760
24761
24762  # Now try to locate executable using which
24763  new_path=`$WHICH "$new_path" 2> /dev/null`
24764
24765  if test "x$new_path" = x; then
24766    # Oops. Which didn't find the executable.
24767    # The splitting of arguments from the executable at a space might have been incorrect,
24768    # since paths with space are more likely in Windows. Give it another try with the whole
24769    # argument.
24770    path="$complete"
24771    arguments="EOL"
24772    new_path="$path"
24773
24774  windows_path="$new_path"
24775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24776    unix_path=`$CYGPATH -u "$windows_path"`
24777    new_path="$unix_path"
24778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24780    new_path="$unix_path"
24781  fi
24782
24783
24784    new_path=`$WHICH "$new_path" 2> /dev/null`
24785
24786    if test "x$new_path" = x; then
24787      # It's still not found. Now this is an unrecoverable error.
24788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24789$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24790      has_space=`$ECHO "$complete" | $GREP " "`
24791      if test "x$has_space" != x; then
24792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24794      fi
24795      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24796    fi
24797  fi
24798
24799  # Now new_path has a complete unix path to the binary
24800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24801    # Keep paths in /bin as-is, but remove trailing .exe if any
24802    new_path="${new_path/%.exe/}"
24803    # Do not save /bin paths to all_fixpath_prefixes!
24804  else
24805    # Not in mixed or Windows style, start by that.
24806    new_path=`cmd //c echo $new_path`
24807
24808  input_path="$new_path"
24809  # Check if we need to convert this using DOS-style short mode. If the path
24810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24811  # take no chances and rewrite it.
24812  # Note: m4 eats our [], so we need to use [ and ] instead.
24813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24814  if test "x$has_forbidden_chars" != x; then
24815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24817  fi
24818
24819    # Output is in $new_path
24820
24821  windows_path="$new_path"
24822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24823    unix_path=`$CYGPATH -u "$windows_path"`
24824    new_path="$unix_path"
24825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24827    new_path="$unix_path"
24828  fi
24829
24830    # remove trailing .exe if any
24831    new_path="${new_path/%.exe/}"
24832
24833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24835  fi
24836
24837  else
24838    # We're on a posix platform. Hooray! :)
24839    # First separate the path from the arguments. This will split at the first
24840    # space.
24841    complete="$CPP"
24842    path="${complete%% *}"
24843    tmp="$complete EOL"
24844    arguments="${tmp#* }"
24845
24846    # Cannot rely on the command "which" here since it doesn't always work.
24847    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24848    if test -z "$is_absolute_path"; then
24849      # Path to executable is not absolute. Find it.
24850      IFS_save="$IFS"
24851      IFS=:
24852      for p in $PATH; do
24853        if test -f "$p/$path" && test -x "$p/$path"; then
24854          new_path="$p/$path"
24855          break
24856        fi
24857      done
24858      IFS="$IFS_save"
24859    else
24860      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24861$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24862      new_path="$path"
24863    fi
24864
24865    if test "x$new_path" = x; then
24866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24867$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24868      has_space=`$ECHO "$complete" | $GREP " "`
24869      if test "x$has_space" != x; then
24870        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24872      fi
24873      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24874    fi
24875  fi
24876
24877  # Now join together the path and the arguments once again
24878  if test "x$arguments" != xEOL; then
24879    new_complete="$new_path ${arguments% *}"
24880  else
24881    new_complete="$new_path"
24882  fi
24883
24884  if test "x$complete" != "x$new_complete"; then
24885    CPP="$new_complete"
24886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24887$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24888  fi
24889
24890
24891  ac_ext=cpp
24892ac_cpp='$CXXCPP $CPPFLAGS'
24893ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24894ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24895ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24897$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24898if test -z "$CXXCPP"; then
24899  if ${ac_cv_prog_CXXCPP+:} false; then :
24900  $as_echo_n "(cached) " >&6
24901else
24902      # Double quotes because CXXCPP needs to be expanded
24903    for CXXCPP in "$CXX -E" "/lib/cpp"
24904    do
24905      ac_preproc_ok=false
24906for ac_cxx_preproc_warn_flag in '' yes
24907do
24908  # Use a header file that comes with gcc, so configuring glibc
24909  # with a fresh cross-compiler works.
24910  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24911  # <limits.h> exists even on freestanding compilers.
24912  # On the NeXT, cc -E runs the code through the compiler's parser,
24913  # not just through cpp. "Syntax error" is here to catch this case.
24914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24915/* end confdefs.h.  */
24916#ifdef __STDC__
24917# include <limits.h>
24918#else
24919# include <assert.h>
24920#endif
24921		     Syntax error
24922_ACEOF
24923if ac_fn_cxx_try_cpp "$LINENO"; then :
24924
24925else
24926  # Broken: fails on valid input.
24927continue
24928fi
24929rm -f conftest.err conftest.i conftest.$ac_ext
24930
24931  # OK, works on sane cases.  Now check whether nonexistent headers
24932  # can be detected and how.
24933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24934/* end confdefs.h.  */
24935#include <ac_nonexistent.h>
24936_ACEOF
24937if ac_fn_cxx_try_cpp "$LINENO"; then :
24938  # Broken: success on invalid input.
24939continue
24940else
24941  # Passes both tests.
24942ac_preproc_ok=:
24943break
24944fi
24945rm -f conftest.err conftest.i conftest.$ac_ext
24946
24947done
24948# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24949rm -f conftest.i conftest.err conftest.$ac_ext
24950if $ac_preproc_ok; then :
24951  break
24952fi
24953
24954    done
24955    ac_cv_prog_CXXCPP=$CXXCPP
24956
24957fi
24958  CXXCPP=$ac_cv_prog_CXXCPP
24959else
24960  ac_cv_prog_CXXCPP=$CXXCPP
24961fi
24962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24963$as_echo "$CXXCPP" >&6; }
24964ac_preproc_ok=false
24965for ac_cxx_preproc_warn_flag in '' yes
24966do
24967  # Use a header file that comes with gcc, so configuring glibc
24968  # with a fresh cross-compiler works.
24969  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24970  # <limits.h> exists even on freestanding compilers.
24971  # On the NeXT, cc -E runs the code through the compiler's parser,
24972  # not just through cpp. "Syntax error" is here to catch this case.
24973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24974/* end confdefs.h.  */
24975#ifdef __STDC__
24976# include <limits.h>
24977#else
24978# include <assert.h>
24979#endif
24980		     Syntax error
24981_ACEOF
24982if ac_fn_cxx_try_cpp "$LINENO"; then :
24983
24984else
24985  # Broken: fails on valid input.
24986continue
24987fi
24988rm -f conftest.err conftest.i conftest.$ac_ext
24989
24990  # OK, works on sane cases.  Now check whether nonexistent headers
24991  # can be detected and how.
24992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24993/* end confdefs.h.  */
24994#include <ac_nonexistent.h>
24995_ACEOF
24996if ac_fn_cxx_try_cpp "$LINENO"; then :
24997  # Broken: success on invalid input.
24998continue
24999else
25000  # Passes both tests.
25001ac_preproc_ok=:
25002break
25003fi
25004rm -f conftest.err conftest.i conftest.$ac_ext
25005
25006done
25007# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25008rm -f conftest.i conftest.err conftest.$ac_ext
25009if $ac_preproc_ok; then :
25010
25011else
25012  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25014as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25015See \`config.log' for more details" "$LINENO" 5; }
25016fi
25017
25018ac_ext=cpp
25019ac_cpp='$CXXCPP $CPPFLAGS'
25020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25023
25024
25025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25026
25027  # First separate the path from the arguments. This will split at the first
25028  # space.
25029  complete="$CXXCPP"
25030  path="${complete%% *}"
25031  tmp="$complete EOL"
25032  arguments="${tmp#* }"
25033
25034  # Input might be given as Windows format, start by converting to
25035  # unix format.
25036  new_path=`$CYGPATH -u "$path"`
25037
25038  # Now try to locate executable using which
25039  new_path=`$WHICH "$new_path" 2> /dev/null`
25040  # bat and cmd files are not always considered executable in cygwin causing which
25041  # to not find them
25042  if test "x$new_path" = x \
25043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25045    new_path=`$CYGPATH -u "$path"`
25046  fi
25047  if test "x$new_path" = x; then
25048    # Oops. Which didn't find the executable.
25049    # The splitting of arguments from the executable at a space might have been incorrect,
25050    # since paths with space are more likely in Windows. Give it another try with the whole
25051    # argument.
25052    path="$complete"
25053    arguments="EOL"
25054    new_path=`$CYGPATH -u "$path"`
25055    new_path=`$WHICH "$new_path" 2> /dev/null`
25056    # bat and cmd files are not always considered executable in cygwin causing which
25057    # to not find them
25058    if test "x$new_path" = x \
25059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25061      new_path=`$CYGPATH -u "$path"`
25062    fi
25063    if test "x$new_path" = x; then
25064      # It's still not found. Now this is an unrecoverable error.
25065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25066$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25067      has_space=`$ECHO "$complete" | $GREP " "`
25068      if test "x$has_space" != x; then
25069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25071      fi
25072      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25073    fi
25074  fi
25075
25076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25079  # "foo.exe" is OK but "foo" is an error.
25080  #
25081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25082  # It is also a way to make sure we got the proper file name for the real test later on.
25083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25084  if test "x$test_shortpath" = x; then
25085    # Short path failed, file does not exist as specified.
25086    # Try adding .exe or .cmd
25087    if test -f "${new_path}.exe"; then
25088      input_to_shortpath="${new_path}.exe"
25089    elif test -f "${new_path}.cmd"; then
25090      input_to_shortpath="${new_path}.cmd"
25091    else
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25093$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25096      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25097    fi
25098  else
25099    input_to_shortpath="$new_path"
25100  fi
25101
25102  # Call helper function which possibly converts this using DOS-style short mode.
25103  # If so, the updated path is stored in $new_path.
25104  new_path="$input_to_shortpath"
25105
25106  input_path="$input_to_shortpath"
25107  # Check if we need to convert this using DOS-style short mode. If the path
25108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25109  # take no chances and rewrite it.
25110  # Note: m4 eats our [], so we need to use [ and ] instead.
25111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25112  if test "x$has_forbidden_chars" != x; then
25113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25117      # Going to short mode and back again did indeed matter. Since short mode is
25118      # case insensitive, let's make it lowercase to improve readability.
25119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25120      # Now convert it back to Unix-stile (cygpath)
25121      input_path=`$CYGPATH -u "$shortmode_path"`
25122      new_path="$input_path"
25123    fi
25124  fi
25125
25126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25127  if test "x$test_cygdrive_prefix" = x; then
25128    # As a simple fix, exclude /usr/bin since it's not a real path.
25129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25131      # a path prefixed by /cygdrive for fixpath to work.
25132      new_path="$CYGWIN_ROOT_PATH$input_path"
25133    fi
25134  fi
25135
25136  # remove trailing .exe if any
25137  new_path="${new_path/%.exe/}"
25138
25139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25140
25141  # First separate the path from the arguments. This will split at the first
25142  # space.
25143  complete="$CXXCPP"
25144  path="${complete%% *}"
25145  tmp="$complete EOL"
25146  arguments="${tmp#* }"
25147
25148  # Input might be given as Windows format, start by converting to
25149  # unix format.
25150  new_path="$path"
25151
25152  windows_path="$new_path"
25153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25154    unix_path=`$CYGPATH -u "$windows_path"`
25155    new_path="$unix_path"
25156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25158    new_path="$unix_path"
25159  fi
25160
25161
25162  # Now try to locate executable using which
25163  new_path=`$WHICH "$new_path" 2> /dev/null`
25164
25165  if test "x$new_path" = x; then
25166    # Oops. Which didn't find the executable.
25167    # The splitting of arguments from the executable at a space might have been incorrect,
25168    # since paths with space are more likely in Windows. Give it another try with the whole
25169    # argument.
25170    path="$complete"
25171    arguments="EOL"
25172    new_path="$path"
25173
25174  windows_path="$new_path"
25175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25176    unix_path=`$CYGPATH -u "$windows_path"`
25177    new_path="$unix_path"
25178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25180    new_path="$unix_path"
25181  fi
25182
25183
25184    new_path=`$WHICH "$new_path" 2> /dev/null`
25185
25186    if test "x$new_path" = x; then
25187      # It's still not found. Now this is an unrecoverable error.
25188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25189$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25190      has_space=`$ECHO "$complete" | $GREP " "`
25191      if test "x$has_space" != x; then
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25194      fi
25195      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25196    fi
25197  fi
25198
25199  # Now new_path has a complete unix path to the binary
25200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25201    # Keep paths in /bin as-is, but remove trailing .exe if any
25202    new_path="${new_path/%.exe/}"
25203    # Do not save /bin paths to all_fixpath_prefixes!
25204  else
25205    # Not in mixed or Windows style, start by that.
25206    new_path=`cmd //c echo $new_path`
25207
25208  input_path="$new_path"
25209  # Check if we need to convert this using DOS-style short mode. If the path
25210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25211  # take no chances and rewrite it.
25212  # Note: m4 eats our [], so we need to use [ and ] instead.
25213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25214  if test "x$has_forbidden_chars" != x; then
25215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25217  fi
25218
25219    # Output is in $new_path
25220
25221  windows_path="$new_path"
25222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25223    unix_path=`$CYGPATH -u "$windows_path"`
25224    new_path="$unix_path"
25225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25227    new_path="$unix_path"
25228  fi
25229
25230    # remove trailing .exe if any
25231    new_path="${new_path/%.exe/}"
25232
25233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25235  fi
25236
25237  else
25238    # We're on a posix platform. Hooray! :)
25239    # First separate the path from the arguments. This will split at the first
25240    # space.
25241    complete="$CXXCPP"
25242    path="${complete%% *}"
25243    tmp="$complete EOL"
25244    arguments="${tmp#* }"
25245
25246    # Cannot rely on the command "which" here since it doesn't always work.
25247    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25248    if test -z "$is_absolute_path"; then
25249      # Path to executable is not absolute. Find it.
25250      IFS_save="$IFS"
25251      IFS=:
25252      for p in $PATH; do
25253        if test -f "$p/$path" && test -x "$p/$path"; then
25254          new_path="$p/$path"
25255          break
25256        fi
25257      done
25258      IFS="$IFS_save"
25259    else
25260      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25261$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25262      new_path="$path"
25263    fi
25264
25265    if test "x$new_path" = x; then
25266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25267$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25268      has_space=`$ECHO "$complete" | $GREP " "`
25269      if test "x$has_space" != x; then
25270        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25272      fi
25273      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25274    fi
25275  fi
25276
25277  # Now join together the path and the arguments once again
25278  if test "x$arguments" != xEOL; then
25279    new_complete="$new_path ${arguments% *}"
25280  else
25281    new_complete="$new_path"
25282  fi
25283
25284  if test "x$complete" != "x$new_complete"; then
25285    CXXCPP="$new_complete"
25286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25287$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25288  fi
25289
25290
25291  if test "x$COMPILE_TYPE" != "xcross"; then
25292    # If we are not cross compiling, use the same compilers for
25293    # building the build platform executables. The cross-compilation
25294    # case needed to be done earlier, but this can only be done after
25295    # the native tools have been localized.
25296    BUILD_CC="$CC"
25297    BUILD_CXX="$CXX"
25298    BUILD_LD="$LD"
25299  fi
25300
25301  # for solaris we really need solaris tools, and not gnu equivalent
25302  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25303  #   starting to probe
25304  #
25305  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25306  #         so that it can be overriden --with-tools-dir
25307  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25308    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25309  fi
25310
25311  # Find the right assembler.
25312  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25313    # Extract the first word of "as", so it can be a program name with args.
25314set dummy as; ac_word=$2
25315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25316$as_echo_n "checking for $ac_word... " >&6; }
25317if ${ac_cv_path_AS+:} false; then :
25318  $as_echo_n "(cached) " >&6
25319else
25320  case $AS in
25321  [\\/]* | ?:[\\/]*)
25322  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25323  ;;
25324  *)
25325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25326for as_dir in $PATH
25327do
25328  IFS=$as_save_IFS
25329  test -z "$as_dir" && as_dir=.
25330    for ac_exec_ext in '' $ac_executable_extensions; do
25331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25332    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25334    break 2
25335  fi
25336done
25337  done
25338IFS=$as_save_IFS
25339
25340  ;;
25341esac
25342fi
25343AS=$ac_cv_path_AS
25344if test -n "$AS"; then
25345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25346$as_echo "$AS" >&6; }
25347else
25348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25349$as_echo "no" >&6; }
25350fi
25351
25352
25353
25354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25355
25356  # First separate the path from the arguments. This will split at the first
25357  # space.
25358  complete="$AS"
25359  path="${complete%% *}"
25360  tmp="$complete EOL"
25361  arguments="${tmp#* }"
25362
25363  # Input might be given as Windows format, start by converting to
25364  # unix format.
25365  new_path=`$CYGPATH -u "$path"`
25366
25367  # Now try to locate executable using which
25368  new_path=`$WHICH "$new_path" 2> /dev/null`
25369  # bat and cmd files are not always considered executable in cygwin causing which
25370  # to not find them
25371  if test "x$new_path" = x \
25372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25374    new_path=`$CYGPATH -u "$path"`
25375  fi
25376  if test "x$new_path" = x; then
25377    # Oops. Which didn't find the executable.
25378    # The splitting of arguments from the executable at a space might have been incorrect,
25379    # since paths with space are more likely in Windows. Give it another try with the whole
25380    # argument.
25381    path="$complete"
25382    arguments="EOL"
25383    new_path=`$CYGPATH -u "$path"`
25384    new_path=`$WHICH "$new_path" 2> /dev/null`
25385    # bat and cmd files are not always considered executable in cygwin causing which
25386    # to not find them
25387    if test "x$new_path" = x \
25388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25390      new_path=`$CYGPATH -u "$path"`
25391    fi
25392    if test "x$new_path" = x; then
25393      # It's still not found. Now this is an unrecoverable error.
25394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25395$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25396      has_space=`$ECHO "$complete" | $GREP " "`
25397      if test "x$has_space" != x; then
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25400      fi
25401      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25402    fi
25403  fi
25404
25405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25408  # "foo.exe" is OK but "foo" is an error.
25409  #
25410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25411  # It is also a way to make sure we got the proper file name for the real test later on.
25412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25413  if test "x$test_shortpath" = x; then
25414    # Short path failed, file does not exist as specified.
25415    # Try adding .exe or .cmd
25416    if test -f "${new_path}.exe"; then
25417      input_to_shortpath="${new_path}.exe"
25418    elif test -f "${new_path}.cmd"; then
25419      input_to_shortpath="${new_path}.cmd"
25420    else
25421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25422$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25425      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25426    fi
25427  else
25428    input_to_shortpath="$new_path"
25429  fi
25430
25431  # Call helper function which possibly converts this using DOS-style short mode.
25432  # If so, the updated path is stored in $new_path.
25433  new_path="$input_to_shortpath"
25434
25435  input_path="$input_to_shortpath"
25436  # Check if we need to convert this using DOS-style short mode. If the path
25437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25438  # take no chances and rewrite it.
25439  # Note: m4 eats our [], so we need to use [ and ] instead.
25440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25441  if test "x$has_forbidden_chars" != x; then
25442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25446      # Going to short mode and back again did indeed matter. Since short mode is
25447      # case insensitive, let's make it lowercase to improve readability.
25448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25449      # Now convert it back to Unix-stile (cygpath)
25450      input_path=`$CYGPATH -u "$shortmode_path"`
25451      new_path="$input_path"
25452    fi
25453  fi
25454
25455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25456  if test "x$test_cygdrive_prefix" = x; then
25457    # As a simple fix, exclude /usr/bin since it's not a real path.
25458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25460      # a path prefixed by /cygdrive for fixpath to work.
25461      new_path="$CYGWIN_ROOT_PATH$input_path"
25462    fi
25463  fi
25464
25465  # remove trailing .exe if any
25466  new_path="${new_path/%.exe/}"
25467
25468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25469
25470  # First separate the path from the arguments. This will split at the first
25471  # space.
25472  complete="$AS"
25473  path="${complete%% *}"
25474  tmp="$complete EOL"
25475  arguments="${tmp#* }"
25476
25477  # Input might be given as Windows format, start by converting to
25478  # unix format.
25479  new_path="$path"
25480
25481  windows_path="$new_path"
25482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25483    unix_path=`$CYGPATH -u "$windows_path"`
25484    new_path="$unix_path"
25485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25487    new_path="$unix_path"
25488  fi
25489
25490
25491  # Now try to locate executable using which
25492  new_path=`$WHICH "$new_path" 2> /dev/null`
25493
25494  if test "x$new_path" = x; then
25495    # Oops. Which didn't find the executable.
25496    # The splitting of arguments from the executable at a space might have been incorrect,
25497    # since paths with space are more likely in Windows. Give it another try with the whole
25498    # argument.
25499    path="$complete"
25500    arguments="EOL"
25501    new_path="$path"
25502
25503  windows_path="$new_path"
25504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25505    unix_path=`$CYGPATH -u "$windows_path"`
25506    new_path="$unix_path"
25507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25509    new_path="$unix_path"
25510  fi
25511
25512
25513    new_path=`$WHICH "$new_path" 2> /dev/null`
25514
25515    if test "x$new_path" = x; then
25516      # It's still not found. Now this is an unrecoverable error.
25517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25518$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25519      has_space=`$ECHO "$complete" | $GREP " "`
25520      if test "x$has_space" != x; then
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25523      fi
25524      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25525    fi
25526  fi
25527
25528  # Now new_path has a complete unix path to the binary
25529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25530    # Keep paths in /bin as-is, but remove trailing .exe if any
25531    new_path="${new_path/%.exe/}"
25532    # Do not save /bin paths to all_fixpath_prefixes!
25533  else
25534    # Not in mixed or Windows style, start by that.
25535    new_path=`cmd //c echo $new_path`
25536
25537  input_path="$new_path"
25538  # Check if we need to convert this using DOS-style short mode. If the path
25539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25540  # take no chances and rewrite it.
25541  # Note: m4 eats our [], so we need to use [ and ] instead.
25542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25543  if test "x$has_forbidden_chars" != x; then
25544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25546  fi
25547
25548    # Output is in $new_path
25549
25550  windows_path="$new_path"
25551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25552    unix_path=`$CYGPATH -u "$windows_path"`
25553    new_path="$unix_path"
25554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25556    new_path="$unix_path"
25557  fi
25558
25559    # remove trailing .exe if any
25560    new_path="${new_path/%.exe/}"
25561
25562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25564  fi
25565
25566  else
25567    # We're on a posix platform. Hooray! :)
25568    # First separate the path from the arguments. This will split at the first
25569    # space.
25570    complete="$AS"
25571    path="${complete%% *}"
25572    tmp="$complete EOL"
25573    arguments="${tmp#* }"
25574
25575    # Cannot rely on the command "which" here since it doesn't always work.
25576    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25577    if test -z "$is_absolute_path"; then
25578      # Path to executable is not absolute. Find it.
25579      IFS_save="$IFS"
25580      IFS=:
25581      for p in $PATH; do
25582        if test -f "$p/$path" && test -x "$p/$path"; then
25583          new_path="$p/$path"
25584          break
25585        fi
25586      done
25587      IFS="$IFS_save"
25588    else
25589      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25590$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25591      new_path="$path"
25592    fi
25593
25594    if test "x$new_path" = x; then
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25596$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25597      has_space=`$ECHO "$complete" | $GREP " "`
25598      if test "x$has_space" != x; then
25599        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25601      fi
25602      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25603    fi
25604  fi
25605
25606  # Now join together the path and the arguments once again
25607  if test "x$arguments" != xEOL; then
25608    new_complete="$new_path ${arguments% *}"
25609  else
25610    new_complete="$new_path"
25611  fi
25612
25613  if test "x$complete" != "x$new_complete"; then
25614    AS="$new_complete"
25615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25616$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25617  fi
25618
25619  else
25620    AS="$CC -c"
25621  fi
25622
25623
25624  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25625    # Extract the first word of "nm", so it can be a program name with args.
25626set dummy nm; ac_word=$2
25627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25628$as_echo_n "checking for $ac_word... " >&6; }
25629if ${ac_cv_path_NM+:} false; then :
25630  $as_echo_n "(cached) " >&6
25631else
25632  case $NM in
25633  [\\/]* | ?:[\\/]*)
25634  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25635  ;;
25636  *)
25637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25638for as_dir in $PATH
25639do
25640  IFS=$as_save_IFS
25641  test -z "$as_dir" && as_dir=.
25642    for ac_exec_ext in '' $ac_executable_extensions; do
25643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25644    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25646    break 2
25647  fi
25648done
25649  done
25650IFS=$as_save_IFS
25651
25652  ;;
25653esac
25654fi
25655NM=$ac_cv_path_NM
25656if test -n "$NM"; then
25657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25658$as_echo "$NM" >&6; }
25659else
25660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25661$as_echo "no" >&6; }
25662fi
25663
25664
25665
25666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25667
25668  # First separate the path from the arguments. This will split at the first
25669  # space.
25670  complete="$NM"
25671  path="${complete%% *}"
25672  tmp="$complete EOL"
25673  arguments="${tmp#* }"
25674
25675  # Input might be given as Windows format, start by converting to
25676  # unix format.
25677  new_path=`$CYGPATH -u "$path"`
25678
25679  # Now try to locate executable using which
25680  new_path=`$WHICH "$new_path" 2> /dev/null`
25681  # bat and cmd files are not always considered executable in cygwin causing which
25682  # to not find them
25683  if test "x$new_path" = x \
25684      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25685      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25686    new_path=`$CYGPATH -u "$path"`
25687  fi
25688  if test "x$new_path" = x; then
25689    # Oops. Which didn't find the executable.
25690    # The splitting of arguments from the executable at a space might have been incorrect,
25691    # since paths with space are more likely in Windows. Give it another try with the whole
25692    # argument.
25693    path="$complete"
25694    arguments="EOL"
25695    new_path=`$CYGPATH -u "$path"`
25696    new_path=`$WHICH "$new_path" 2> /dev/null`
25697    # bat and cmd files are not always considered executable in cygwin causing which
25698    # to not find them
25699    if test "x$new_path" = x \
25700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25702      new_path=`$CYGPATH -u "$path"`
25703    fi
25704    if test "x$new_path" = x; then
25705      # It's still not found. Now this is an unrecoverable error.
25706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25707$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25708      has_space=`$ECHO "$complete" | $GREP " "`
25709      if test "x$has_space" != x; then
25710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25712      fi
25713      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25714    fi
25715  fi
25716
25717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25720  # "foo.exe" is OK but "foo" is an error.
25721  #
25722  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25723  # It is also a way to make sure we got the proper file name for the real test later on.
25724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25725  if test "x$test_shortpath" = x; then
25726    # Short path failed, file does not exist as specified.
25727    # Try adding .exe or .cmd
25728    if test -f "${new_path}.exe"; then
25729      input_to_shortpath="${new_path}.exe"
25730    elif test -f "${new_path}.cmd"; then
25731      input_to_shortpath="${new_path}.cmd"
25732    else
25733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25734$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25737      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25738    fi
25739  else
25740    input_to_shortpath="$new_path"
25741  fi
25742
25743  # Call helper function which possibly converts this using DOS-style short mode.
25744  # If so, the updated path is stored in $new_path.
25745  new_path="$input_to_shortpath"
25746
25747  input_path="$input_to_shortpath"
25748  # Check if we need to convert this using DOS-style short mode. If the path
25749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25750  # take no chances and rewrite it.
25751  # Note: m4 eats our [], so we need to use [ and ] instead.
25752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25753  if test "x$has_forbidden_chars" != x; then
25754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25758      # Going to short mode and back again did indeed matter. Since short mode is
25759      # case insensitive, let's make it lowercase to improve readability.
25760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25761      # Now convert it back to Unix-stile (cygpath)
25762      input_path=`$CYGPATH -u "$shortmode_path"`
25763      new_path="$input_path"
25764    fi
25765  fi
25766
25767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25768  if test "x$test_cygdrive_prefix" = x; then
25769    # As a simple fix, exclude /usr/bin since it's not a real path.
25770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25772      # a path prefixed by /cygdrive for fixpath to work.
25773      new_path="$CYGWIN_ROOT_PATH$input_path"
25774    fi
25775  fi
25776
25777  # remove trailing .exe if any
25778  new_path="${new_path/%.exe/}"
25779
25780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25781
25782  # First separate the path from the arguments. This will split at the first
25783  # space.
25784  complete="$NM"
25785  path="${complete%% *}"
25786  tmp="$complete EOL"
25787  arguments="${tmp#* }"
25788
25789  # Input might be given as Windows format, start by converting to
25790  # unix format.
25791  new_path="$path"
25792
25793  windows_path="$new_path"
25794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25795    unix_path=`$CYGPATH -u "$windows_path"`
25796    new_path="$unix_path"
25797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25799    new_path="$unix_path"
25800  fi
25801
25802
25803  # Now try to locate executable using which
25804  new_path=`$WHICH "$new_path" 2> /dev/null`
25805
25806  if test "x$new_path" = x; then
25807    # Oops. Which didn't find the executable.
25808    # The splitting of arguments from the executable at a space might have been incorrect,
25809    # since paths with space are more likely in Windows. Give it another try with the whole
25810    # argument.
25811    path="$complete"
25812    arguments="EOL"
25813    new_path="$path"
25814
25815  windows_path="$new_path"
25816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25817    unix_path=`$CYGPATH -u "$windows_path"`
25818    new_path="$unix_path"
25819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25821    new_path="$unix_path"
25822  fi
25823
25824
25825    new_path=`$WHICH "$new_path" 2> /dev/null`
25826
25827    if test "x$new_path" = x; then
25828      # It's still not found. Now this is an unrecoverable error.
25829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25830$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25831      has_space=`$ECHO "$complete" | $GREP " "`
25832      if test "x$has_space" != x; then
25833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25835      fi
25836      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25837    fi
25838  fi
25839
25840  # Now new_path has a complete unix path to the binary
25841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25842    # Keep paths in /bin as-is, but remove trailing .exe if any
25843    new_path="${new_path/%.exe/}"
25844    # Do not save /bin paths to all_fixpath_prefixes!
25845  else
25846    # Not in mixed or Windows style, start by that.
25847    new_path=`cmd //c echo $new_path`
25848
25849  input_path="$new_path"
25850  # Check if we need to convert this using DOS-style short mode. If the path
25851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25852  # take no chances and rewrite it.
25853  # Note: m4 eats our [], so we need to use [ and ] instead.
25854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25855  if test "x$has_forbidden_chars" != x; then
25856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25858  fi
25859
25860    # Output is in $new_path
25861
25862  windows_path="$new_path"
25863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25864    unix_path=`$CYGPATH -u "$windows_path"`
25865    new_path="$unix_path"
25866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25868    new_path="$unix_path"
25869  fi
25870
25871    # remove trailing .exe if any
25872    new_path="${new_path/%.exe/}"
25873
25874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25876  fi
25877
25878  else
25879    # We're on a posix platform. Hooray! :)
25880    # First separate the path from the arguments. This will split at the first
25881    # space.
25882    complete="$NM"
25883    path="${complete%% *}"
25884    tmp="$complete EOL"
25885    arguments="${tmp#* }"
25886
25887    # Cannot rely on the command "which" here since it doesn't always work.
25888    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25889    if test -z "$is_absolute_path"; then
25890      # Path to executable is not absolute. Find it.
25891      IFS_save="$IFS"
25892      IFS=:
25893      for p in $PATH; do
25894        if test -f "$p/$path" && test -x "$p/$path"; then
25895          new_path="$p/$path"
25896          break
25897        fi
25898      done
25899      IFS="$IFS_save"
25900    else
25901      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25902$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25903      new_path="$path"
25904    fi
25905
25906    if test "x$new_path" = x; then
25907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25908$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25909      has_space=`$ECHO "$complete" | $GREP " "`
25910      if test "x$has_space" != x; then
25911        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25913      fi
25914      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25915    fi
25916  fi
25917
25918  # Now join together the path and the arguments once again
25919  if test "x$arguments" != xEOL; then
25920    new_complete="$new_path ${arguments% *}"
25921  else
25922    new_complete="$new_path"
25923  fi
25924
25925  if test "x$complete" != "x$new_complete"; then
25926    NM="$new_complete"
25927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25928$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25929  fi
25930
25931    # Extract the first word of "gnm", so it can be a program name with args.
25932set dummy gnm; ac_word=$2
25933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25934$as_echo_n "checking for $ac_word... " >&6; }
25935if ${ac_cv_path_GNM+:} false; then :
25936  $as_echo_n "(cached) " >&6
25937else
25938  case $GNM in
25939  [\\/]* | ?:[\\/]*)
25940  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25941  ;;
25942  *)
25943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25944for as_dir in $PATH
25945do
25946  IFS=$as_save_IFS
25947  test -z "$as_dir" && as_dir=.
25948    for ac_exec_ext in '' $ac_executable_extensions; do
25949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25950    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25952    break 2
25953  fi
25954done
25955  done
25956IFS=$as_save_IFS
25957
25958  ;;
25959esac
25960fi
25961GNM=$ac_cv_path_GNM
25962if test -n "$GNM"; then
25963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25964$as_echo "$GNM" >&6; }
25965else
25966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25967$as_echo "no" >&6; }
25968fi
25969
25970
25971
25972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25973
25974  # First separate the path from the arguments. This will split at the first
25975  # space.
25976  complete="$GNM"
25977  path="${complete%% *}"
25978  tmp="$complete EOL"
25979  arguments="${tmp#* }"
25980
25981  # Input might be given as Windows format, start by converting to
25982  # unix format.
25983  new_path=`$CYGPATH -u "$path"`
25984
25985  # Now try to locate executable using which
25986  new_path=`$WHICH "$new_path" 2> /dev/null`
25987  # bat and cmd files are not always considered executable in cygwin causing which
25988  # to not find them
25989  if test "x$new_path" = x \
25990      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25991      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25992    new_path=`$CYGPATH -u "$path"`
25993  fi
25994  if test "x$new_path" = x; then
25995    # Oops. Which didn't find the executable.
25996    # The splitting of arguments from the executable at a space might have been incorrect,
25997    # since paths with space are more likely in Windows. Give it another try with the whole
25998    # argument.
25999    path="$complete"
26000    arguments="EOL"
26001    new_path=`$CYGPATH -u "$path"`
26002    new_path=`$WHICH "$new_path" 2> /dev/null`
26003    # bat and cmd files are not always considered executable in cygwin causing which
26004    # to not find them
26005    if test "x$new_path" = x \
26006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26008      new_path=`$CYGPATH -u "$path"`
26009    fi
26010    if test "x$new_path" = x; then
26011      # It's still not found. Now this is an unrecoverable error.
26012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26013$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26014      has_space=`$ECHO "$complete" | $GREP " "`
26015      if test "x$has_space" != x; then
26016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26018      fi
26019      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26020    fi
26021  fi
26022
26023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26026  # "foo.exe" is OK but "foo" is an error.
26027  #
26028  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26029  # It is also a way to make sure we got the proper file name for the real test later on.
26030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26031  if test "x$test_shortpath" = x; then
26032    # Short path failed, file does not exist as specified.
26033    # Try adding .exe or .cmd
26034    if test -f "${new_path}.exe"; then
26035      input_to_shortpath="${new_path}.exe"
26036    elif test -f "${new_path}.cmd"; then
26037      input_to_shortpath="${new_path}.cmd"
26038    else
26039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26040$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26041      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26042$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26043      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26044    fi
26045  else
26046    input_to_shortpath="$new_path"
26047  fi
26048
26049  # Call helper function which possibly converts this using DOS-style short mode.
26050  # If so, the updated path is stored in $new_path.
26051  new_path="$input_to_shortpath"
26052
26053  input_path="$input_to_shortpath"
26054  # Check if we need to convert this using DOS-style short mode. If the path
26055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26056  # take no chances and rewrite it.
26057  # Note: m4 eats our [], so we need to use [ and ] instead.
26058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26059  if test "x$has_forbidden_chars" != x; then
26060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26064      # Going to short mode and back again did indeed matter. Since short mode is
26065      # case insensitive, let's make it lowercase to improve readability.
26066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26067      # Now convert it back to Unix-stile (cygpath)
26068      input_path=`$CYGPATH -u "$shortmode_path"`
26069      new_path="$input_path"
26070    fi
26071  fi
26072
26073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26074  if test "x$test_cygdrive_prefix" = x; then
26075    # As a simple fix, exclude /usr/bin since it's not a real path.
26076    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26078      # a path prefixed by /cygdrive for fixpath to work.
26079      new_path="$CYGWIN_ROOT_PATH$input_path"
26080    fi
26081  fi
26082
26083  # remove trailing .exe if any
26084  new_path="${new_path/%.exe/}"
26085
26086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26087
26088  # First separate the path from the arguments. This will split at the first
26089  # space.
26090  complete="$GNM"
26091  path="${complete%% *}"
26092  tmp="$complete EOL"
26093  arguments="${tmp#* }"
26094
26095  # Input might be given as Windows format, start by converting to
26096  # unix format.
26097  new_path="$path"
26098
26099  windows_path="$new_path"
26100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26101    unix_path=`$CYGPATH -u "$windows_path"`
26102    new_path="$unix_path"
26103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26105    new_path="$unix_path"
26106  fi
26107
26108
26109  # Now try to locate executable using which
26110  new_path=`$WHICH "$new_path" 2> /dev/null`
26111
26112  if test "x$new_path" = x; then
26113    # Oops. Which didn't find the executable.
26114    # The splitting of arguments from the executable at a space might have been incorrect,
26115    # since paths with space are more likely in Windows. Give it another try with the whole
26116    # argument.
26117    path="$complete"
26118    arguments="EOL"
26119    new_path="$path"
26120
26121  windows_path="$new_path"
26122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26123    unix_path=`$CYGPATH -u "$windows_path"`
26124    new_path="$unix_path"
26125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26127    new_path="$unix_path"
26128  fi
26129
26130
26131    new_path=`$WHICH "$new_path" 2> /dev/null`
26132
26133    if test "x$new_path" = x; then
26134      # It's still not found. Now this is an unrecoverable error.
26135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26136$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26137      has_space=`$ECHO "$complete" | $GREP " "`
26138      if test "x$has_space" != x; then
26139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26141      fi
26142      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26143    fi
26144  fi
26145
26146  # Now new_path has a complete unix path to the binary
26147  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26148    # Keep paths in /bin as-is, but remove trailing .exe if any
26149    new_path="${new_path/%.exe/}"
26150    # Do not save /bin paths to all_fixpath_prefixes!
26151  else
26152    # Not in mixed or Windows style, start by that.
26153    new_path=`cmd //c echo $new_path`
26154
26155  input_path="$new_path"
26156  # Check if we need to convert this using DOS-style short mode. If the path
26157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26158  # take no chances and rewrite it.
26159  # Note: m4 eats our [], so we need to use [ and ] instead.
26160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26161  if test "x$has_forbidden_chars" != x; then
26162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26164  fi
26165
26166    # Output is in $new_path
26167
26168  windows_path="$new_path"
26169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26170    unix_path=`$CYGPATH -u "$windows_path"`
26171    new_path="$unix_path"
26172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26174    new_path="$unix_path"
26175  fi
26176
26177    # remove trailing .exe if any
26178    new_path="${new_path/%.exe/}"
26179
26180    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26181    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26182  fi
26183
26184  else
26185    # We're on a posix platform. Hooray! :)
26186    # First separate the path from the arguments. This will split at the first
26187    # space.
26188    complete="$GNM"
26189    path="${complete%% *}"
26190    tmp="$complete EOL"
26191    arguments="${tmp#* }"
26192
26193    # Cannot rely on the command "which" here since it doesn't always work.
26194    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26195    if test -z "$is_absolute_path"; then
26196      # Path to executable is not absolute. Find it.
26197      IFS_save="$IFS"
26198      IFS=:
26199      for p in $PATH; do
26200        if test -f "$p/$path" && test -x "$p/$path"; then
26201          new_path="$p/$path"
26202          break
26203        fi
26204      done
26205      IFS="$IFS_save"
26206    else
26207      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26208$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26209      new_path="$path"
26210    fi
26211
26212    if test "x$new_path" = x; then
26213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26214$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26215      has_space=`$ECHO "$complete" | $GREP " "`
26216      if test "x$has_space" != x; then
26217        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26219      fi
26220      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26221    fi
26222  fi
26223
26224  # Now join together the path and the arguments once again
26225  if test "x$arguments" != xEOL; then
26226    new_complete="$new_path ${arguments% *}"
26227  else
26228    new_complete="$new_path"
26229  fi
26230
26231  if test "x$complete" != "x$new_complete"; then
26232    GNM="$new_complete"
26233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26234$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26235  fi
26236
26237    # Extract the first word of "strip", so it can be a program name with args.
26238set dummy strip; ac_word=$2
26239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26240$as_echo_n "checking for $ac_word... " >&6; }
26241if ${ac_cv_path_STRIP+:} false; then :
26242  $as_echo_n "(cached) " >&6
26243else
26244  case $STRIP in
26245  [\\/]* | ?:[\\/]*)
26246  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26247  ;;
26248  *)
26249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26250for as_dir in $PATH
26251do
26252  IFS=$as_save_IFS
26253  test -z "$as_dir" && as_dir=.
26254    for ac_exec_ext in '' $ac_executable_extensions; do
26255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26256    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26258    break 2
26259  fi
26260done
26261  done
26262IFS=$as_save_IFS
26263
26264  ;;
26265esac
26266fi
26267STRIP=$ac_cv_path_STRIP
26268if test -n "$STRIP"; then
26269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26270$as_echo "$STRIP" >&6; }
26271else
26272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26273$as_echo "no" >&6; }
26274fi
26275
26276
26277
26278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26279
26280  # First separate the path from the arguments. This will split at the first
26281  # space.
26282  complete="$STRIP"
26283  path="${complete%% *}"
26284  tmp="$complete EOL"
26285  arguments="${tmp#* }"
26286
26287  # Input might be given as Windows format, start by converting to
26288  # unix format.
26289  new_path=`$CYGPATH -u "$path"`
26290
26291  # Now try to locate executable using which
26292  new_path=`$WHICH "$new_path" 2> /dev/null`
26293  # bat and cmd files are not always considered executable in cygwin causing which
26294  # to not find them
26295  if test "x$new_path" = x \
26296      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26297      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26298    new_path=`$CYGPATH -u "$path"`
26299  fi
26300  if test "x$new_path" = x; then
26301    # Oops. Which didn't find the executable.
26302    # The splitting of arguments from the executable at a space might have been incorrect,
26303    # since paths with space are more likely in Windows. Give it another try with the whole
26304    # argument.
26305    path="$complete"
26306    arguments="EOL"
26307    new_path=`$CYGPATH -u "$path"`
26308    new_path=`$WHICH "$new_path" 2> /dev/null`
26309    # bat and cmd files are not always considered executable in cygwin causing which
26310    # to not find them
26311    if test "x$new_path" = x \
26312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26314      new_path=`$CYGPATH -u "$path"`
26315    fi
26316    if test "x$new_path" = x; then
26317      # It's still not found. Now this is an unrecoverable error.
26318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26319$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26320      has_space=`$ECHO "$complete" | $GREP " "`
26321      if test "x$has_space" != x; then
26322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26324      fi
26325      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26326    fi
26327  fi
26328
26329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26332  # "foo.exe" is OK but "foo" is an error.
26333  #
26334  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26335  # It is also a way to make sure we got the proper file name for the real test later on.
26336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26337  if test "x$test_shortpath" = x; then
26338    # Short path failed, file does not exist as specified.
26339    # Try adding .exe or .cmd
26340    if test -f "${new_path}.exe"; then
26341      input_to_shortpath="${new_path}.exe"
26342    elif test -f "${new_path}.cmd"; then
26343      input_to_shortpath="${new_path}.cmd"
26344    else
26345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26346$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26349      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26350    fi
26351  else
26352    input_to_shortpath="$new_path"
26353  fi
26354
26355  # Call helper function which possibly converts this using DOS-style short mode.
26356  # If so, the updated path is stored in $new_path.
26357  new_path="$input_to_shortpath"
26358
26359  input_path="$input_to_shortpath"
26360  # Check if we need to convert this using DOS-style short mode. If the path
26361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26362  # take no chances and rewrite it.
26363  # Note: m4 eats our [], so we need to use [ and ] instead.
26364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26365  if test "x$has_forbidden_chars" != x; then
26366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26370      # Going to short mode and back again did indeed matter. Since short mode is
26371      # case insensitive, let's make it lowercase to improve readability.
26372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26373      # Now convert it back to Unix-stile (cygpath)
26374      input_path=`$CYGPATH -u "$shortmode_path"`
26375      new_path="$input_path"
26376    fi
26377  fi
26378
26379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26380  if test "x$test_cygdrive_prefix" = x; then
26381    # As a simple fix, exclude /usr/bin since it's not a real path.
26382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26384      # a path prefixed by /cygdrive for fixpath to work.
26385      new_path="$CYGWIN_ROOT_PATH$input_path"
26386    fi
26387  fi
26388
26389  # remove trailing .exe if any
26390  new_path="${new_path/%.exe/}"
26391
26392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26393
26394  # First separate the path from the arguments. This will split at the first
26395  # space.
26396  complete="$STRIP"
26397  path="${complete%% *}"
26398  tmp="$complete EOL"
26399  arguments="${tmp#* }"
26400
26401  # Input might be given as Windows format, start by converting to
26402  # unix format.
26403  new_path="$path"
26404
26405  windows_path="$new_path"
26406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26407    unix_path=`$CYGPATH -u "$windows_path"`
26408    new_path="$unix_path"
26409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26411    new_path="$unix_path"
26412  fi
26413
26414
26415  # Now try to locate executable using which
26416  new_path=`$WHICH "$new_path" 2> /dev/null`
26417
26418  if test "x$new_path" = x; then
26419    # Oops. Which didn't find the executable.
26420    # The splitting of arguments from the executable at a space might have been incorrect,
26421    # since paths with space are more likely in Windows. Give it another try with the whole
26422    # argument.
26423    path="$complete"
26424    arguments="EOL"
26425    new_path="$path"
26426
26427  windows_path="$new_path"
26428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26429    unix_path=`$CYGPATH -u "$windows_path"`
26430    new_path="$unix_path"
26431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26433    new_path="$unix_path"
26434  fi
26435
26436
26437    new_path=`$WHICH "$new_path" 2> /dev/null`
26438
26439    if test "x$new_path" = x; then
26440      # It's still not found. Now this is an unrecoverable error.
26441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26442$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26443      has_space=`$ECHO "$complete" | $GREP " "`
26444      if test "x$has_space" != x; then
26445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26447      fi
26448      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26449    fi
26450  fi
26451
26452  # Now new_path has a complete unix path to the binary
26453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26454    # Keep paths in /bin as-is, but remove trailing .exe if any
26455    new_path="${new_path/%.exe/}"
26456    # Do not save /bin paths to all_fixpath_prefixes!
26457  else
26458    # Not in mixed or Windows style, start by that.
26459    new_path=`cmd //c echo $new_path`
26460
26461  input_path="$new_path"
26462  # Check if we need to convert this using DOS-style short mode. If the path
26463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26464  # take no chances and rewrite it.
26465  # Note: m4 eats our [], so we need to use [ and ] instead.
26466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26467  if test "x$has_forbidden_chars" != x; then
26468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26470  fi
26471
26472    # Output is in $new_path
26473
26474  windows_path="$new_path"
26475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26476    unix_path=`$CYGPATH -u "$windows_path"`
26477    new_path="$unix_path"
26478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26480    new_path="$unix_path"
26481  fi
26482
26483    # remove trailing .exe if any
26484    new_path="${new_path/%.exe/}"
26485
26486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26488  fi
26489
26490  else
26491    # We're on a posix platform. Hooray! :)
26492    # First separate the path from the arguments. This will split at the first
26493    # space.
26494    complete="$STRIP"
26495    path="${complete%% *}"
26496    tmp="$complete EOL"
26497    arguments="${tmp#* }"
26498
26499    # Cannot rely on the command "which" here since it doesn't always work.
26500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26501    if test -z "$is_absolute_path"; then
26502      # Path to executable is not absolute. Find it.
26503      IFS_save="$IFS"
26504      IFS=:
26505      for p in $PATH; do
26506        if test -f "$p/$path" && test -x "$p/$path"; then
26507          new_path="$p/$path"
26508          break
26509        fi
26510      done
26511      IFS="$IFS_save"
26512    else
26513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26514$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26515      new_path="$path"
26516    fi
26517
26518    if test "x$new_path" = x; then
26519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26520$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26521      has_space=`$ECHO "$complete" | $GREP " "`
26522      if test "x$has_space" != x; then
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26525      fi
26526      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26527    fi
26528  fi
26529
26530  # Now join together the path and the arguments once again
26531  if test "x$arguments" != xEOL; then
26532    new_complete="$new_path ${arguments% *}"
26533  else
26534    new_complete="$new_path"
26535  fi
26536
26537  if test "x$complete" != "x$new_complete"; then
26538    STRIP="$new_complete"
26539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26540$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26541  fi
26542
26543    # Extract the first word of "mcs", so it can be a program name with args.
26544set dummy mcs; ac_word=$2
26545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26546$as_echo_n "checking for $ac_word... " >&6; }
26547if ${ac_cv_path_MCS+:} false; then :
26548  $as_echo_n "(cached) " >&6
26549else
26550  case $MCS in
26551  [\\/]* | ?:[\\/]*)
26552  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26553  ;;
26554  *)
26555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26556for as_dir in $PATH
26557do
26558  IFS=$as_save_IFS
26559  test -z "$as_dir" && as_dir=.
26560    for ac_exec_ext in '' $ac_executable_extensions; do
26561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26562    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26564    break 2
26565  fi
26566done
26567  done
26568IFS=$as_save_IFS
26569
26570  ;;
26571esac
26572fi
26573MCS=$ac_cv_path_MCS
26574if test -n "$MCS"; then
26575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26576$as_echo "$MCS" >&6; }
26577else
26578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26579$as_echo "no" >&6; }
26580fi
26581
26582
26583
26584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26585
26586  # First separate the path from the arguments. This will split at the first
26587  # space.
26588  complete="$MCS"
26589  path="${complete%% *}"
26590  tmp="$complete EOL"
26591  arguments="${tmp#* }"
26592
26593  # Input might be given as Windows format, start by converting to
26594  # unix format.
26595  new_path=`$CYGPATH -u "$path"`
26596
26597  # Now try to locate executable using which
26598  new_path=`$WHICH "$new_path" 2> /dev/null`
26599  # bat and cmd files are not always considered executable in cygwin causing which
26600  # to not find them
26601  if test "x$new_path" = x \
26602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26604    new_path=`$CYGPATH -u "$path"`
26605  fi
26606  if test "x$new_path" = x; then
26607    # Oops. Which didn't find the executable.
26608    # The splitting of arguments from the executable at a space might have been incorrect,
26609    # since paths with space are more likely in Windows. Give it another try with the whole
26610    # argument.
26611    path="$complete"
26612    arguments="EOL"
26613    new_path=`$CYGPATH -u "$path"`
26614    new_path=`$WHICH "$new_path" 2> /dev/null`
26615    # bat and cmd files are not always considered executable in cygwin causing which
26616    # to not find them
26617    if test "x$new_path" = x \
26618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26620      new_path=`$CYGPATH -u "$path"`
26621    fi
26622    if test "x$new_path" = x; then
26623      # It's still not found. Now this is an unrecoverable error.
26624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26625$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26626      has_space=`$ECHO "$complete" | $GREP " "`
26627      if test "x$has_space" != x; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26630      fi
26631      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26632    fi
26633  fi
26634
26635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26638  # "foo.exe" is OK but "foo" is an error.
26639  #
26640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26641  # It is also a way to make sure we got the proper file name for the real test later on.
26642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26643  if test "x$test_shortpath" = x; then
26644    # Short path failed, file does not exist as specified.
26645    # Try adding .exe or .cmd
26646    if test -f "${new_path}.exe"; then
26647      input_to_shortpath="${new_path}.exe"
26648    elif test -f "${new_path}.cmd"; then
26649      input_to_shortpath="${new_path}.cmd"
26650    else
26651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26652$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26655      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26656    fi
26657  else
26658    input_to_shortpath="$new_path"
26659  fi
26660
26661  # Call helper function which possibly converts this using DOS-style short mode.
26662  # If so, the updated path is stored in $new_path.
26663  new_path="$input_to_shortpath"
26664
26665  input_path="$input_to_shortpath"
26666  # Check if we need to convert this using DOS-style short mode. If the path
26667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26668  # take no chances and rewrite it.
26669  # Note: m4 eats our [], so we need to use [ and ] instead.
26670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26671  if test "x$has_forbidden_chars" != x; then
26672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26676      # Going to short mode and back again did indeed matter. Since short mode is
26677      # case insensitive, let's make it lowercase to improve readability.
26678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26679      # Now convert it back to Unix-stile (cygpath)
26680      input_path=`$CYGPATH -u "$shortmode_path"`
26681      new_path="$input_path"
26682    fi
26683  fi
26684
26685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26686  if test "x$test_cygdrive_prefix" = x; then
26687    # As a simple fix, exclude /usr/bin since it's not a real path.
26688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26690      # a path prefixed by /cygdrive for fixpath to work.
26691      new_path="$CYGWIN_ROOT_PATH$input_path"
26692    fi
26693  fi
26694
26695  # remove trailing .exe if any
26696  new_path="${new_path/%.exe/}"
26697
26698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26699
26700  # First separate the path from the arguments. This will split at the first
26701  # space.
26702  complete="$MCS"
26703  path="${complete%% *}"
26704  tmp="$complete EOL"
26705  arguments="${tmp#* }"
26706
26707  # Input might be given as Windows format, start by converting to
26708  # unix format.
26709  new_path="$path"
26710
26711  windows_path="$new_path"
26712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26713    unix_path=`$CYGPATH -u "$windows_path"`
26714    new_path="$unix_path"
26715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26717    new_path="$unix_path"
26718  fi
26719
26720
26721  # Now try to locate executable using which
26722  new_path=`$WHICH "$new_path" 2> /dev/null`
26723
26724  if test "x$new_path" = x; then
26725    # Oops. Which didn't find the executable.
26726    # The splitting of arguments from the executable at a space might have been incorrect,
26727    # since paths with space are more likely in Windows. Give it another try with the whole
26728    # argument.
26729    path="$complete"
26730    arguments="EOL"
26731    new_path="$path"
26732
26733  windows_path="$new_path"
26734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735    unix_path=`$CYGPATH -u "$windows_path"`
26736    new_path="$unix_path"
26737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26739    new_path="$unix_path"
26740  fi
26741
26742
26743    new_path=`$WHICH "$new_path" 2> /dev/null`
26744
26745    if test "x$new_path" = x; then
26746      # It's still not found. Now this is an unrecoverable error.
26747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26748$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26749      has_space=`$ECHO "$complete" | $GREP " "`
26750      if test "x$has_space" != x; then
26751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26753      fi
26754      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26755    fi
26756  fi
26757
26758  # Now new_path has a complete unix path to the binary
26759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26760    # Keep paths in /bin as-is, but remove trailing .exe if any
26761    new_path="${new_path/%.exe/}"
26762    # Do not save /bin paths to all_fixpath_prefixes!
26763  else
26764    # Not in mixed or Windows style, start by that.
26765    new_path=`cmd //c echo $new_path`
26766
26767  input_path="$new_path"
26768  # Check if we need to convert this using DOS-style short mode. If the path
26769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26770  # take no chances and rewrite it.
26771  # Note: m4 eats our [], so we need to use [ and ] instead.
26772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26773  if test "x$has_forbidden_chars" != x; then
26774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26776  fi
26777
26778    # Output is in $new_path
26779
26780  windows_path="$new_path"
26781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26782    unix_path=`$CYGPATH -u "$windows_path"`
26783    new_path="$unix_path"
26784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26786    new_path="$unix_path"
26787  fi
26788
26789    # remove trailing .exe if any
26790    new_path="${new_path/%.exe/}"
26791
26792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26794  fi
26795
26796  else
26797    # We're on a posix platform. Hooray! :)
26798    # First separate the path from the arguments. This will split at the first
26799    # space.
26800    complete="$MCS"
26801    path="${complete%% *}"
26802    tmp="$complete EOL"
26803    arguments="${tmp#* }"
26804
26805    # Cannot rely on the command "which" here since it doesn't always work.
26806    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26807    if test -z "$is_absolute_path"; then
26808      # Path to executable is not absolute. Find it.
26809      IFS_save="$IFS"
26810      IFS=:
26811      for p in $PATH; do
26812        if test -f "$p/$path" && test -x "$p/$path"; then
26813          new_path="$p/$path"
26814          break
26815        fi
26816      done
26817      IFS="$IFS_save"
26818    else
26819      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26820$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26821      new_path="$path"
26822    fi
26823
26824    if test "x$new_path" = x; then
26825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26826$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26827      has_space=`$ECHO "$complete" | $GREP " "`
26828      if test "x$has_space" != x; then
26829        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26831      fi
26832      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26833    fi
26834  fi
26835
26836  # Now join together the path and the arguments once again
26837  if test "x$arguments" != xEOL; then
26838    new_complete="$new_path ${arguments% *}"
26839  else
26840    new_complete="$new_path"
26841  fi
26842
26843  if test "x$complete" != "x$new_complete"; then
26844    MCS="$new_complete"
26845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26846$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26847  fi
26848
26849  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26850    if test -n "$ac_tool_prefix"; then
26851  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26852set dummy ${ac_tool_prefix}nm; ac_word=$2
26853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26854$as_echo_n "checking for $ac_word... " >&6; }
26855if ${ac_cv_prog_NM+:} false; then :
26856  $as_echo_n "(cached) " >&6
26857else
26858  if test -n "$NM"; then
26859  ac_cv_prog_NM="$NM" # Let the user override the test.
26860else
26861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26862for as_dir in $PATH
26863do
26864  IFS=$as_save_IFS
26865  test -z "$as_dir" && as_dir=.
26866    for ac_exec_ext in '' $ac_executable_extensions; do
26867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26868    ac_cv_prog_NM="${ac_tool_prefix}nm"
26869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26870    break 2
26871  fi
26872done
26873  done
26874IFS=$as_save_IFS
26875
26876fi
26877fi
26878NM=$ac_cv_prog_NM
26879if test -n "$NM"; then
26880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26881$as_echo "$NM" >&6; }
26882else
26883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26884$as_echo "no" >&6; }
26885fi
26886
26887
26888fi
26889if test -z "$ac_cv_prog_NM"; then
26890  ac_ct_NM=$NM
26891  # Extract the first word of "nm", so it can be a program name with args.
26892set dummy nm; ac_word=$2
26893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26894$as_echo_n "checking for $ac_word... " >&6; }
26895if ${ac_cv_prog_ac_ct_NM+:} false; then :
26896  $as_echo_n "(cached) " >&6
26897else
26898  if test -n "$ac_ct_NM"; then
26899  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26900else
26901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26902for as_dir in $PATH
26903do
26904  IFS=$as_save_IFS
26905  test -z "$as_dir" && as_dir=.
26906    for ac_exec_ext in '' $ac_executable_extensions; do
26907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26908    ac_cv_prog_ac_ct_NM="nm"
26909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26910    break 2
26911  fi
26912done
26913  done
26914IFS=$as_save_IFS
26915
26916fi
26917fi
26918ac_ct_NM=$ac_cv_prog_ac_ct_NM
26919if test -n "$ac_ct_NM"; then
26920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26921$as_echo "$ac_ct_NM" >&6; }
26922else
26923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26924$as_echo "no" >&6; }
26925fi
26926
26927  if test "x$ac_ct_NM" = x; then
26928    NM=""
26929  else
26930    case $cross_compiling:$ac_tool_warned in
26931yes:)
26932{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26933$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26934ac_tool_warned=yes ;;
26935esac
26936    NM=$ac_ct_NM
26937  fi
26938else
26939  NM="$ac_cv_prog_NM"
26940fi
26941
26942
26943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26944
26945  # First separate the path from the arguments. This will split at the first
26946  # space.
26947  complete="$NM"
26948  path="${complete%% *}"
26949  tmp="$complete EOL"
26950  arguments="${tmp#* }"
26951
26952  # Input might be given as Windows format, start by converting to
26953  # unix format.
26954  new_path=`$CYGPATH -u "$path"`
26955
26956  # Now try to locate executable using which
26957  new_path=`$WHICH "$new_path" 2> /dev/null`
26958  # bat and cmd files are not always considered executable in cygwin causing which
26959  # to not find them
26960  if test "x$new_path" = x \
26961      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26962      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26963    new_path=`$CYGPATH -u "$path"`
26964  fi
26965  if test "x$new_path" = x; then
26966    # Oops. Which didn't find the executable.
26967    # The splitting of arguments from the executable at a space might have been incorrect,
26968    # since paths with space are more likely in Windows. Give it another try with the whole
26969    # argument.
26970    path="$complete"
26971    arguments="EOL"
26972    new_path=`$CYGPATH -u "$path"`
26973    new_path=`$WHICH "$new_path" 2> /dev/null`
26974    # bat and cmd files are not always considered executable in cygwin causing which
26975    # to not find them
26976    if test "x$new_path" = x \
26977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26979      new_path=`$CYGPATH -u "$path"`
26980    fi
26981    if test "x$new_path" = x; then
26982      # It's still not found. Now this is an unrecoverable error.
26983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26984$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26985      has_space=`$ECHO "$complete" | $GREP " "`
26986      if test "x$has_space" != x; then
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26989      fi
26990      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26991    fi
26992  fi
26993
26994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26997  # "foo.exe" is OK but "foo" is an error.
26998  #
26999  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27000  # It is also a way to make sure we got the proper file name for the real test later on.
27001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27002  if test "x$test_shortpath" = x; then
27003    # Short path failed, file does not exist as specified.
27004    # Try adding .exe or .cmd
27005    if test -f "${new_path}.exe"; then
27006      input_to_shortpath="${new_path}.exe"
27007    elif test -f "${new_path}.cmd"; then
27008      input_to_shortpath="${new_path}.cmd"
27009    else
27010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27011$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27012      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27013$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27014      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27015    fi
27016  else
27017    input_to_shortpath="$new_path"
27018  fi
27019
27020  # Call helper function which possibly converts this using DOS-style short mode.
27021  # If so, the updated path is stored in $new_path.
27022  new_path="$input_to_shortpath"
27023
27024  input_path="$input_to_shortpath"
27025  # Check if we need to convert this using DOS-style short mode. If the path
27026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27027  # take no chances and rewrite it.
27028  # Note: m4 eats our [], so we need to use [ and ] instead.
27029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27030  if test "x$has_forbidden_chars" != x; then
27031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27035      # Going to short mode and back again did indeed matter. Since short mode is
27036      # case insensitive, let's make it lowercase to improve readability.
27037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27038      # Now convert it back to Unix-stile (cygpath)
27039      input_path=`$CYGPATH -u "$shortmode_path"`
27040      new_path="$input_path"
27041    fi
27042  fi
27043
27044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27045  if test "x$test_cygdrive_prefix" = x; then
27046    # As a simple fix, exclude /usr/bin since it's not a real path.
27047    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27049      # a path prefixed by /cygdrive for fixpath to work.
27050      new_path="$CYGWIN_ROOT_PATH$input_path"
27051    fi
27052  fi
27053
27054  # remove trailing .exe if any
27055  new_path="${new_path/%.exe/}"
27056
27057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27058
27059  # First separate the path from the arguments. This will split at the first
27060  # space.
27061  complete="$NM"
27062  path="${complete%% *}"
27063  tmp="$complete EOL"
27064  arguments="${tmp#* }"
27065
27066  # Input might be given as Windows format, start by converting to
27067  # unix format.
27068  new_path="$path"
27069
27070  windows_path="$new_path"
27071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27072    unix_path=`$CYGPATH -u "$windows_path"`
27073    new_path="$unix_path"
27074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27076    new_path="$unix_path"
27077  fi
27078
27079
27080  # Now try to locate executable using which
27081  new_path=`$WHICH "$new_path" 2> /dev/null`
27082
27083  if test "x$new_path" = x; then
27084    # Oops. Which didn't find the executable.
27085    # The splitting of arguments from the executable at a space might have been incorrect,
27086    # since paths with space are more likely in Windows. Give it another try with the whole
27087    # argument.
27088    path="$complete"
27089    arguments="EOL"
27090    new_path="$path"
27091
27092  windows_path="$new_path"
27093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27094    unix_path=`$CYGPATH -u "$windows_path"`
27095    new_path="$unix_path"
27096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27098    new_path="$unix_path"
27099  fi
27100
27101
27102    new_path=`$WHICH "$new_path" 2> /dev/null`
27103
27104    if test "x$new_path" = x; then
27105      # It's still not found. Now this is an unrecoverable error.
27106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27107$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27108      has_space=`$ECHO "$complete" | $GREP " "`
27109      if test "x$has_space" != x; then
27110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27112      fi
27113      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27114    fi
27115  fi
27116
27117  # Now new_path has a complete unix path to the binary
27118  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27119    # Keep paths in /bin as-is, but remove trailing .exe if any
27120    new_path="${new_path/%.exe/}"
27121    # Do not save /bin paths to all_fixpath_prefixes!
27122  else
27123    # Not in mixed or Windows style, start by that.
27124    new_path=`cmd //c echo $new_path`
27125
27126  input_path="$new_path"
27127  # Check if we need to convert this using DOS-style short mode. If the path
27128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27129  # take no chances and rewrite it.
27130  # Note: m4 eats our [], so we need to use [ and ] instead.
27131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27132  if test "x$has_forbidden_chars" != x; then
27133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27135  fi
27136
27137    # Output is in $new_path
27138
27139  windows_path="$new_path"
27140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27141    unix_path=`$CYGPATH -u "$windows_path"`
27142    new_path="$unix_path"
27143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27145    new_path="$unix_path"
27146  fi
27147
27148    # remove trailing .exe if any
27149    new_path="${new_path/%.exe/}"
27150
27151    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27152    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27153  fi
27154
27155  else
27156    # We're on a posix platform. Hooray! :)
27157    # First separate the path from the arguments. This will split at the first
27158    # space.
27159    complete="$NM"
27160    path="${complete%% *}"
27161    tmp="$complete EOL"
27162    arguments="${tmp#* }"
27163
27164    # Cannot rely on the command "which" here since it doesn't always work.
27165    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27166    if test -z "$is_absolute_path"; then
27167      # Path to executable is not absolute. Find it.
27168      IFS_save="$IFS"
27169      IFS=:
27170      for p in $PATH; do
27171        if test -f "$p/$path" && test -x "$p/$path"; then
27172          new_path="$p/$path"
27173          break
27174        fi
27175      done
27176      IFS="$IFS_save"
27177    else
27178      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27179$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27180      new_path="$path"
27181    fi
27182
27183    if test "x$new_path" = x; then
27184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27185$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27186      has_space=`$ECHO "$complete" | $GREP " "`
27187      if test "x$has_space" != x; then
27188        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27189$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27190      fi
27191      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27192    fi
27193  fi
27194
27195  # Now join together the path and the arguments once again
27196  if test "x$arguments" != xEOL; then
27197    new_complete="$new_path ${arguments% *}"
27198  else
27199    new_complete="$new_path"
27200  fi
27201
27202  if test "x$complete" != "x$new_complete"; then
27203    NM="$new_complete"
27204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27205$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27206  fi
27207
27208    GNM="$NM"
27209
27210    if test -n "$ac_tool_prefix"; then
27211  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27212set dummy ${ac_tool_prefix}strip; ac_word=$2
27213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27214$as_echo_n "checking for $ac_word... " >&6; }
27215if ${ac_cv_prog_STRIP+:} false; then :
27216  $as_echo_n "(cached) " >&6
27217else
27218  if test -n "$STRIP"; then
27219  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27220else
27221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27222for as_dir in $PATH
27223do
27224  IFS=$as_save_IFS
27225  test -z "$as_dir" && as_dir=.
27226    for ac_exec_ext in '' $ac_executable_extensions; do
27227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27228    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27230    break 2
27231  fi
27232done
27233  done
27234IFS=$as_save_IFS
27235
27236fi
27237fi
27238STRIP=$ac_cv_prog_STRIP
27239if test -n "$STRIP"; then
27240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27241$as_echo "$STRIP" >&6; }
27242else
27243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27244$as_echo "no" >&6; }
27245fi
27246
27247
27248fi
27249if test -z "$ac_cv_prog_STRIP"; then
27250  ac_ct_STRIP=$STRIP
27251  # Extract the first word of "strip", so it can be a program name with args.
27252set dummy strip; ac_word=$2
27253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27254$as_echo_n "checking for $ac_word... " >&6; }
27255if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27256  $as_echo_n "(cached) " >&6
27257else
27258  if test -n "$ac_ct_STRIP"; then
27259  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27260else
27261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27262for as_dir in $PATH
27263do
27264  IFS=$as_save_IFS
27265  test -z "$as_dir" && as_dir=.
27266    for ac_exec_ext in '' $ac_executable_extensions; do
27267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27268    ac_cv_prog_ac_ct_STRIP="strip"
27269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27270    break 2
27271  fi
27272done
27273  done
27274IFS=$as_save_IFS
27275
27276fi
27277fi
27278ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27279if test -n "$ac_ct_STRIP"; then
27280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27281$as_echo "$ac_ct_STRIP" >&6; }
27282else
27283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27284$as_echo "no" >&6; }
27285fi
27286
27287  if test "x$ac_ct_STRIP" = x; then
27288    STRIP=""
27289  else
27290    case $cross_compiling:$ac_tool_warned in
27291yes:)
27292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27294ac_tool_warned=yes ;;
27295esac
27296    STRIP=$ac_ct_STRIP
27297  fi
27298else
27299  STRIP="$ac_cv_prog_STRIP"
27300fi
27301
27302
27303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27304
27305  # First separate the path from the arguments. This will split at the first
27306  # space.
27307  complete="$STRIP"
27308  path="${complete%% *}"
27309  tmp="$complete EOL"
27310  arguments="${tmp#* }"
27311
27312  # Input might be given as Windows format, start by converting to
27313  # unix format.
27314  new_path=`$CYGPATH -u "$path"`
27315
27316  # Now try to locate executable using which
27317  new_path=`$WHICH "$new_path" 2> /dev/null`
27318  # bat and cmd files are not always considered executable in cygwin causing which
27319  # to not find them
27320  if test "x$new_path" = x \
27321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27323    new_path=`$CYGPATH -u "$path"`
27324  fi
27325  if test "x$new_path" = x; then
27326    # Oops. Which didn't find the executable.
27327    # The splitting of arguments from the executable at a space might have been incorrect,
27328    # since paths with space are more likely in Windows. Give it another try with the whole
27329    # argument.
27330    path="$complete"
27331    arguments="EOL"
27332    new_path=`$CYGPATH -u "$path"`
27333    new_path=`$WHICH "$new_path" 2> /dev/null`
27334    # bat and cmd files are not always considered executable in cygwin causing which
27335    # to not find them
27336    if test "x$new_path" = x \
27337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27339      new_path=`$CYGPATH -u "$path"`
27340    fi
27341    if test "x$new_path" = x; then
27342      # It's still not found. Now this is an unrecoverable error.
27343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27344$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27345      has_space=`$ECHO "$complete" | $GREP " "`
27346      if test "x$has_space" != x; then
27347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27349      fi
27350      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27351    fi
27352  fi
27353
27354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27357  # "foo.exe" is OK but "foo" is an error.
27358  #
27359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27360  # It is also a way to make sure we got the proper file name for the real test later on.
27361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27362  if test "x$test_shortpath" = x; then
27363    # Short path failed, file does not exist as specified.
27364    # Try adding .exe or .cmd
27365    if test -f "${new_path}.exe"; then
27366      input_to_shortpath="${new_path}.exe"
27367    elif test -f "${new_path}.cmd"; then
27368      input_to_shortpath="${new_path}.cmd"
27369    else
27370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27371$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27374      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27375    fi
27376  else
27377    input_to_shortpath="$new_path"
27378  fi
27379
27380  # Call helper function which possibly converts this using DOS-style short mode.
27381  # If so, the updated path is stored in $new_path.
27382  new_path="$input_to_shortpath"
27383
27384  input_path="$input_to_shortpath"
27385  # Check if we need to convert this using DOS-style short mode. If the path
27386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27387  # take no chances and rewrite it.
27388  # Note: m4 eats our [], so we need to use [ and ] instead.
27389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27390  if test "x$has_forbidden_chars" != x; then
27391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27395      # Going to short mode and back again did indeed matter. Since short mode is
27396      # case insensitive, let's make it lowercase to improve readability.
27397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27398      # Now convert it back to Unix-stile (cygpath)
27399      input_path=`$CYGPATH -u "$shortmode_path"`
27400      new_path="$input_path"
27401    fi
27402  fi
27403
27404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27405  if test "x$test_cygdrive_prefix" = x; then
27406    # As a simple fix, exclude /usr/bin since it's not a real path.
27407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27409      # a path prefixed by /cygdrive for fixpath to work.
27410      new_path="$CYGWIN_ROOT_PATH$input_path"
27411    fi
27412  fi
27413
27414  # remove trailing .exe if any
27415  new_path="${new_path/%.exe/}"
27416
27417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27418
27419  # First separate the path from the arguments. This will split at the first
27420  # space.
27421  complete="$STRIP"
27422  path="${complete%% *}"
27423  tmp="$complete EOL"
27424  arguments="${tmp#* }"
27425
27426  # Input might be given as Windows format, start by converting to
27427  # unix format.
27428  new_path="$path"
27429
27430  windows_path="$new_path"
27431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27432    unix_path=`$CYGPATH -u "$windows_path"`
27433    new_path="$unix_path"
27434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27436    new_path="$unix_path"
27437  fi
27438
27439
27440  # Now try to locate executable using which
27441  new_path=`$WHICH "$new_path" 2> /dev/null`
27442
27443  if test "x$new_path" = x; then
27444    # Oops. Which didn't find the executable.
27445    # The splitting of arguments from the executable at a space might have been incorrect,
27446    # since paths with space are more likely in Windows. Give it another try with the whole
27447    # argument.
27448    path="$complete"
27449    arguments="EOL"
27450    new_path="$path"
27451
27452  windows_path="$new_path"
27453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454    unix_path=`$CYGPATH -u "$windows_path"`
27455    new_path="$unix_path"
27456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27458    new_path="$unix_path"
27459  fi
27460
27461
27462    new_path=`$WHICH "$new_path" 2> /dev/null`
27463
27464    if test "x$new_path" = x; then
27465      # It's still not found. Now this is an unrecoverable error.
27466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27467$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27468      has_space=`$ECHO "$complete" | $GREP " "`
27469      if test "x$has_space" != x; then
27470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27472      fi
27473      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27474    fi
27475  fi
27476
27477  # Now new_path has a complete unix path to the binary
27478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27479    # Keep paths in /bin as-is, but remove trailing .exe if any
27480    new_path="${new_path/%.exe/}"
27481    # Do not save /bin paths to all_fixpath_prefixes!
27482  else
27483    # Not in mixed or Windows style, start by that.
27484    new_path=`cmd //c echo $new_path`
27485
27486  input_path="$new_path"
27487  # Check if we need to convert this using DOS-style short mode. If the path
27488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27489  # take no chances and rewrite it.
27490  # Note: m4 eats our [], so we need to use [ and ] instead.
27491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27492  if test "x$has_forbidden_chars" != x; then
27493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27495  fi
27496
27497    # Output is in $new_path
27498
27499  windows_path="$new_path"
27500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27501    unix_path=`$CYGPATH -u "$windows_path"`
27502    new_path="$unix_path"
27503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27505    new_path="$unix_path"
27506  fi
27507
27508    # remove trailing .exe if any
27509    new_path="${new_path/%.exe/}"
27510
27511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27513  fi
27514
27515  else
27516    # We're on a posix platform. Hooray! :)
27517    # First separate the path from the arguments. This will split at the first
27518    # space.
27519    complete="$STRIP"
27520    path="${complete%% *}"
27521    tmp="$complete EOL"
27522    arguments="${tmp#* }"
27523
27524    # Cannot rely on the command "which" here since it doesn't always work.
27525    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27526    if test -z "$is_absolute_path"; then
27527      # Path to executable is not absolute. Find it.
27528      IFS_save="$IFS"
27529      IFS=:
27530      for p in $PATH; do
27531        if test -f "$p/$path" && test -x "$p/$path"; then
27532          new_path="$p/$path"
27533          break
27534        fi
27535      done
27536      IFS="$IFS_save"
27537    else
27538      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27539$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27540      new_path="$path"
27541    fi
27542
27543    if test "x$new_path" = x; then
27544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27545$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27546      has_space=`$ECHO "$complete" | $GREP " "`
27547      if test "x$has_space" != x; then
27548        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27550      fi
27551      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27552    fi
27553  fi
27554
27555  # Now join together the path and the arguments once again
27556  if test "x$arguments" != xEOL; then
27557    new_complete="$new_path ${arguments% *}"
27558  else
27559    new_complete="$new_path"
27560  fi
27561
27562  if test "x$complete" != "x$new_complete"; then
27563    STRIP="$new_complete"
27564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27565$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27566  fi
27567
27568  fi
27569
27570  # objcopy is used for moving debug symbols to separate files when
27571  # full debug symbols are enabled.
27572  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27573    if test -n "$ac_tool_prefix"; then
27574  for ac_prog in gobjcopy objcopy
27575  do
27576    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27577set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27579$as_echo_n "checking for $ac_word... " >&6; }
27580if ${ac_cv_prog_OBJCOPY+:} false; then :
27581  $as_echo_n "(cached) " >&6
27582else
27583  if test -n "$OBJCOPY"; then
27584  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27585else
27586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27587for as_dir in $PATH
27588do
27589  IFS=$as_save_IFS
27590  test -z "$as_dir" && as_dir=.
27591    for ac_exec_ext in '' $ac_executable_extensions; do
27592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27593    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27595    break 2
27596  fi
27597done
27598  done
27599IFS=$as_save_IFS
27600
27601fi
27602fi
27603OBJCOPY=$ac_cv_prog_OBJCOPY
27604if test -n "$OBJCOPY"; then
27605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27606$as_echo "$OBJCOPY" >&6; }
27607else
27608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27609$as_echo "no" >&6; }
27610fi
27611
27612
27613    test -n "$OBJCOPY" && break
27614  done
27615fi
27616if test -z "$OBJCOPY"; then
27617  ac_ct_OBJCOPY=$OBJCOPY
27618  for ac_prog in gobjcopy objcopy
27619do
27620  # Extract the first word of "$ac_prog", so it can be a program name with args.
27621set dummy $ac_prog; ac_word=$2
27622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27623$as_echo_n "checking for $ac_word... " >&6; }
27624if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27625  $as_echo_n "(cached) " >&6
27626else
27627  if test -n "$ac_ct_OBJCOPY"; then
27628  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27629else
27630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27631for as_dir in $PATH
27632do
27633  IFS=$as_save_IFS
27634  test -z "$as_dir" && as_dir=.
27635    for ac_exec_ext in '' $ac_executable_extensions; do
27636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27637    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27639    break 2
27640  fi
27641done
27642  done
27643IFS=$as_save_IFS
27644
27645fi
27646fi
27647ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27648if test -n "$ac_ct_OBJCOPY"; then
27649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27650$as_echo "$ac_ct_OBJCOPY" >&6; }
27651else
27652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27653$as_echo "no" >&6; }
27654fi
27655
27656
27657  test -n "$ac_ct_OBJCOPY" && break
27658done
27659
27660  if test "x$ac_ct_OBJCOPY" = x; then
27661    OBJCOPY=""
27662  else
27663    case $cross_compiling:$ac_tool_warned in
27664yes:)
27665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27667ac_tool_warned=yes ;;
27668esac
27669    OBJCOPY=$ac_ct_OBJCOPY
27670  fi
27671fi
27672
27673    # Only call fixup if objcopy was found.
27674    if test -n "$OBJCOPY"; then
27675
27676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27677
27678  # First separate the path from the arguments. This will split at the first
27679  # space.
27680  complete="$OBJCOPY"
27681  path="${complete%% *}"
27682  tmp="$complete EOL"
27683  arguments="${tmp#* }"
27684
27685  # Input might be given as Windows format, start by converting to
27686  # unix format.
27687  new_path=`$CYGPATH -u "$path"`
27688
27689  # Now try to locate executable using which
27690  new_path=`$WHICH "$new_path" 2> /dev/null`
27691  # bat and cmd files are not always considered executable in cygwin causing which
27692  # to not find them
27693  if test "x$new_path" = x \
27694      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27695      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27696    new_path=`$CYGPATH -u "$path"`
27697  fi
27698  if test "x$new_path" = x; then
27699    # Oops. Which didn't find the executable.
27700    # The splitting of arguments from the executable at a space might have been incorrect,
27701    # since paths with space are more likely in Windows. Give it another try with the whole
27702    # argument.
27703    path="$complete"
27704    arguments="EOL"
27705    new_path=`$CYGPATH -u "$path"`
27706    new_path=`$WHICH "$new_path" 2> /dev/null`
27707    # bat and cmd files are not always considered executable in cygwin causing which
27708    # to not find them
27709    if test "x$new_path" = x \
27710        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27711        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27712      new_path=`$CYGPATH -u "$path"`
27713    fi
27714    if test "x$new_path" = x; then
27715      # It's still not found. Now this is an unrecoverable error.
27716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27717$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27718      has_space=`$ECHO "$complete" | $GREP " "`
27719      if test "x$has_space" != x; then
27720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27722      fi
27723      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27724    fi
27725  fi
27726
27727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27730  # "foo.exe" is OK but "foo" is an error.
27731  #
27732  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27733  # It is also a way to make sure we got the proper file name for the real test later on.
27734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27735  if test "x$test_shortpath" = x; then
27736    # Short path failed, file does not exist as specified.
27737    # Try adding .exe or .cmd
27738    if test -f "${new_path}.exe"; then
27739      input_to_shortpath="${new_path}.exe"
27740    elif test -f "${new_path}.cmd"; then
27741      input_to_shortpath="${new_path}.cmd"
27742    else
27743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27744$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27745      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27746$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27747      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27748    fi
27749  else
27750    input_to_shortpath="$new_path"
27751  fi
27752
27753  # Call helper function which possibly converts this using DOS-style short mode.
27754  # If so, the updated path is stored in $new_path.
27755  new_path="$input_to_shortpath"
27756
27757  input_path="$input_to_shortpath"
27758  # Check if we need to convert this using DOS-style short mode. If the path
27759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27760  # take no chances and rewrite it.
27761  # Note: m4 eats our [], so we need to use [ and ] instead.
27762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27763  if test "x$has_forbidden_chars" != x; then
27764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27768      # Going to short mode and back again did indeed matter. Since short mode is
27769      # case insensitive, let's make it lowercase to improve readability.
27770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27771      # Now convert it back to Unix-stile (cygpath)
27772      input_path=`$CYGPATH -u "$shortmode_path"`
27773      new_path="$input_path"
27774    fi
27775  fi
27776
27777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27778  if test "x$test_cygdrive_prefix" = x; then
27779    # As a simple fix, exclude /usr/bin since it's not a real path.
27780    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27782      # a path prefixed by /cygdrive for fixpath to work.
27783      new_path="$CYGWIN_ROOT_PATH$input_path"
27784    fi
27785  fi
27786
27787  # remove trailing .exe if any
27788  new_path="${new_path/%.exe/}"
27789
27790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27791
27792  # First separate the path from the arguments. This will split at the first
27793  # space.
27794  complete="$OBJCOPY"
27795  path="${complete%% *}"
27796  tmp="$complete EOL"
27797  arguments="${tmp#* }"
27798
27799  # Input might be given as Windows format, start by converting to
27800  # unix format.
27801  new_path="$path"
27802
27803  windows_path="$new_path"
27804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27805    unix_path=`$CYGPATH -u "$windows_path"`
27806    new_path="$unix_path"
27807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27809    new_path="$unix_path"
27810  fi
27811
27812
27813  # Now try to locate executable using which
27814  new_path=`$WHICH "$new_path" 2> /dev/null`
27815
27816  if test "x$new_path" = x; then
27817    # Oops. Which didn't find the executable.
27818    # The splitting of arguments from the executable at a space might have been incorrect,
27819    # since paths with space are more likely in Windows. Give it another try with the whole
27820    # argument.
27821    path="$complete"
27822    arguments="EOL"
27823    new_path="$path"
27824
27825  windows_path="$new_path"
27826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27827    unix_path=`$CYGPATH -u "$windows_path"`
27828    new_path="$unix_path"
27829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27831    new_path="$unix_path"
27832  fi
27833
27834
27835    new_path=`$WHICH "$new_path" 2> /dev/null`
27836
27837    if test "x$new_path" = x; then
27838      # It's still not found. Now this is an unrecoverable error.
27839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27840$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27841      has_space=`$ECHO "$complete" | $GREP " "`
27842      if test "x$has_space" != x; then
27843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27845      fi
27846      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27847    fi
27848  fi
27849
27850  # Now new_path has a complete unix path to the binary
27851  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27852    # Keep paths in /bin as-is, but remove trailing .exe if any
27853    new_path="${new_path/%.exe/}"
27854    # Do not save /bin paths to all_fixpath_prefixes!
27855  else
27856    # Not in mixed or Windows style, start by that.
27857    new_path=`cmd //c echo $new_path`
27858
27859  input_path="$new_path"
27860  # Check if we need to convert this using DOS-style short mode. If the path
27861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27862  # take no chances and rewrite it.
27863  # Note: m4 eats our [], so we need to use [ and ] instead.
27864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27865  if test "x$has_forbidden_chars" != x; then
27866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27868  fi
27869
27870    # Output is in $new_path
27871
27872  windows_path="$new_path"
27873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27874    unix_path=`$CYGPATH -u "$windows_path"`
27875    new_path="$unix_path"
27876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27878    new_path="$unix_path"
27879  fi
27880
27881    # remove trailing .exe if any
27882    new_path="${new_path/%.exe/}"
27883
27884    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27885    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27886  fi
27887
27888  else
27889    # We're on a posix platform. Hooray! :)
27890    # First separate the path from the arguments. This will split at the first
27891    # space.
27892    complete="$OBJCOPY"
27893    path="${complete%% *}"
27894    tmp="$complete EOL"
27895    arguments="${tmp#* }"
27896
27897    # Cannot rely on the command "which" here since it doesn't always work.
27898    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27899    if test -z "$is_absolute_path"; then
27900      # Path to executable is not absolute. Find it.
27901      IFS_save="$IFS"
27902      IFS=:
27903      for p in $PATH; do
27904        if test -f "$p/$path" && test -x "$p/$path"; then
27905          new_path="$p/$path"
27906          break
27907        fi
27908      done
27909      IFS="$IFS_save"
27910    else
27911      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27912$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27913      new_path="$path"
27914    fi
27915
27916    if test "x$new_path" = x; then
27917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27918$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27919      has_space=`$ECHO "$complete" | $GREP " "`
27920      if test "x$has_space" != x; then
27921        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27922$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27923      fi
27924      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27925    fi
27926  fi
27927
27928  # Now join together the path and the arguments once again
27929  if test "x$arguments" != xEOL; then
27930    new_complete="$new_path ${arguments% *}"
27931  else
27932    new_complete="$new_path"
27933  fi
27934
27935  if test "x$complete" != "x$new_complete"; then
27936    OBJCOPY="$new_complete"
27937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27938$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27939  fi
27940
27941    fi
27942  fi
27943
27944  if test -n "$ac_tool_prefix"; then
27945  for ac_prog in gobjdump objdump
27946  do
27947    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27948set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27950$as_echo_n "checking for $ac_word... " >&6; }
27951if ${ac_cv_prog_OBJDUMP+:} false; then :
27952  $as_echo_n "(cached) " >&6
27953else
27954  if test -n "$OBJDUMP"; then
27955  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27956else
27957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27958for as_dir in $PATH
27959do
27960  IFS=$as_save_IFS
27961  test -z "$as_dir" && as_dir=.
27962    for ac_exec_ext in '' $ac_executable_extensions; do
27963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27964    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27966    break 2
27967  fi
27968done
27969  done
27970IFS=$as_save_IFS
27971
27972fi
27973fi
27974OBJDUMP=$ac_cv_prog_OBJDUMP
27975if test -n "$OBJDUMP"; then
27976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27977$as_echo "$OBJDUMP" >&6; }
27978else
27979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27980$as_echo "no" >&6; }
27981fi
27982
27983
27984    test -n "$OBJDUMP" && break
27985  done
27986fi
27987if test -z "$OBJDUMP"; then
27988  ac_ct_OBJDUMP=$OBJDUMP
27989  for ac_prog in gobjdump objdump
27990do
27991  # Extract the first word of "$ac_prog", so it can be a program name with args.
27992set dummy $ac_prog; ac_word=$2
27993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27994$as_echo_n "checking for $ac_word... " >&6; }
27995if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27996  $as_echo_n "(cached) " >&6
27997else
27998  if test -n "$ac_ct_OBJDUMP"; then
27999  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28000else
28001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28002for as_dir in $PATH
28003do
28004  IFS=$as_save_IFS
28005  test -z "$as_dir" && as_dir=.
28006    for ac_exec_ext in '' $ac_executable_extensions; do
28007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28008    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28010    break 2
28011  fi
28012done
28013  done
28014IFS=$as_save_IFS
28015
28016fi
28017fi
28018ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28019if test -n "$ac_ct_OBJDUMP"; then
28020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28021$as_echo "$ac_ct_OBJDUMP" >&6; }
28022else
28023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28024$as_echo "no" >&6; }
28025fi
28026
28027
28028  test -n "$ac_ct_OBJDUMP" && break
28029done
28030
28031  if test "x$ac_ct_OBJDUMP" = x; then
28032    OBJDUMP=""
28033  else
28034    case $cross_compiling:$ac_tool_warned in
28035yes:)
28036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28038ac_tool_warned=yes ;;
28039esac
28040    OBJDUMP=$ac_ct_OBJDUMP
28041  fi
28042fi
28043
28044  if test "x$OBJDUMP" != x; then
28045    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28046
28047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28048
28049  # First separate the path from the arguments. This will split at the first
28050  # space.
28051  complete="$OBJDUMP"
28052  path="${complete%% *}"
28053  tmp="$complete EOL"
28054  arguments="${tmp#* }"
28055
28056  # Input might be given as Windows format, start by converting to
28057  # unix format.
28058  new_path=`$CYGPATH -u "$path"`
28059
28060  # Now try to locate executable using which
28061  new_path=`$WHICH "$new_path" 2> /dev/null`
28062  # bat and cmd files are not always considered executable in cygwin causing which
28063  # to not find them
28064  if test "x$new_path" = x \
28065      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28066      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28067    new_path=`$CYGPATH -u "$path"`
28068  fi
28069  if test "x$new_path" = x; then
28070    # Oops. Which didn't find the executable.
28071    # The splitting of arguments from the executable at a space might have been incorrect,
28072    # since paths with space are more likely in Windows. Give it another try with the whole
28073    # argument.
28074    path="$complete"
28075    arguments="EOL"
28076    new_path=`$CYGPATH -u "$path"`
28077    new_path=`$WHICH "$new_path" 2> /dev/null`
28078    # bat and cmd files are not always considered executable in cygwin causing which
28079    # to not find them
28080    if test "x$new_path" = x \
28081        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28082        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28083      new_path=`$CYGPATH -u "$path"`
28084    fi
28085    if test "x$new_path" = x; then
28086      # It's still not found. Now this is an unrecoverable error.
28087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28088$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28089      has_space=`$ECHO "$complete" | $GREP " "`
28090      if test "x$has_space" != x; then
28091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28093      fi
28094      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28095    fi
28096  fi
28097
28098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28101  # "foo.exe" is OK but "foo" is an error.
28102  #
28103  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28104  # It is also a way to make sure we got the proper file name for the real test later on.
28105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28106  if test "x$test_shortpath" = x; then
28107    # Short path failed, file does not exist as specified.
28108    # Try adding .exe or .cmd
28109    if test -f "${new_path}.exe"; then
28110      input_to_shortpath="${new_path}.exe"
28111    elif test -f "${new_path}.cmd"; then
28112      input_to_shortpath="${new_path}.cmd"
28113    else
28114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28115$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28116      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28117$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28118      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28119    fi
28120  else
28121    input_to_shortpath="$new_path"
28122  fi
28123
28124  # Call helper function which possibly converts this using DOS-style short mode.
28125  # If so, the updated path is stored in $new_path.
28126  new_path="$input_to_shortpath"
28127
28128  input_path="$input_to_shortpath"
28129  # Check if we need to convert this using DOS-style short mode. If the path
28130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28131  # take no chances and rewrite it.
28132  # Note: m4 eats our [], so we need to use [ and ] instead.
28133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28134  if test "x$has_forbidden_chars" != x; then
28135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28139      # Going to short mode and back again did indeed matter. Since short mode is
28140      # case insensitive, let's make it lowercase to improve readability.
28141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28142      # Now convert it back to Unix-stile (cygpath)
28143      input_path=`$CYGPATH -u "$shortmode_path"`
28144      new_path="$input_path"
28145    fi
28146  fi
28147
28148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28149  if test "x$test_cygdrive_prefix" = x; then
28150    # As a simple fix, exclude /usr/bin since it's not a real path.
28151    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28153      # a path prefixed by /cygdrive for fixpath to work.
28154      new_path="$CYGWIN_ROOT_PATH$input_path"
28155    fi
28156  fi
28157
28158  # remove trailing .exe if any
28159  new_path="${new_path/%.exe/}"
28160
28161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28162
28163  # First separate the path from the arguments. This will split at the first
28164  # space.
28165  complete="$OBJDUMP"
28166  path="${complete%% *}"
28167  tmp="$complete EOL"
28168  arguments="${tmp#* }"
28169
28170  # Input might be given as Windows format, start by converting to
28171  # unix format.
28172  new_path="$path"
28173
28174  windows_path="$new_path"
28175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28176    unix_path=`$CYGPATH -u "$windows_path"`
28177    new_path="$unix_path"
28178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28180    new_path="$unix_path"
28181  fi
28182
28183
28184  # Now try to locate executable using which
28185  new_path=`$WHICH "$new_path" 2> /dev/null`
28186
28187  if test "x$new_path" = x; then
28188    # Oops. Which didn't find the executable.
28189    # The splitting of arguments from the executable at a space might have been incorrect,
28190    # since paths with space are more likely in Windows. Give it another try with the whole
28191    # argument.
28192    path="$complete"
28193    arguments="EOL"
28194    new_path="$path"
28195
28196  windows_path="$new_path"
28197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28198    unix_path=`$CYGPATH -u "$windows_path"`
28199    new_path="$unix_path"
28200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28202    new_path="$unix_path"
28203  fi
28204
28205
28206    new_path=`$WHICH "$new_path" 2> /dev/null`
28207
28208    if test "x$new_path" = x; then
28209      # It's still not found. Now this is an unrecoverable error.
28210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28211$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28212      has_space=`$ECHO "$complete" | $GREP " "`
28213      if test "x$has_space" != x; then
28214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28216      fi
28217      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28218    fi
28219  fi
28220
28221  # Now new_path has a complete unix path to the binary
28222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28223    # Keep paths in /bin as-is, but remove trailing .exe if any
28224    new_path="${new_path/%.exe/}"
28225    # Do not save /bin paths to all_fixpath_prefixes!
28226  else
28227    # Not in mixed or Windows style, start by that.
28228    new_path=`cmd //c echo $new_path`
28229
28230  input_path="$new_path"
28231  # Check if we need to convert this using DOS-style short mode. If the path
28232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28233  # take no chances and rewrite it.
28234  # Note: m4 eats our [], so we need to use [ and ] instead.
28235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28236  if test "x$has_forbidden_chars" != x; then
28237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28239  fi
28240
28241    # Output is in $new_path
28242
28243  windows_path="$new_path"
28244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28245    unix_path=`$CYGPATH -u "$windows_path"`
28246    new_path="$unix_path"
28247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28249    new_path="$unix_path"
28250  fi
28251
28252    # remove trailing .exe if any
28253    new_path="${new_path/%.exe/}"
28254
28255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28257  fi
28258
28259  else
28260    # We're on a posix platform. Hooray! :)
28261    # First separate the path from the arguments. This will split at the first
28262    # space.
28263    complete="$OBJDUMP"
28264    path="${complete%% *}"
28265    tmp="$complete EOL"
28266    arguments="${tmp#* }"
28267
28268    # Cannot rely on the command "which" here since it doesn't always work.
28269    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28270    if test -z "$is_absolute_path"; then
28271      # Path to executable is not absolute. Find it.
28272      IFS_save="$IFS"
28273      IFS=:
28274      for p in $PATH; do
28275        if test -f "$p/$path" && test -x "$p/$path"; then
28276          new_path="$p/$path"
28277          break
28278        fi
28279      done
28280      IFS="$IFS_save"
28281    else
28282      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28283$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28284      new_path="$path"
28285    fi
28286
28287    if test "x$new_path" = x; then
28288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28289$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28290      has_space=`$ECHO "$complete" | $GREP " "`
28291      if test "x$has_space" != x; then
28292        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28294      fi
28295      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28296    fi
28297  fi
28298
28299  # Now join together the path and the arguments once again
28300  if test "x$arguments" != xEOL; then
28301    new_complete="$new_path ${arguments% *}"
28302  else
28303    new_complete="$new_path"
28304  fi
28305
28306  if test "x$complete" != "x$new_complete"; then
28307    OBJDUMP="$new_complete"
28308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28309$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28310  fi
28311
28312  fi
28313
28314  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28315    # Extract the first word of "lipo", so it can be a program name with args.
28316set dummy lipo; ac_word=$2
28317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28318$as_echo_n "checking for $ac_word... " >&6; }
28319if ${ac_cv_path_LIPO+:} false; then :
28320  $as_echo_n "(cached) " >&6
28321else
28322  case $LIPO in
28323  [\\/]* | ?:[\\/]*)
28324  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28325  ;;
28326  *)
28327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28328for as_dir in $PATH
28329do
28330  IFS=$as_save_IFS
28331  test -z "$as_dir" && as_dir=.
28332    for ac_exec_ext in '' $ac_executable_extensions; do
28333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28334    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28336    break 2
28337  fi
28338done
28339  done
28340IFS=$as_save_IFS
28341
28342  ;;
28343esac
28344fi
28345LIPO=$ac_cv_path_LIPO
28346if test -n "$LIPO"; then
28347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28348$as_echo "$LIPO" >&6; }
28349else
28350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28351$as_echo "no" >&6; }
28352fi
28353
28354
28355
28356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28357
28358  # First separate the path from the arguments. This will split at the first
28359  # space.
28360  complete="$LIPO"
28361  path="${complete%% *}"
28362  tmp="$complete EOL"
28363  arguments="${tmp#* }"
28364
28365  # Input might be given as Windows format, start by converting to
28366  # unix format.
28367  new_path=`$CYGPATH -u "$path"`
28368
28369  # Now try to locate executable using which
28370  new_path=`$WHICH "$new_path" 2> /dev/null`
28371  # bat and cmd files are not always considered executable in cygwin causing which
28372  # to not find them
28373  if test "x$new_path" = x \
28374      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28375      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28376    new_path=`$CYGPATH -u "$path"`
28377  fi
28378  if test "x$new_path" = x; then
28379    # Oops. Which didn't find the executable.
28380    # The splitting of arguments from the executable at a space might have been incorrect,
28381    # since paths with space are more likely in Windows. Give it another try with the whole
28382    # argument.
28383    path="$complete"
28384    arguments="EOL"
28385    new_path=`$CYGPATH -u "$path"`
28386    new_path=`$WHICH "$new_path" 2> /dev/null`
28387    # bat and cmd files are not always considered executable in cygwin causing which
28388    # to not find them
28389    if test "x$new_path" = x \
28390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28392      new_path=`$CYGPATH -u "$path"`
28393    fi
28394    if test "x$new_path" = x; then
28395      # It's still not found. Now this is an unrecoverable error.
28396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28397$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28398      has_space=`$ECHO "$complete" | $GREP " "`
28399      if test "x$has_space" != x; then
28400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28402      fi
28403      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28404    fi
28405  fi
28406
28407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28410  # "foo.exe" is OK but "foo" is an error.
28411  #
28412  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28413  # It is also a way to make sure we got the proper file name for the real test later on.
28414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28415  if test "x$test_shortpath" = x; then
28416    # Short path failed, file does not exist as specified.
28417    # Try adding .exe or .cmd
28418    if test -f "${new_path}.exe"; then
28419      input_to_shortpath="${new_path}.exe"
28420    elif test -f "${new_path}.cmd"; then
28421      input_to_shortpath="${new_path}.cmd"
28422    else
28423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28424$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28425      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28426$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28427      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28428    fi
28429  else
28430    input_to_shortpath="$new_path"
28431  fi
28432
28433  # Call helper function which possibly converts this using DOS-style short mode.
28434  # If so, the updated path is stored in $new_path.
28435  new_path="$input_to_shortpath"
28436
28437  input_path="$input_to_shortpath"
28438  # Check if we need to convert this using DOS-style short mode. If the path
28439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28440  # take no chances and rewrite it.
28441  # Note: m4 eats our [], so we need to use [ and ] instead.
28442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28443  if test "x$has_forbidden_chars" != x; then
28444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28448      # Going to short mode and back again did indeed matter. Since short mode is
28449      # case insensitive, let's make it lowercase to improve readability.
28450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28451      # Now convert it back to Unix-stile (cygpath)
28452      input_path=`$CYGPATH -u "$shortmode_path"`
28453      new_path="$input_path"
28454    fi
28455  fi
28456
28457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28458  if test "x$test_cygdrive_prefix" = x; then
28459    # As a simple fix, exclude /usr/bin since it's not a real path.
28460    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28462      # a path prefixed by /cygdrive for fixpath to work.
28463      new_path="$CYGWIN_ROOT_PATH$input_path"
28464    fi
28465  fi
28466
28467  # remove trailing .exe if any
28468  new_path="${new_path/%.exe/}"
28469
28470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28471
28472  # First separate the path from the arguments. This will split at the first
28473  # space.
28474  complete="$LIPO"
28475  path="${complete%% *}"
28476  tmp="$complete EOL"
28477  arguments="${tmp#* }"
28478
28479  # Input might be given as Windows format, start by converting to
28480  # unix format.
28481  new_path="$path"
28482
28483  windows_path="$new_path"
28484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28485    unix_path=`$CYGPATH -u "$windows_path"`
28486    new_path="$unix_path"
28487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28489    new_path="$unix_path"
28490  fi
28491
28492
28493  # Now try to locate executable using which
28494  new_path=`$WHICH "$new_path" 2> /dev/null`
28495
28496  if test "x$new_path" = x; then
28497    # Oops. Which didn't find the executable.
28498    # The splitting of arguments from the executable at a space might have been incorrect,
28499    # since paths with space are more likely in Windows. Give it another try with the whole
28500    # argument.
28501    path="$complete"
28502    arguments="EOL"
28503    new_path="$path"
28504
28505  windows_path="$new_path"
28506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28507    unix_path=`$CYGPATH -u "$windows_path"`
28508    new_path="$unix_path"
28509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28511    new_path="$unix_path"
28512  fi
28513
28514
28515    new_path=`$WHICH "$new_path" 2> /dev/null`
28516
28517    if test "x$new_path" = x; then
28518      # It's still not found. Now this is an unrecoverable error.
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28520$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28521      has_space=`$ECHO "$complete" | $GREP " "`
28522      if test "x$has_space" != x; then
28523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28525      fi
28526      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28527    fi
28528  fi
28529
28530  # Now new_path has a complete unix path to the binary
28531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28532    # Keep paths in /bin as-is, but remove trailing .exe if any
28533    new_path="${new_path/%.exe/}"
28534    # Do not save /bin paths to all_fixpath_prefixes!
28535  else
28536    # Not in mixed or Windows style, start by that.
28537    new_path=`cmd //c echo $new_path`
28538
28539  input_path="$new_path"
28540  # Check if we need to convert this using DOS-style short mode. If the path
28541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28542  # take no chances and rewrite it.
28543  # Note: m4 eats our [], so we need to use [ and ] instead.
28544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28545  if test "x$has_forbidden_chars" != x; then
28546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28548  fi
28549
28550    # Output is in $new_path
28551
28552  windows_path="$new_path"
28553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28554    unix_path=`$CYGPATH -u "$windows_path"`
28555    new_path="$unix_path"
28556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28558    new_path="$unix_path"
28559  fi
28560
28561    # remove trailing .exe if any
28562    new_path="${new_path/%.exe/}"
28563
28564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28566  fi
28567
28568  else
28569    # We're on a posix platform. Hooray! :)
28570    # First separate the path from the arguments. This will split at the first
28571    # space.
28572    complete="$LIPO"
28573    path="${complete%% *}"
28574    tmp="$complete EOL"
28575    arguments="${tmp#* }"
28576
28577    # Cannot rely on the command "which" here since it doesn't always work.
28578    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28579    if test -z "$is_absolute_path"; then
28580      # Path to executable is not absolute. Find it.
28581      IFS_save="$IFS"
28582      IFS=:
28583      for p in $PATH; do
28584        if test -f "$p/$path" && test -x "$p/$path"; then
28585          new_path="$p/$path"
28586          break
28587        fi
28588      done
28589      IFS="$IFS_save"
28590    else
28591      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28592$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28593      new_path="$path"
28594    fi
28595
28596    if test "x$new_path" = x; then
28597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28598$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28599      has_space=`$ECHO "$complete" | $GREP " "`
28600      if test "x$has_space" != x; then
28601        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28603      fi
28604      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28605    fi
28606  fi
28607
28608  # Now join together the path and the arguments once again
28609  if test "x$arguments" != xEOL; then
28610    new_complete="$new_path ${arguments% *}"
28611  else
28612    new_complete="$new_path"
28613  fi
28614
28615  if test "x$complete" != "x$new_complete"; then
28616    LIPO="$new_complete"
28617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28618$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28619  fi
28620
28621  fi
28622
28623
28624
28625  # Restore old path without tools dir
28626  PATH="$OLD_PATH"
28627
28628
28629# FIXME: Currently we must test this after paths but before flags. Fix!
28630
28631# And we can test some aspects on the target using configure macros.
28632
28633
28634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28635$as_echo_n "checking for ANSI C header files... " >&6; }
28636if ${ac_cv_header_stdc+:} false; then :
28637  $as_echo_n "(cached) " >&6
28638else
28639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28640/* end confdefs.h.  */
28641#include <stdlib.h>
28642#include <stdarg.h>
28643#include <string.h>
28644#include <float.h>
28645
28646int
28647main ()
28648{
28649
28650  ;
28651  return 0;
28652}
28653_ACEOF
28654if ac_fn_cxx_try_compile "$LINENO"; then :
28655  ac_cv_header_stdc=yes
28656else
28657  ac_cv_header_stdc=no
28658fi
28659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28660
28661if test $ac_cv_header_stdc = yes; then
28662  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28664/* end confdefs.h.  */
28665#include <string.h>
28666
28667_ACEOF
28668if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28669  $EGREP "memchr" >/dev/null 2>&1; then :
28670
28671else
28672  ac_cv_header_stdc=no
28673fi
28674rm -f conftest*
28675
28676fi
28677
28678if test $ac_cv_header_stdc = yes; then
28679  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28681/* end confdefs.h.  */
28682#include <stdlib.h>
28683
28684_ACEOF
28685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28686  $EGREP "free" >/dev/null 2>&1; then :
28687
28688else
28689  ac_cv_header_stdc=no
28690fi
28691rm -f conftest*
28692
28693fi
28694
28695if test $ac_cv_header_stdc = yes; then
28696  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28697  if test "$cross_compiling" = yes; then :
28698  :
28699else
28700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28701/* end confdefs.h.  */
28702#include <ctype.h>
28703#include <stdlib.h>
28704#if ((' ' & 0x0FF) == 0x020)
28705# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28706# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28707#else
28708# define ISLOWER(c) \
28709		   (('a' <= (c) && (c) <= 'i') \
28710		     || ('j' <= (c) && (c) <= 'r') \
28711		     || ('s' <= (c) && (c) <= 'z'))
28712# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28713#endif
28714
28715#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28716int
28717main ()
28718{
28719  int i;
28720  for (i = 0; i < 256; i++)
28721    if (XOR (islower (i), ISLOWER (i))
28722	|| toupper (i) != TOUPPER (i))
28723      return 2;
28724  return 0;
28725}
28726_ACEOF
28727if ac_fn_cxx_try_run "$LINENO"; then :
28728
28729else
28730  ac_cv_header_stdc=no
28731fi
28732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28733  conftest.$ac_objext conftest.beam conftest.$ac_ext
28734fi
28735
28736fi
28737fi
28738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28739$as_echo "$ac_cv_header_stdc" >&6; }
28740if test $ac_cv_header_stdc = yes; then
28741
28742$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28743
28744fi
28745
28746# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28747for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28748		  inttypes.h stdint.h unistd.h
28749do :
28750  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28751ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28752"
28753if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28754  cat >>confdefs.h <<_ACEOF
28755#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28756_ACEOF
28757
28758fi
28759
28760done
28761
28762
28763
28764  ###############################################################################
28765  #
28766  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28767  # (The JVM can use 32 or 64 bit Java pointers but that decision
28768  # is made at runtime.)
28769  #
28770
28771  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28772    # Always specify -m flags on Solaris
28773
28774  # When we add flags to the "official" CFLAGS etc, we need to
28775  # keep track of these additions in ADDED_CFLAGS etc. These
28776  # will later be checked to make sure only controlled additions
28777  # have been made to CFLAGS etc.
28778  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28779  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28780  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28781
28782  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28783  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28784  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28785
28786  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28787  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28788  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28789
28790  elif test "x$COMPILE_TYPE" = xreduced; then
28791    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28792      # Specify -m if running reduced on other Posix platforms
28793
28794  # When we add flags to the "official" CFLAGS etc, we need to
28795  # keep track of these additions in ADDED_CFLAGS etc. These
28796  # will later be checked to make sure only controlled additions
28797  # have been made to CFLAGS etc.
28798  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28799  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28800  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28801
28802  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28803  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28804  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28805
28806  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28807  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28808  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28809
28810    fi
28811  fi
28812
28813  # Make compilation sanity check
28814  for ac_header in stdio.h
28815do :
28816  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28817if test "x$ac_cv_header_stdio_h" = xyes; then :
28818  cat >>confdefs.h <<_ACEOF
28819#define HAVE_STDIO_H 1
28820_ACEOF
28821
28822else
28823
28824    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28825$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28826    if test "x$COMPILE_TYPE" = xreduced; then
28827      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28828$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28829    elif test "x$COMPILE_TYPE" = xcross; then
28830      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28831$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28832    fi
28833    as_fn_error $? "Cannot continue." "$LINENO" 5
28834
28835fi
28836
28837done
28838
28839
28840  # The cast to long int works around a bug in the HP C Compiler
28841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28843# This bug is HP SR number 8606223364.
28844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28845$as_echo_n "checking size of int *... " >&6; }
28846if ${ac_cv_sizeof_int_p+:} false; then :
28847  $as_echo_n "(cached) " >&6
28848else
28849  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28850
28851else
28852  if test "$ac_cv_type_int_p" = yes; then
28853     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28855as_fn_error 77 "cannot compute sizeof (int *)
28856See \`config.log' for more details" "$LINENO" 5; }
28857   else
28858     ac_cv_sizeof_int_p=0
28859   fi
28860fi
28861
28862fi
28863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28864$as_echo "$ac_cv_sizeof_int_p" >&6; }
28865
28866
28867
28868cat >>confdefs.h <<_ACEOF
28869#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28870_ACEOF
28871
28872
28873
28874  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28875    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28876    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28877  fi
28878
28879  if test "x$SIZEOF_INT_P" = x; then
28880    # The test failed, lets stick to the assumed value.
28881    { $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
28882$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28883  else
28884    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28885
28886    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28887      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
28888    fi
28889  fi
28890
28891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28892$as_echo_n "checking for target address size... " >&6; }
28893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28894$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28895
28896
28897  ###############################################################################
28898  #
28899  # Is the target little of big endian?
28900  #
28901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28902$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28903if ${ac_cv_c_bigendian+:} false; then :
28904  $as_echo_n "(cached) " >&6
28905else
28906  ac_cv_c_bigendian=unknown
28907    # See if we're dealing with a universal compiler.
28908    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28909/* end confdefs.h.  */
28910#ifndef __APPLE_CC__
28911	       not a universal capable compiler
28912	     #endif
28913	     typedef int dummy;
28914
28915_ACEOF
28916if ac_fn_cxx_try_compile "$LINENO"; then :
28917
28918	# Check for potential -arch flags.  It is not universal unless
28919	# there are at least two -arch flags with different values.
28920	ac_arch=
28921	ac_prev=
28922	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28923	 if test -n "$ac_prev"; then
28924	   case $ac_word in
28925	     i?86 | x86_64 | ppc | ppc64)
28926	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28927		 ac_arch=$ac_word
28928	       else
28929		 ac_cv_c_bigendian=universal
28930		 break
28931	       fi
28932	       ;;
28933	   esac
28934	   ac_prev=
28935	 elif test "x$ac_word" = "x-arch"; then
28936	   ac_prev=arch
28937	 fi
28938       done
28939fi
28940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28941    if test $ac_cv_c_bigendian = unknown; then
28942      # See if sys/param.h defines the BYTE_ORDER macro.
28943      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28944/* end confdefs.h.  */
28945#include <sys/types.h>
28946	     #include <sys/param.h>
28947
28948int
28949main ()
28950{
28951#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28952		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28953		     && LITTLE_ENDIAN)
28954	      bogus endian macros
28955	     #endif
28956
28957  ;
28958  return 0;
28959}
28960_ACEOF
28961if ac_fn_cxx_try_compile "$LINENO"; then :
28962  # It does; now see whether it defined to BIG_ENDIAN or not.
28963	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28964/* end confdefs.h.  */
28965#include <sys/types.h>
28966		#include <sys/param.h>
28967
28968int
28969main ()
28970{
28971#if BYTE_ORDER != BIG_ENDIAN
28972		 not big endian
28973		#endif
28974
28975  ;
28976  return 0;
28977}
28978_ACEOF
28979if ac_fn_cxx_try_compile "$LINENO"; then :
28980  ac_cv_c_bigendian=yes
28981else
28982  ac_cv_c_bigendian=no
28983fi
28984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28985fi
28986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28987    fi
28988    if test $ac_cv_c_bigendian = unknown; then
28989      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28990      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28991/* end confdefs.h.  */
28992#include <limits.h>
28993
28994int
28995main ()
28996{
28997#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28998	      bogus endian macros
28999	     #endif
29000
29001  ;
29002  return 0;
29003}
29004_ACEOF
29005if ac_fn_cxx_try_compile "$LINENO"; then :
29006  # It does; now see whether it defined to _BIG_ENDIAN or not.
29007	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29008/* end confdefs.h.  */
29009#include <limits.h>
29010
29011int
29012main ()
29013{
29014#ifndef _BIG_ENDIAN
29015		 not big endian
29016		#endif
29017
29018  ;
29019  return 0;
29020}
29021_ACEOF
29022if ac_fn_cxx_try_compile "$LINENO"; then :
29023  ac_cv_c_bigendian=yes
29024else
29025  ac_cv_c_bigendian=no
29026fi
29027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29028fi
29029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29030    fi
29031    if test $ac_cv_c_bigendian = unknown; then
29032      # Compile a test program.
29033      if test "$cross_compiling" = yes; then :
29034  # Try to guess by grepping values from an object file.
29035	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29036/* end confdefs.h.  */
29037short int ascii_mm[] =
29038		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29039		short int ascii_ii[] =
29040		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29041		int use_ascii (int i) {
29042		  return ascii_mm[i] + ascii_ii[i];
29043		}
29044		short int ebcdic_ii[] =
29045		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29046		short int ebcdic_mm[] =
29047		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29048		int use_ebcdic (int i) {
29049		  return ebcdic_mm[i] + ebcdic_ii[i];
29050		}
29051		extern int foo;
29052
29053int
29054main ()
29055{
29056return use_ascii (foo) == use_ebcdic (foo);
29057  ;
29058  return 0;
29059}
29060_ACEOF
29061if ac_fn_cxx_try_compile "$LINENO"; then :
29062  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29063	      ac_cv_c_bigendian=yes
29064	    fi
29065	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29066	      if test "$ac_cv_c_bigendian" = unknown; then
29067		ac_cv_c_bigendian=no
29068	      else
29069		# finding both strings is unlikely to happen, but who knows?
29070		ac_cv_c_bigendian=unknown
29071	      fi
29072	    fi
29073fi
29074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29075else
29076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077/* end confdefs.h.  */
29078$ac_includes_default
29079int
29080main ()
29081{
29082
29083	     /* Are we little or big endian?  From Harbison&Steele.  */
29084	     union
29085	     {
29086	       long int l;
29087	       char c[sizeof (long int)];
29088	     } u;
29089	     u.l = 1;
29090	     return u.c[sizeof (long int) - 1] == 1;
29091
29092  ;
29093  return 0;
29094}
29095_ACEOF
29096if ac_fn_cxx_try_run "$LINENO"; then :
29097  ac_cv_c_bigendian=no
29098else
29099  ac_cv_c_bigendian=yes
29100fi
29101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29102  conftest.$ac_objext conftest.beam conftest.$ac_ext
29103fi
29104
29105    fi
29106fi
29107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29108$as_echo "$ac_cv_c_bigendian" >&6; }
29109 case $ac_cv_c_bigendian in #(
29110   yes)
29111     ENDIAN="big";; #(
29112   no)
29113     ENDIAN="little" ;; #(
29114   universal)
29115     ENDIAN="universal_endianness"
29116     ;; #(
29117   *)
29118     ENDIAN="unknown" ;;
29119 esac
29120
29121
29122  if test "x$ENDIAN" = xuniversal_endianness; then
29123    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29124  fi
29125  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29126    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
29127  fi
29128
29129
29130# Configure flags for the tools
29131
29132
29133  ###############################################################################
29134  #
29135  # How to compile shared libraries.
29136  #
29137
29138  if test "x$GCC" = xyes; then
29139    COMPILER_NAME=gcc
29140    PICFLAG="-fPIC"
29141    LIBRARY_PREFIX=lib
29142    SHARED_LIBRARY='lib$1.so'
29143    STATIC_LIBRARY='lib$1.a'
29144    SHARED_LIBRARY_FLAGS="-shared"
29145    SHARED_LIBRARY_SUFFIX='.so'
29146    STATIC_LIBRARY_SUFFIX='.a'
29147    OBJ_SUFFIX='.o'
29148    EXE_SUFFIX=''
29149    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29150    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29151    C_FLAG_REORDER=''
29152    CXX_FLAG_REORDER=''
29153    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29154    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29155    LD="$CC"
29156    LDEXE="$CC"
29157    LDCXX="$CXX"
29158    LDEXECXX="$CXX"
29159    POST_STRIP_CMD="$STRIP -g"
29160
29161    # Linking is different on MacOSX
29162    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29163      # Might change in the future to clang.
29164      COMPILER_NAME=gcc
29165      SHARED_LIBRARY='lib$1.dylib'
29166      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29167      SHARED_LIBRARY_SUFFIX='.dylib'
29168      EXE_SUFFIX=''
29169      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29170      SET_SHARED_LIBRARY_MAPFILE=''
29171      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29172      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29173      POST_STRIP_CMD="$STRIP -S"
29174    fi
29175  else
29176    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29177      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29178      COMPILER_NAME=ossc
29179      PICFLAG="-KPIC"
29180      LIBRARY_PREFIX=lib
29181      SHARED_LIBRARY='lib$1.so'
29182      STATIC_LIBRARY='lib$1.a'
29183      SHARED_LIBRARY_FLAGS="-G"
29184      SHARED_LIBRARY_SUFFIX='.so'
29185      STATIC_LIBRARY_SUFFIX='.a'
29186      OBJ_SUFFIX='.o'
29187      EXE_SUFFIX=''
29188      SET_SHARED_LIBRARY_NAME=''
29189      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29190      C_FLAG_REORDER='-xF'
29191      CXX_FLAG_REORDER='-xF'
29192      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29193      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29194      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29195      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29196      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29197      POST_STRIP_CMD="$STRIP -x"
29198      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29199    fi
29200    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29201      # If it is not gcc, then assume it is the MS Visual Studio compiler
29202      COMPILER_NAME=cl
29203      PICFLAG=""
29204      LIBRARY_PREFIX=
29205      SHARED_LIBRARY='$1.dll'
29206      STATIC_LIBRARY='$1.lib'
29207      SHARED_LIBRARY_FLAGS="-LD"
29208      SHARED_LIBRARY_SUFFIX='.dll'
29209      STATIC_LIBRARY_SUFFIX='.lib'
29210      OBJ_SUFFIX='.obj'
29211      EXE_SUFFIX='.exe'
29212      SET_SHARED_LIBRARY_NAME=''
29213      SET_SHARED_LIBRARY_MAPFILE=''
29214      SET_SHARED_LIBRARY_ORIGIN=''
29215      SET_EXECUTABLE_ORIGIN=''
29216    fi
29217  fi
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237  # The (cross) compiler is now configured, we can now test capabilities
29238  # of the target platform.
29239
29240
29241
29242  ###############################################################################
29243  #
29244  # Setup the opt flags for different compilers
29245  # and different operating systems.
29246  #
29247
29248  #
29249  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29250  #
29251  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29252    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29253    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29254    CFLAGS="$CFLAGS -mstackrealign"
29255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29256$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29257    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29258/* end confdefs.h.  */
29259int main() { return 0; }
29260_ACEOF
29261if ac_fn_cxx_try_link "$LINENO"; then :
29262
29263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29264$as_echo "yes" >&6; }
29265
29266else
29267
29268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29269$as_echo "no" >&6; }
29270          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29271
29272
29273fi
29274rm -f core conftest.err conftest.$ac_objext \
29275    conftest$ac_exeext conftest.$ac_ext
29276  fi
29277
29278  C_FLAG_DEPS="-MMD -MF"
29279  CXX_FLAG_DEPS="-MMD -MF"
29280
29281  case $COMPILER_TYPE in
29282    CC )
29283      case $COMPILER_NAME in
29284        gcc )
29285          case $OPENJDK_TARGET_OS in
29286            macosx )
29287              # On MacOSX we optimize for size, something
29288              # we should do for all platforms?
29289              C_O_FLAG_HI="-Os"
29290              C_O_FLAG_NORM="-Os"
29291              C_O_FLAG_NONE=""
29292              ;;
29293            *)
29294              C_O_FLAG_HI="-O3"
29295              C_O_FLAG_NORM="-O2"
29296              C_O_FLAG_NONE="-O0"
29297              ;;
29298          esac
29299          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29300          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29301          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29302          CFLAGS_DEBUG_SYMBOLS="-g"
29303          CXXFLAGS_DEBUG_SYMBOLS="-g"
29304          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29305            CFLAGS_DEBUG_SYMBOLS="-g1"
29306            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29307          fi
29308          ;;
29309        ossc )
29310          #
29311          # Forte has different names for this with their C++ compiler...
29312          #
29313          C_FLAG_DEPS="-xMMD -xMF"
29314          CXX_FLAG_DEPS="-xMMD -xMF"
29315
29316          # Extra options used with HIGHEST
29317          #
29318          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29319          #          done with care, there are some assumptions below that need to
29320          #          be understood about the use of pointers, and IEEE behavior.
29321          #
29322          # Use non-standard floating point mode (not IEEE 754)
29323          CC_HIGHEST="$CC_HIGHEST -fns"
29324          # Do some simplification of floating point arithmetic (not IEEE 754)
29325          CC_HIGHEST="$CC_HIGHEST -fsimple"
29326          # Use single precision floating point with 'float'
29327          CC_HIGHEST="$CC_HIGHEST -fsingle"
29328          # Assume memory references via basic pointer types do not alias
29329          #   (Source with excessing pointer casting and data access with mixed
29330          #    pointer types are not recommended)
29331          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29332          # Use intrinsic or inline versions for math/std functions
29333          #   (If you expect perfect errno behavior, do not use this)
29334          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29335          # Loop data dependency optimizations (need -xO3 or higher)
29336          CC_HIGHEST="$CC_HIGHEST -xdepend"
29337          # Pointer parameters to functions do not overlap
29338          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29339          #    If you pass in multiple pointers to the same data, do not use this)
29340          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29341          # Inline some library routines
29342          #   (If you expect perfect errno behavior, do not use this)
29343          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29344          # Use optimized math routines
29345          #   (If you expect perfect errno behavior, do not use this)
29346          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29347          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29348
29349          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29350            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29351            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29352          fi
29353
29354          case $OPENJDK_TARGET_CPU_ARCH in
29355            x86)
29356              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29357              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29358              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29359              C_O_FLAG_NONE="-xregs=no%frameptr"
29360              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29361              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29362              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29363              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29364              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29365                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29366                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29367              fi
29368              ;;
29369            sparc)
29370              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29371              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29372              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29373              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29374              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29375              C_O_FLAG_NONE=""
29376              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29377              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29378              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29379              CXX_O_FLAG_NONE=""
29380              ;;
29381          esac
29382
29383          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29384          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29385      esac
29386      ;;
29387    CL )
29388      C_O_FLAG_HIGHEST="-O2"
29389      C_O_FLAG_HI="-O1"
29390      C_O_FLAG_NORM="-O1"
29391      C_O_FLAG_NONE="-Od"
29392      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29393      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29394      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29395      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29396      ;;
29397  esac
29398
29399  if test -z "$C_O_FLAG_HIGHEST"; then
29400    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29401  fi
29402
29403  if test -z "$CXX_O_FLAG_HIGHEST"; then
29404    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29405  fi
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29421    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29422$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29423  fi
29424
29425  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29426    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29427$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29428  fi
29429
29430  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29431    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29432$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29433  fi
29434
29435
29436# Check whether --with-extra-cflags was given.
29437if test "${with_extra_cflags+set}" = set; then :
29438  withval=$with_extra_cflags;
29439fi
29440
29441
29442
29443# Check whether --with-extra-cxxflags was given.
29444if test "${with_extra_cxxflags+set}" = set; then :
29445  withval=$with_extra_cxxflags;
29446fi
29447
29448
29449
29450# Check whether --with-extra-ldflags was given.
29451if test "${with_extra_ldflags+set}" = set; then :
29452  withval=$with_extra_ldflags;
29453fi
29454
29455
29456  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29457  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29458  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29459
29460  # Hotspot needs these set in their legacy form
29461  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29462  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29463  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29464
29465
29466
29467
29468
29469  ###############################################################################
29470  #
29471  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29472  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29473  #
29474  case $COMPILER_NAME in
29475    gcc )
29476      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29477      -pipe \
29478      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29479      case $OPENJDK_TARGET_CPU_ARCH in
29480        arm )
29481          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29482          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29483          ;;
29484        ppc )
29485          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29486          ;;
29487        * )
29488          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29489          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29490          ;;
29491      esac
29492      ;;
29493    ossc )
29494      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29495      case $OPENJDK_TARGET_CPU_ARCH in
29496        x86 )
29497          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29498          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29499          ;;
29500      esac
29501
29502      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29503      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29504
29505      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29506      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29507      ;;
29508    cl )
29509      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29510      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29511      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29512      -DWIN32 -DIAL"
29513      case $OPENJDK_TARGET_CPU in
29514        x86 )
29515          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29516          ;;
29517        x86_64 )
29518          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29519          ;;
29520      esac
29521      ;;
29522  esac
29523
29524  ###############################################################################
29525
29526  # Adjust flags according to debug level.
29527  case $DEBUG_LEVEL in
29528    fastdebug )
29529      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29530      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29531      C_O_FLAG_HI="$C_O_FLAG_NORM"
29532      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29533      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29534      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29535      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29536      ;;
29537    slowdebug )
29538      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29539      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29540      C_O_FLAG_HI="$C_O_FLAG_NONE"
29541      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29542      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29543      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29544      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29545      ;;
29546  esac
29547
29548  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29549
29550  # The package path is used only on macosx?
29551  PACKAGE_PATH=/opt/local
29552
29553
29554  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29555    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29556    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29557    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29558    #   Note: -Dmacro         is the same as    #define macro 1
29559    #         -Dmacro=        is the same as    #define macro
29560    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29561      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29562    else
29563      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29564    fi
29565  else
29566    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29567  fi
29568  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29569    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29570  fi
29571  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29572    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29573  fi
29574  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29575    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29576  fi
29577  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29578    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29579    # Setting these parameters makes it an error to link to macosx APIs that are
29580    # newer than the given OS version and makes the linked binaries compatible even
29581    # if built on a newer version of the OS.
29582    # The expected format is X.Y.Z
29583    MACOSX_VERSION_MIN=10.7.0
29584
29585    # The macro takes the version with no dots, ex: 1070
29586    # Let the flags variables get resolved in make for easier override on make
29587    # command line.
29588    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29589    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29590  fi
29591  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29592    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29593  fi
29594  if test "x$DEBUG_LEVEL" = xrelease; then
29595    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29596  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29597    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29598  fi
29599  else
29600    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29601  fi
29602
29603  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29604  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29605
29606  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29607      -I${JDK_OUTPUTDIR}/include \
29608      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29609      -I${JDK_TOPDIR}/src/share/javavm/export \
29610      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29611      -I${JDK_TOPDIR}/src/share/native/common \
29612      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29613
29614  # The shared libraries are compiled using the picflag.
29615  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29616  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29617
29618  # Executable flags
29619  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29620  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29621
29622  # Now this is odd. The JDK native libraries have to link against libjvm.so
29623  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29624  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29625  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29626  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29627  # libraries will link to whatever is in memory. Yuck.
29628  #
29629  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29630  if test "x$COMPILER_NAME" = xcl; then
29631    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29632    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29633      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29634    fi
29635    # TODO: make -debug optional "--disable-full-debug-symbols"
29636    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29637    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29638    LDFLAGS_JDKLIB_SUFFIX=""
29639    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29640      LDFLAGS_STACK_SIZE=1048576
29641    else
29642      LDFLAGS_STACK_SIZE=327680
29643    fi
29644    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29645  else
29646    if test "x$COMPILER_NAME" = xgcc; then
29647      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29648      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29649      if test -n "$HAS_GNU_HASH"; then
29650        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29651      fi
29652      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29653        # And since we now know that the linker is gnu, then add -z defs, to forbid
29654        # undefined symbols in object files.
29655        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29656        if test "x$DEBUG_LEVEL" = "xrelease"; then
29657          # When building release libraries, tell the linker optimize them.
29658          # Should this be supplied to the OSS linker as well?
29659          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29660        fi
29661      fi
29662    fi
29663    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29664        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29665
29666    # On some platforms (mac) the linker warns about non existing -L dirs.
29667    # Add server first if available. Linking aginst client does not always produce the same results.
29668    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29669    # Default to server for other variants.
29670    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29671      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29672    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29673      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29674    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29675      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29676    else
29677      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29678    fi
29679
29680    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29681    if test "x$COMPILER_NAME" = xossc; then
29682      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29683    fi
29684
29685    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29686    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29687      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29688    fi
29689  fi
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705  # Some Zero and Shark settings.
29706  # ZERO_ARCHFLAG tells the compiler which mode to build for
29707  case "${OPENJDK_TARGET_CPU}" in
29708    s390)
29709      ZERO_ARCHFLAG="-m31"
29710      ;;
29711    *)
29712      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29713  esac
29714
29715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29716$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29717  supports=yes
29718
29719  saved_cflags="$CFLAGS"
29720  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29721  ac_ext=c
29722ac_cpp='$CPP $CPPFLAGS'
29723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29725ac_compiler_gnu=$ac_cv_c_compiler_gnu
29726
29727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29728/* end confdefs.h.  */
29729int i;
29730_ACEOF
29731if ac_fn_c_try_compile "$LINENO"; then :
29732
29733else
29734  supports=no
29735fi
29736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29737  ac_ext=cpp
29738ac_cpp='$CXXCPP $CPPFLAGS'
29739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29742
29743  CFLAGS="$saved_cflags"
29744
29745  saved_cxxflags="$CXXFLAGS"
29746  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29747  ac_ext=cpp
29748ac_cpp='$CXXCPP $CPPFLAGS'
29749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29752
29753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29754/* end confdefs.h.  */
29755int i;
29756_ACEOF
29757if ac_fn_cxx_try_compile "$LINENO"; then :
29758
29759else
29760  supports=no
29761fi
29762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29763  ac_ext=cpp
29764ac_cpp='$CXXCPP $CPPFLAGS'
29765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29768
29769  CXXFLAGS="$saved_cxxflags"
29770
29771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29772$as_echo "$supports" >&6; }
29773  if test "x$supports" = "xyes" ; then
29774    :
29775  else
29776    ZERO_ARCHFLAG=""
29777  fi
29778
29779
29780
29781  # Check that the compiler supports -mX flags
29782  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29783
29784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29785$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29786  supports=yes
29787
29788  saved_cflags="$CFLAGS"
29789  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29790  ac_ext=c
29791ac_cpp='$CPP $CPPFLAGS'
29792ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29793ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29794ac_compiler_gnu=$ac_cv_c_compiler_gnu
29795
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798int i;
29799_ACEOF
29800if ac_fn_c_try_compile "$LINENO"; then :
29801
29802else
29803  supports=no
29804fi
29805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29806  ac_ext=cpp
29807ac_cpp='$CXXCPP $CPPFLAGS'
29808ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29809ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29810ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29811
29812  CFLAGS="$saved_cflags"
29813
29814  saved_cxxflags="$CXXFLAGS"
29815  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29816  ac_ext=cpp
29817ac_cpp='$CXXCPP $CPPFLAGS'
29818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29821
29822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29823/* end confdefs.h.  */
29824int i;
29825_ACEOF
29826if ac_fn_cxx_try_compile "$LINENO"; then :
29827
29828else
29829  supports=no
29830fi
29831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29832  ac_ext=cpp
29833ac_cpp='$CXXCPP $CPPFLAGS'
29834ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29835ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29836ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29837
29838  CXXFLAGS="$saved_cxxflags"
29839
29840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29841$as_echo "$supports" >&6; }
29842  if test "x$supports" = "xyes" ; then
29843    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29844  else
29845    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29846  fi
29847
29848
29849
29850
29851# Setup debug symbols (need objcopy from the toolchain for that)
29852
29853  #
29854  # ENABLE_DEBUG_SYMBOLS
29855  # This must be done after the toolchain is setup, since we're looking at objcopy.
29856  #
29857  # Check whether --enable-debug-symbols was given.
29858if test "${enable_debug_symbols+set}" = set; then :
29859  enableval=$enable_debug_symbols;
29860fi
29861
29862
29863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29864$as_echo_n "checking if we should generate debug symbols... " >&6; }
29865
29866  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29867    # explicit enabling of enable-debug-symbols and can't find objcopy
29868    #   this is an error
29869    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29870  fi
29871
29872  if test "x$enable_debug_symbols" = "xyes"; then
29873    ENABLE_DEBUG_SYMBOLS=true
29874  elif test "x$enable_debug_symbols" = "xno"; then
29875    ENABLE_DEBUG_SYMBOLS=false
29876  else
29877    # Default is on if objcopy is found
29878    if test "x$OBJCOPY" != x; then
29879      ENABLE_DEBUG_SYMBOLS=true
29880    # MacOS X and Windows don't use objcopy but default is on for those OSes
29881    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
29882      ENABLE_DEBUG_SYMBOLS=true
29883    else
29884      ENABLE_DEBUG_SYMBOLS=false
29885    fi
29886  fi
29887
29888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29889$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29890
29891  #
29892  # ZIP_DEBUGINFO_FILES
29893  #
29894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29895$as_echo_n "checking if we should zip debug-info files... " >&6; }
29896  # Check whether --enable-zip-debug-info was given.
29897if test "${enable_zip_debug_info+set}" = set; then :
29898  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29899else
29900  enable_zip_debug_info="yes"
29901fi
29902
29903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29904$as_echo "${enable_zip_debug_info}" >&6; }
29905
29906  if test "x${enable_zip_debug_info}" = "xno"; then
29907    ZIP_DEBUGINFO_FILES=false
29908  else
29909    ZIP_DEBUGINFO_FILES=true
29910  fi
29911
29912
29913
29914
29915
29916
29917
29918###############################################################################
29919#
29920# Check dependencies for external and internal libraries.
29921#
29922###############################################################################
29923
29924# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
29925
29926  # When using cygwin or msys, we need a wrapper binary that renames
29927  # /cygdrive/c/ arguments into c:/ arguments and peeks into
29928  # @files and rewrites these too! This wrapper binary is
29929  # called fixpath.
29930  FIXPATH=
29931  if test "x$OPENJDK_BUILD_OS" = xwindows; then
29932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
29933$as_echo_n "checking if fixpath can be created... " >&6; }
29934    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
29935    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
29936    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
29937      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
29938      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
29939      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
29940      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
29941    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
29942      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
29943      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
29944
29945      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
29946      # @ was chosen as separator to minimize risk of other tools messing around with it
29947      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
29948      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
29949
29950      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
29951    fi
29952    rm -f $OUTPUT_ROOT/fixpath*
29953    cd $OUTPUT_ROOT
29954    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
29955    cd $CURDIR
29956
29957    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
29958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29959$as_echo "no" >&6; }
29960      cat $OUTPUT_ROOT/fixpath1.log
29961      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
29962    fi
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29964$as_echo "yes" >&6; }
29965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
29966$as_echo_n "checking if fixpath.exe works... " >&6; }
29967    cd $OUTPUT_ROOT
29968    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
29969    cd $CURDIR
29970    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
29971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29972$as_echo "no" >&6; }
29973      cat $OUTPUT_ROOT/fixpath2.log
29974      as_fn_error $? "fixpath did not work!" "$LINENO" 5
29975    fi
29976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29977$as_echo "yes" >&6; }
29978    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
29979  fi
29980
29981
29982
29983
29984
29985
29986  ###############################################################################
29987  #
29988  # OS specific settings that we never will need to probe.
29989  #
29990  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29992$as_echo_n "checking what is not needed on Linux?... " >&6; }
29993    PULSE_NOT_NEEDED=yes
29994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29995$as_echo "pulse" >&6; }
29996  fi
29997
29998  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30000$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30001    ALSA_NOT_NEEDED=yes
30002    PULSE_NOT_NEEDED=yes
30003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30004$as_echo "alsa pulse" >&6; }
30005  fi
30006
30007  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30009$as_echo_n "checking what is not needed on Windows?... " >&6; }
30010    CUPS_NOT_NEEDED=yes
30011    ALSA_NOT_NEEDED=yes
30012    PULSE_NOT_NEEDED=yes
30013    X11_NOT_NEEDED=yes
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30015$as_echo "alsa cups pulse x11" >&6; }
30016  fi
30017
30018  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30020$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30021    ALSA_NOT_NEEDED=yes
30022    PULSE_NOT_NEEDED=yes
30023    X11_NOT_NEEDED=yes
30024    # If the java runtime framework is disabled, then we need X11.
30025    # This will be adjusted below.
30026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30027$as_echo "alsa pulse x11" >&6; }
30028  fi
30029
30030  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30032$as_echo_n "checking what is not needed on bsd?... " >&6; }
30033    ALSA_NOT_NEEDED=yes
30034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30035$as_echo "alsa" >&6; }
30036  fi
30037
30038  if test "x$OPENJDK" = "xfalse"; then
30039    FREETYPE_NOT_NEEDED=yes
30040  fi
30041
30042  if test "x$SUPPORT_HEADFUL" = xno; then
30043    X11_NOT_NEEDED=yes
30044  fi
30045
30046  ###############################################################################
30047  #
30048  # Check for MacOSX support for OpenJDK.
30049  #
30050
30051
30052  # Check whether --enable-macosx-runtime-support was given.
30053if test "${enable_macosx_runtime_support+set}" = set; then :
30054  enableval=$enable_macosx_runtime_support;
30055fi
30056
30057  if test "x$enable_macosx_runtime_support" != x; then
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30059$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30060  fi
30061
30062
30063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30064$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30065  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30067$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30068  else
30069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30070$as_echo "no" >&6; }
30071  fi
30072
30073
30074
30075  ###############################################################################
30076  #
30077  # Check for X Windows
30078  #
30079
30080  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30081  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30082  # --x-libraries for the sysroot, if that seems to be correct.
30083  if test "x$SYS_ROOT" != "x/"; then
30084    if test "x$x_includes" = xNONE; then
30085      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30086        x_includes="$SYS_ROOT/usr/X11R6/include"
30087      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30088        x_includes="$SYS_ROOT/usr/include"
30089      fi
30090    fi
30091    if test "x$x_libraries" = xNONE; then
30092      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30093        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30094      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30095        x_libraries="$SYS_ROOT/usr/lib64"
30096      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30097        x_libraries="$SYS_ROOT/usr/lib"
30098      fi
30099    fi
30100  fi
30101
30102  # Now let autoconf do it's magic
30103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30104$as_echo_n "checking for X... " >&6; }
30105
30106
30107# Check whether --with-x was given.
30108if test "${with_x+set}" = set; then :
30109  withval=$with_x;
30110fi
30111
30112# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30113if test "x$with_x" = xno; then
30114  # The user explicitly disabled X.
30115  have_x=disabled
30116else
30117  case $x_includes,$x_libraries in #(
30118    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30119    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30120  $as_echo_n "(cached) " >&6
30121else
30122  # One or both of the vars are not set, and there is no cached value.
30123ac_x_includes=no ac_x_libraries=no
30124rm -f -r conftest.dir
30125if mkdir conftest.dir; then
30126  cd conftest.dir
30127  cat >Imakefile <<'_ACEOF'
30128incroot:
30129	@echo incroot='${INCROOT}'
30130usrlibdir:
30131	@echo usrlibdir='${USRLIBDIR}'
30132libdir:
30133	@echo libdir='${LIBDIR}'
30134_ACEOF
30135  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30136    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30137    for ac_var in incroot usrlibdir libdir; do
30138      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30139    done
30140    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30141    for ac_extension in a so sl dylib la dll; do
30142      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30143	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30144	ac_im_usrlibdir=$ac_im_libdir; break
30145      fi
30146    done
30147    # Screen out bogus values from the imake configuration.  They are
30148    # bogus both because they are the default anyway, and because
30149    # using them would break gcc on systems where it needs fixed includes.
30150    case $ac_im_incroot in
30151	/usr/include) ac_x_includes= ;;
30152	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30153    esac
30154    case $ac_im_usrlibdir in
30155	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30156	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30157    esac
30158  fi
30159  cd ..
30160  rm -f -r conftest.dir
30161fi
30162
30163# Standard set of common directories for X headers.
30164# Check X11 before X11Rn because it is often a symlink to the current release.
30165ac_x_header_dirs='
30166/usr/X11/include
30167/usr/X11R7/include
30168/usr/X11R6/include
30169/usr/X11R5/include
30170/usr/X11R4/include
30171
30172/usr/include/X11
30173/usr/include/X11R7
30174/usr/include/X11R6
30175/usr/include/X11R5
30176/usr/include/X11R4
30177
30178/usr/local/X11/include
30179/usr/local/X11R7/include
30180/usr/local/X11R6/include
30181/usr/local/X11R5/include
30182/usr/local/X11R4/include
30183
30184/usr/local/include/X11
30185/usr/local/include/X11R7
30186/usr/local/include/X11R6
30187/usr/local/include/X11R5
30188/usr/local/include/X11R4
30189
30190/usr/X386/include
30191/usr/x386/include
30192/usr/XFree86/include/X11
30193
30194/usr/include
30195/usr/local/include
30196/usr/unsupported/include
30197/usr/athena/include
30198/usr/local/x11r5/include
30199/usr/lpp/Xamples/include
30200
30201/usr/openwin/include
30202/usr/openwin/share/include'
30203
30204if test "$ac_x_includes" = no; then
30205  # Guess where to find include files, by looking for Xlib.h.
30206  # First, try using that file with no special directory specified.
30207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30208/* end confdefs.h.  */
30209#include <X11/Xlib.h>
30210_ACEOF
30211if ac_fn_cxx_try_cpp "$LINENO"; then :
30212  # We can compile using X headers with no special include directory.
30213ac_x_includes=
30214else
30215  for ac_dir in $ac_x_header_dirs; do
30216  if test -r "$ac_dir/X11/Xlib.h"; then
30217    ac_x_includes=$ac_dir
30218    break
30219  fi
30220done
30221fi
30222rm -f conftest.err conftest.i conftest.$ac_ext
30223fi # $ac_x_includes = no
30224
30225if test "$ac_x_libraries" = no; then
30226  # Check for the libraries.
30227  # See if we find them without any special options.
30228  # Don't add to $LIBS permanently.
30229  ac_save_LIBS=$LIBS
30230  LIBS="-lX11 $LIBS"
30231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30232/* end confdefs.h.  */
30233#include <X11/Xlib.h>
30234int
30235main ()
30236{
30237XrmInitialize ()
30238  ;
30239  return 0;
30240}
30241_ACEOF
30242if ac_fn_cxx_try_link "$LINENO"; then :
30243  LIBS=$ac_save_LIBS
30244# We can link X programs with no special library path.
30245ac_x_libraries=
30246else
30247  LIBS=$ac_save_LIBS
30248for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30249do
30250  # Don't even attempt the hair of trying to link an X program!
30251  for ac_extension in a so sl dylib la dll; do
30252    if test -r "$ac_dir/libX11.$ac_extension"; then
30253      ac_x_libraries=$ac_dir
30254      break 2
30255    fi
30256  done
30257done
30258fi
30259rm -f core conftest.err conftest.$ac_objext \
30260    conftest$ac_exeext conftest.$ac_ext
30261fi # $ac_x_libraries = no
30262
30263case $ac_x_includes,$ac_x_libraries in #(
30264  no,* | *,no | *\'*)
30265    # Didn't find X, or a directory has "'" in its name.
30266    ac_cv_have_x="have_x=no";; #(
30267  *)
30268    # Record where we found X for the cache.
30269    ac_cv_have_x="have_x=yes\
30270	ac_x_includes='$ac_x_includes'\
30271	ac_x_libraries='$ac_x_libraries'"
30272esac
30273fi
30274;; #(
30275    *) have_x=yes;;
30276  esac
30277  eval "$ac_cv_have_x"
30278fi # $with_x != no
30279
30280if test "$have_x" != yes; then
30281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30282$as_echo "$have_x" >&6; }
30283  no_x=yes
30284else
30285  # If each of the values was on the command line, it overrides each guess.
30286  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30287  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30288  # Update the cache value to reflect the command line values.
30289  ac_cv_have_x="have_x=yes\
30290	ac_x_includes='$x_includes'\
30291	ac_x_libraries='$x_libraries'"
30292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30293$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30294fi
30295
30296  if test "$no_x" = yes; then
30297  # Not all programs may use this symbol, but it does not hurt to define it.
30298
30299$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30300
30301  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30302else
30303  if test -n "$x_includes"; then
30304    X_CFLAGS="$X_CFLAGS -I$x_includes"
30305  fi
30306
30307  # It would also be nice to do this for all -L options, not just this one.
30308  if test -n "$x_libraries"; then
30309    X_LIBS="$X_LIBS -L$x_libraries"
30310    # For Solaris; some versions of Sun CC require a space after -R and
30311    # others require no space.  Words are not sufficient . . . .
30312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30313$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30314    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30315    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30316    ac_cxx_werror_flag=yes
30317    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30318/* end confdefs.h.  */
30319
30320int
30321main ()
30322{
30323
30324  ;
30325  return 0;
30326}
30327_ACEOF
30328if ac_fn_cxx_try_link "$LINENO"; then :
30329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30330$as_echo "no" >&6; }
30331       X_LIBS="$X_LIBS -R$x_libraries"
30332else
30333  LIBS="$ac_xsave_LIBS -R $x_libraries"
30334       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30335/* end confdefs.h.  */
30336
30337int
30338main ()
30339{
30340
30341  ;
30342  return 0;
30343}
30344_ACEOF
30345if ac_fn_cxx_try_link "$LINENO"; then :
30346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30347$as_echo "yes" >&6; }
30348	  X_LIBS="$X_LIBS -R $x_libraries"
30349else
30350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30351$as_echo "neither works" >&6; }
30352fi
30353rm -f core conftest.err conftest.$ac_objext \
30354    conftest$ac_exeext conftest.$ac_ext
30355fi
30356rm -f core conftest.err conftest.$ac_objext \
30357    conftest$ac_exeext conftest.$ac_ext
30358    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30359    LIBS=$ac_xsave_LIBS
30360  fi
30361
30362  # Check for system-dependent libraries X programs must link with.
30363  # Do this before checking for the system-independent R6 libraries
30364  # (-lICE), since we may need -lsocket or whatever for X linking.
30365
30366  if test "$ISC" = yes; then
30367    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30368  else
30369    # Martyn Johnson says this is needed for Ultrix, if the X
30370    # libraries were built with DECnet support.  And Karl Berry says
30371    # the Alpha needs dnet_stub (dnet does not exist).
30372    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30373    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30374/* end confdefs.h.  */
30375
30376/* Override any GCC internal prototype to avoid an error.
30377   Use char because int might match the return type of a GCC
30378   builtin and then its argument prototype would still apply.  */
30379#ifdef __cplusplus
30380extern "C"
30381#endif
30382char XOpenDisplay ();
30383int
30384main ()
30385{
30386return XOpenDisplay ();
30387  ;
30388  return 0;
30389}
30390_ACEOF
30391if ac_fn_cxx_try_link "$LINENO"; then :
30392
30393else
30394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30395$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30396if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30397  $as_echo_n "(cached) " >&6
30398else
30399  ac_check_lib_save_LIBS=$LIBS
30400LIBS="-ldnet  $LIBS"
30401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30402/* end confdefs.h.  */
30403
30404/* Override any GCC internal prototype to avoid an error.
30405   Use char because int might match the return type of a GCC
30406   builtin and then its argument prototype would still apply.  */
30407#ifdef __cplusplus
30408extern "C"
30409#endif
30410char dnet_ntoa ();
30411int
30412main ()
30413{
30414return dnet_ntoa ();
30415  ;
30416  return 0;
30417}
30418_ACEOF
30419if ac_fn_cxx_try_link "$LINENO"; then :
30420  ac_cv_lib_dnet_dnet_ntoa=yes
30421else
30422  ac_cv_lib_dnet_dnet_ntoa=no
30423fi
30424rm -f core conftest.err conftest.$ac_objext \
30425    conftest$ac_exeext conftest.$ac_ext
30426LIBS=$ac_check_lib_save_LIBS
30427fi
30428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30429$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30430if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30431  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30432fi
30433
30434    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30436$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30437if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30438  $as_echo_n "(cached) " >&6
30439else
30440  ac_check_lib_save_LIBS=$LIBS
30441LIBS="-ldnet_stub  $LIBS"
30442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30443/* end confdefs.h.  */
30444
30445/* Override any GCC internal prototype to avoid an error.
30446   Use char because int might match the return type of a GCC
30447   builtin and then its argument prototype would still apply.  */
30448#ifdef __cplusplus
30449extern "C"
30450#endif
30451char dnet_ntoa ();
30452int
30453main ()
30454{
30455return dnet_ntoa ();
30456  ;
30457  return 0;
30458}
30459_ACEOF
30460if ac_fn_cxx_try_link "$LINENO"; then :
30461  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30462else
30463  ac_cv_lib_dnet_stub_dnet_ntoa=no
30464fi
30465rm -f core conftest.err conftest.$ac_objext \
30466    conftest$ac_exeext conftest.$ac_ext
30467LIBS=$ac_check_lib_save_LIBS
30468fi
30469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30470$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30471if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30472  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30473fi
30474
30475    fi
30476fi
30477rm -f core conftest.err conftest.$ac_objext \
30478    conftest$ac_exeext conftest.$ac_ext
30479    LIBS="$ac_xsave_LIBS"
30480
30481    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30482    # to get the SysV transport functions.
30483    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30484    # needs -lnsl.
30485    # The nsl library prevents programs from opening the X display
30486    # on Irix 5.2, according to T.E. Dickey.
30487    # The functions gethostbyname, getservbyname, and inet_addr are
30488    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30489    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30490if test "x$ac_cv_func_gethostbyname" = xyes; then :
30491
30492fi
30493
30494    if test $ac_cv_func_gethostbyname = no; then
30495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30496$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30497if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30498  $as_echo_n "(cached) " >&6
30499else
30500  ac_check_lib_save_LIBS=$LIBS
30501LIBS="-lnsl  $LIBS"
30502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30503/* end confdefs.h.  */
30504
30505/* Override any GCC internal prototype to avoid an error.
30506   Use char because int might match the return type of a GCC
30507   builtin and then its argument prototype would still apply.  */
30508#ifdef __cplusplus
30509extern "C"
30510#endif
30511char gethostbyname ();
30512int
30513main ()
30514{
30515return gethostbyname ();
30516  ;
30517  return 0;
30518}
30519_ACEOF
30520if ac_fn_cxx_try_link "$LINENO"; then :
30521  ac_cv_lib_nsl_gethostbyname=yes
30522else
30523  ac_cv_lib_nsl_gethostbyname=no
30524fi
30525rm -f core conftest.err conftest.$ac_objext \
30526    conftest$ac_exeext conftest.$ac_ext
30527LIBS=$ac_check_lib_save_LIBS
30528fi
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30530$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30531if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30532  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30533fi
30534
30535      if test $ac_cv_lib_nsl_gethostbyname = no; then
30536	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30537$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30538if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30539  $as_echo_n "(cached) " >&6
30540else
30541  ac_check_lib_save_LIBS=$LIBS
30542LIBS="-lbsd  $LIBS"
30543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30544/* end confdefs.h.  */
30545
30546/* Override any GCC internal prototype to avoid an error.
30547   Use char because int might match the return type of a GCC
30548   builtin and then its argument prototype would still apply.  */
30549#ifdef __cplusplus
30550extern "C"
30551#endif
30552char gethostbyname ();
30553int
30554main ()
30555{
30556return gethostbyname ();
30557  ;
30558  return 0;
30559}
30560_ACEOF
30561if ac_fn_cxx_try_link "$LINENO"; then :
30562  ac_cv_lib_bsd_gethostbyname=yes
30563else
30564  ac_cv_lib_bsd_gethostbyname=no
30565fi
30566rm -f core conftest.err conftest.$ac_objext \
30567    conftest$ac_exeext conftest.$ac_ext
30568LIBS=$ac_check_lib_save_LIBS
30569fi
30570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30571$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30572if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30573  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30574fi
30575
30576      fi
30577    fi
30578
30579    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30580    # socket/setsockopt and other routines are undefined under SCO ODT
30581    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30582    # on later versions), says Simon Leinen: it contains gethostby*
30583    # variants that don't use the name server (or something).  -lsocket
30584    # must be given before -lnsl if both are needed.  We assume that
30585    # if connect needs -lnsl, so does gethostbyname.
30586    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30587if test "x$ac_cv_func_connect" = xyes; then :
30588
30589fi
30590
30591    if test $ac_cv_func_connect = no; then
30592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30593$as_echo_n "checking for connect in -lsocket... " >&6; }
30594if ${ac_cv_lib_socket_connect+:} false; then :
30595  $as_echo_n "(cached) " >&6
30596else
30597  ac_check_lib_save_LIBS=$LIBS
30598LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30600/* end confdefs.h.  */
30601
30602/* Override any GCC internal prototype to avoid an error.
30603   Use char because int might match the return type of a GCC
30604   builtin and then its argument prototype would still apply.  */
30605#ifdef __cplusplus
30606extern "C"
30607#endif
30608char connect ();
30609int
30610main ()
30611{
30612return connect ();
30613  ;
30614  return 0;
30615}
30616_ACEOF
30617if ac_fn_cxx_try_link "$LINENO"; then :
30618  ac_cv_lib_socket_connect=yes
30619else
30620  ac_cv_lib_socket_connect=no
30621fi
30622rm -f core conftest.err conftest.$ac_objext \
30623    conftest$ac_exeext conftest.$ac_ext
30624LIBS=$ac_check_lib_save_LIBS
30625fi
30626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30627$as_echo "$ac_cv_lib_socket_connect" >&6; }
30628if test "x$ac_cv_lib_socket_connect" = xyes; then :
30629  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30630fi
30631
30632    fi
30633
30634    # Guillermo Gomez says -lposix is necessary on A/UX.
30635    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30636if test "x$ac_cv_func_remove" = xyes; then :
30637
30638fi
30639
30640    if test $ac_cv_func_remove = no; then
30641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30642$as_echo_n "checking for remove in -lposix... " >&6; }
30643if ${ac_cv_lib_posix_remove+:} false; then :
30644  $as_echo_n "(cached) " >&6
30645else
30646  ac_check_lib_save_LIBS=$LIBS
30647LIBS="-lposix  $LIBS"
30648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30649/* end confdefs.h.  */
30650
30651/* Override any GCC internal prototype to avoid an error.
30652   Use char because int might match the return type of a GCC
30653   builtin and then its argument prototype would still apply.  */
30654#ifdef __cplusplus
30655extern "C"
30656#endif
30657char remove ();
30658int
30659main ()
30660{
30661return remove ();
30662  ;
30663  return 0;
30664}
30665_ACEOF
30666if ac_fn_cxx_try_link "$LINENO"; then :
30667  ac_cv_lib_posix_remove=yes
30668else
30669  ac_cv_lib_posix_remove=no
30670fi
30671rm -f core conftest.err conftest.$ac_objext \
30672    conftest$ac_exeext conftest.$ac_ext
30673LIBS=$ac_check_lib_save_LIBS
30674fi
30675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30676$as_echo "$ac_cv_lib_posix_remove" >&6; }
30677if test "x$ac_cv_lib_posix_remove" = xyes; then :
30678  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30679fi
30680
30681    fi
30682
30683    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30684    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30685if test "x$ac_cv_func_shmat" = xyes; then :
30686
30687fi
30688
30689    if test $ac_cv_func_shmat = no; then
30690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30691$as_echo_n "checking for shmat in -lipc... " >&6; }
30692if ${ac_cv_lib_ipc_shmat+:} false; then :
30693  $as_echo_n "(cached) " >&6
30694else
30695  ac_check_lib_save_LIBS=$LIBS
30696LIBS="-lipc  $LIBS"
30697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30698/* end confdefs.h.  */
30699
30700/* Override any GCC internal prototype to avoid an error.
30701   Use char because int might match the return type of a GCC
30702   builtin and then its argument prototype would still apply.  */
30703#ifdef __cplusplus
30704extern "C"
30705#endif
30706char shmat ();
30707int
30708main ()
30709{
30710return shmat ();
30711  ;
30712  return 0;
30713}
30714_ACEOF
30715if ac_fn_cxx_try_link "$LINENO"; then :
30716  ac_cv_lib_ipc_shmat=yes
30717else
30718  ac_cv_lib_ipc_shmat=no
30719fi
30720rm -f core conftest.err conftest.$ac_objext \
30721    conftest$ac_exeext conftest.$ac_ext
30722LIBS=$ac_check_lib_save_LIBS
30723fi
30724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30725$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30726if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30727  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30728fi
30729
30730    fi
30731  fi
30732
30733  # Check for libraries that X11R6 Xt/Xaw programs need.
30734  ac_save_LDFLAGS=$LDFLAGS
30735  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30736  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30737  # check for ICE first), but we must link in the order -lSM -lICE or
30738  # we get undefined symbols.  So assume we have SM if we have ICE.
30739  # These have to be linked with before -lX11, unlike the other
30740  # libraries we check for below, so use a different variable.
30741  # John Interrante, Karl Berry
30742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30743$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30744if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30745  $as_echo_n "(cached) " >&6
30746else
30747  ac_check_lib_save_LIBS=$LIBS
30748LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750/* end confdefs.h.  */
30751
30752/* Override any GCC internal prototype to avoid an error.
30753   Use char because int might match the return type of a GCC
30754   builtin and then its argument prototype would still apply.  */
30755#ifdef __cplusplus
30756extern "C"
30757#endif
30758char IceConnectionNumber ();
30759int
30760main ()
30761{
30762return IceConnectionNumber ();
30763  ;
30764  return 0;
30765}
30766_ACEOF
30767if ac_fn_cxx_try_link "$LINENO"; then :
30768  ac_cv_lib_ICE_IceConnectionNumber=yes
30769else
30770  ac_cv_lib_ICE_IceConnectionNumber=no
30771fi
30772rm -f core conftest.err conftest.$ac_objext \
30773    conftest$ac_exeext conftest.$ac_ext
30774LIBS=$ac_check_lib_save_LIBS
30775fi
30776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30777$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30778if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30779  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30780fi
30781
30782  LDFLAGS=$ac_save_LDFLAGS
30783
30784fi
30785
30786
30787  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30788  # this doesn't make sense so we remove it.
30789  if test "x$COMPILE_TYPE" = xcross; then
30790    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30791  fi
30792
30793  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30794
30795  # Print a helpful message on how to acquire the necessary build dependency.
30796  # x11 is the help tag: freetype, cups, pulse, alsa etc
30797  MISSING_DEPENDENCY=x11
30798
30799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30800    cygwin_help $MISSING_DEPENDENCY
30801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30802    msys_help $MISSING_DEPENDENCY
30803  else
30804    PKGHANDLER_COMMAND=
30805
30806    case $PKGHANDLER in
30807      apt-get)
30808        apt_help     $MISSING_DEPENDENCY ;;
30809      yum)
30810        yum_help     $MISSING_DEPENDENCY ;;
30811      port)
30812        port_help    $MISSING_DEPENDENCY ;;
30813      pkgutil)
30814        pkgutil_help $MISSING_DEPENDENCY ;;
30815      pkgadd)
30816        pkgadd_help  $MISSING_DEPENDENCY ;;
30817      * )
30818        break ;;
30819    esac
30820
30821    if test "x$PKGHANDLER_COMMAND" != x; then
30822      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30823    fi
30824  fi
30825
30826    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30827  fi
30828
30829  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30830    OPENWIN_HOME="/usr/openwin"
30831  fi
30832
30833
30834
30835  #
30836  # Weird Sol10 something check...TODO change to try compile
30837  #
30838  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30839    if test "`uname -r`" = "5.10"; then
30840      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30841        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30842      fi
30843    fi
30844  fi
30845
30846  ac_ext=c
30847ac_cpp='$CPP $CPPFLAGS'
30848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30850ac_compiler_gnu=$ac_cv_c_compiler_gnu
30851
30852  OLD_CFLAGS="$CFLAGS"
30853  CFLAGS="$CFLAGS $X_CFLAGS"
30854
30855  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30856  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30857do :
30858  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30859ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30860        # include <X11/Xlib.h>
30861        # include <X11/Xutil.h>
30862
30863
30864"
30865if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30866  cat >>confdefs.h <<_ACEOF
30867#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30868_ACEOF
30869 X11_A_OK=yes
30870else
30871  X11_A_OK=no; break
30872fi
30873
30874done
30875
30876
30877  CFLAGS="$OLD_CFLAGS"
30878  ac_ext=cpp
30879ac_cpp='$CXXCPP $CPPFLAGS'
30880ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30881ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30882ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30883
30884
30885  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30886
30887  # Print a helpful message on how to acquire the necessary build dependency.
30888  # x11 is the help tag: freetype, cups, pulse, alsa etc
30889  MISSING_DEPENDENCY=x11
30890
30891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30892    cygwin_help $MISSING_DEPENDENCY
30893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30894    msys_help $MISSING_DEPENDENCY
30895  else
30896    PKGHANDLER_COMMAND=
30897
30898    case $PKGHANDLER in
30899      apt-get)
30900        apt_help     $MISSING_DEPENDENCY ;;
30901      yum)
30902        yum_help     $MISSING_DEPENDENCY ;;
30903      port)
30904        port_help    $MISSING_DEPENDENCY ;;
30905      pkgutil)
30906        pkgutil_help $MISSING_DEPENDENCY ;;
30907      pkgadd)
30908        pkgadd_help  $MISSING_DEPENDENCY ;;
30909      * )
30910        break ;;
30911    esac
30912
30913    if test "x$PKGHANDLER_COMMAND" != x; then
30914      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30915    fi
30916  fi
30917
30918    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30919  fi
30920
30921
30922
30923
30924
30925
30926  ###############################################################################
30927  #
30928  # The common unix printing system cups is used to print from java.
30929  #
30930
30931# Check whether --with-cups was given.
30932if test "${with_cups+set}" = set; then :
30933  withval=$with_cups;
30934fi
30935
30936
30937# Check whether --with-cups-include was given.
30938if test "${with_cups_include+set}" = set; then :
30939  withval=$with_cups_include;
30940fi
30941
30942
30943  if test "x$CUPS_NOT_NEEDED" = xyes; then
30944    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30945      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30946$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30947    fi
30948    CUPS_CFLAGS=
30949  else
30950    CUPS_FOUND=no
30951
30952    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30953      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30954    fi
30955
30956    if test "x${with_cups}" != x; then
30957      CUPS_CFLAGS="-I${with_cups}/include"
30958      CUPS_FOUND=yes
30959    fi
30960    if test "x${with_cups_include}" != x; then
30961      CUPS_CFLAGS="-I${with_cups_include}"
30962      CUPS_FOUND=yes
30963    fi
30964    if test "x$CUPS_FOUND" = xno; then
30965
30966
30967  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30968    # Source the builddeps file again, to make sure it uses the latest variables!
30969    . $builddepsfile
30970    # Look for a target and build machine specific resource!
30971    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30972    if test "x$resource" = x; then
30973      # Ok, lets instead look for a target specific resource
30974      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30975    fi
30976    if test "x$resource" = x; then
30977      # Ok, lets instead look for a build specific resource
30978      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30979    fi
30980    if test "x$resource" = x; then
30981      # Ok, lets instead look for a generic resource
30982      # (The cups comes from M4 and not the shell, thus no need for eval here.)
30983      resource=${builddep_cups}
30984    fi
30985    if test "x$resource" != x; then
30986      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30987$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30988      # If the resource in the builddeps.conf file is an existing directory,
30989      # for example /java/linux/cups
30990      if test -d ${resource}; then
30991        depdir=${resource}
30992      else
30993
30994  # cups is for example mymodule
30995  # $resource is for example libs/general/libmymod_1_2_3.zip
30996  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30997  # $with_builddeps_dir is for example /localhome/builddeps
30998  # depdir is the name of the variable into which we store the depdir, eg MYMOD
30999  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31000  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31001  filename=`basename $resource`
31002  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31003  filebase=${filename%%.*}
31004  extension=${filename#*.}
31005  installdir=$with_builddeps_dir/$filebase
31006  if test ! -f $installdir/$filename.unpacked; then
31007    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31008$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31009    if test ! -d $installdir; then
31010      mkdir -p $installdir
31011    fi
31012    if test ! -d $installdir; then
31013      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31014    fi
31015    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31016    touch $tmpfile
31017    if test ! -f $tmpfile; then
31018      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31019    fi
31020
31021  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31022  # $tmpfile is the local file name for the downloaded file.
31023  VALID_TOOL=no
31024  if test "x$BDEPS_FTP" = xwget; then
31025    VALID_TOOL=yes
31026    wget -O $tmpfile $with_builddeps_server/$resource
31027  fi
31028  if test "x$BDEPS_FTP" = xlftp; then
31029    VALID_TOOL=yes
31030    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31031  fi
31032  if test "x$BDEPS_FTP" = xftp; then
31033    VALID_TOOL=yes
31034    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31035    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31036    FTPUSERPWD=${FTPSERVER%%@*}
31037    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31038      FTPUSER=${userpwd%%:*}
31039      FTPPWD=${userpwd#*@}
31040      FTPSERVER=${FTPSERVER#*@}
31041    else
31042      FTPUSER=ftp
31043      FTPPWD=ftp
31044    fi
31045    # the "pass" command does not work on some
31046    # ftp clients (read ftp.exe) but if it works,
31047    # passive mode is better!
31048    ( \
31049        echo "user $FTPUSER $FTPPWD"        ; \
31050        echo "pass"                         ; \
31051        echo "bin"                          ; \
31052        echo "get $FTPPATH $tmpfile"              ; \
31053    ) | ftp -in $FTPSERVER
31054  fi
31055  if test "x$VALID_TOOL" != xyes; then
31056    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31057  fi
31058
31059    mv $tmpfile $installdir/$filename
31060    if test ! -s $installdir/$filename; then
31061      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31062    fi
31063    case "$extension" in
31064      zip)  echo "Unzipping $installdir/$filename..."
31065        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31066        ;;
31067      tar.gz) echo "Untaring $installdir/$filename..."
31068        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31069        ;;
31070      tgz) echo "Untaring $installdir/$filename..."
31071        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31072        ;;
31073      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31074        ;;
31075    esac
31076  fi
31077  if test -f $installdir/$filename.unpacked; then
31078    depdir=$installdir
31079  fi
31080
31081      fi
31082      # Source the builddeps file again, because in the previous command, the depdir
31083      # was updated to point at the current build dependency install directory.
31084      . $builddepsfile
31085      # Now extract variables from the builddeps.conf files.
31086      theroot=${builddep_cups_ROOT}
31087      thecflags=${builddep_cups_CFLAGS}
31088      thelibs=${builddep_cups_LIBS}
31089      if test "x$depdir" = x; then
31090        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31091      fi
31092      CUPS=$depdir
31093      if test "x$theroot" != x; then
31094        CUPS="$theroot"
31095      fi
31096      if test "x$thecflags" != x; then
31097        CUPS_CFLAGS="$thecflags"
31098      fi
31099      if test "x$thelibs" != x; then
31100        CUPS_LIBS="$thelibs"
31101      fi
31102      CUPS_FOUND=yes
31103
31104    fi
31105
31106  fi
31107
31108    fi
31109    if test "x$CUPS_FOUND" = xno; then
31110      # Are the cups headers installed in the default /usr/include location?
31111      for ac_header in cups/cups.h cups/ppd.h
31112do :
31113  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31114ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31115if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31116  cat >>confdefs.h <<_ACEOF
31117#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31118_ACEOF
31119
31120            CUPS_FOUND=yes
31121            CUPS_CFLAGS=
31122            DEFAULT_CUPS=yes
31123
31124
31125fi
31126
31127done
31128
31129    fi
31130    if test "x$CUPS_FOUND" = xno; then
31131      # Getting nervous now? Lets poke around for standard Solaris third-party
31132      # package installation locations.
31133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31134$as_echo_n "checking for cups headers... " >&6; }
31135      if test -s /opt/sfw/cups/include/cups/cups.h; then
31136        # An SFW package seems to be installed!
31137        CUPS_FOUND=yes
31138        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31139      elif test -s /opt/csw/include/cups/cups.h; then
31140        # A CSW package seems to be installed!
31141        CUPS_FOUND=yes
31142        CUPS_CFLAGS="-I/opt/csw/include"
31143      fi
31144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31145$as_echo "$CUPS_FOUND" >&6; }
31146    fi
31147    if test "x$CUPS_FOUND" = xno; then
31148
31149  # Print a helpful message on how to acquire the necessary build dependency.
31150  # cups is the help tag: freetype, cups, pulse, alsa etc
31151  MISSING_DEPENDENCY=cups
31152
31153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31154    cygwin_help $MISSING_DEPENDENCY
31155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31156    msys_help $MISSING_DEPENDENCY
31157  else
31158    PKGHANDLER_COMMAND=
31159
31160    case $PKGHANDLER in
31161      apt-get)
31162        apt_help     $MISSING_DEPENDENCY ;;
31163      yum)
31164        yum_help     $MISSING_DEPENDENCY ;;
31165      port)
31166        port_help    $MISSING_DEPENDENCY ;;
31167      pkgutil)
31168        pkgutil_help $MISSING_DEPENDENCY ;;
31169      pkgadd)
31170        pkgadd_help  $MISSING_DEPENDENCY ;;
31171      * )
31172        break ;;
31173    esac
31174
31175    if test "x$PKGHANDLER_COMMAND" != x; then
31176      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31177    fi
31178  fi
31179
31180      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31181    fi
31182  fi
31183
31184
31185
31186
31187
31188
31189  ###############################################################################
31190  #
31191  # The ubiquitous freetype library is used to render fonts.
31192  #
31193
31194# Check whether --with-freetype was given.
31195if test "${with_freetype+set}" = set; then :
31196  withval=$with_freetype;
31197fi
31198
31199
31200# Check whether --with-freetype-include was given.
31201if test "${with_freetype_include+set}" = set; then :
31202  withval=$with_freetype_include;
31203fi
31204
31205
31206# Check whether --with-freetype-lib was given.
31207if test "${with_freetype_lib+set}" = set; then :
31208  withval=$with_freetype_lib;
31209fi
31210
31211  # Check whether --enable-freetype-bundling was given.
31212if test "${enable_freetype_bundling+set}" = set; then :
31213  enableval=$enable_freetype_bundling;
31214fi
31215
31216
31217  FREETYPE_CFLAGS=
31218  FREETYPE_LIBS=
31219  FREETYPE_BUNDLE_LIB_PATH=
31220
31221  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31222    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31223      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31224$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31225    fi
31226    if test "x$enable_freetype_bundling" != x; then
31227      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31228$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31229    fi
31230  else
31231    # freetype is needed to build; go get it!
31232
31233    BUNDLE_FREETYPE="$enable_freetype_bundling"
31234
31235    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31236      # User has specified settings
31237
31238      if test "x$BUNDLE_FREETYPE" = x; then
31239        # If not specified, default is to bundle freetype
31240        BUNDLE_FREETYPE=yes
31241      fi
31242
31243      if test "x$with_freetype" != x; then
31244        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31245        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31246      fi
31247
31248      # Allow --with-freetype-lib and --with-freetype-include to override
31249      if test "x$with_freetype_include" != x; then
31250        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31251      fi
31252      if test "x$with_freetype_lib" != x; then
31253        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31254      fi
31255
31256      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31257        # Okay, we got it. Check that it works.
31258
31259  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31260  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31261  METHOD="--with-freetype"
31262
31263  # First check if the files exists.
31264  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31265    # We found an arbitrary include file. That's a good sign.
31266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31267$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31268    FOUND_FREETYPE=yes
31269
31270    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31271    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31272      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31273$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31274      FOUND_FREETYPE=no
31275    else
31276      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31277        # On Windows, we will need both .lib and .dll file.
31278        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31279          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31280$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31281          FOUND_FREETYPE=no
31282        fi
31283      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
31284        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31285        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31286      fi
31287    fi
31288  fi
31289
31290  if test "x$FOUND_FREETYPE" = xyes; then
31291
31292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31293
31294  # Input might be given as Windows format, start by converting to
31295  # unix format.
31296  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31297  new_path=`$CYGPATH -u "$path"`
31298
31299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31302  # "foo.exe" is OK but "foo" is an error.
31303  #
31304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31305  # It is also a way to make sure we got the proper file name for the real test later on.
31306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31307  if test "x$test_shortpath" = x; then
31308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31309$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31310    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31311  fi
31312
31313  # Call helper function which possibly converts this using DOS-style short mode.
31314  # If so, the updated path is stored in $new_path.
31315
31316  input_path="$new_path"
31317  # Check if we need to convert this using DOS-style short mode. If the path
31318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31319  # take no chances and rewrite it.
31320  # Note: m4 eats our [], so we need to use [ and ] instead.
31321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31322  if test "x$has_forbidden_chars" != x; then
31323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31327      # Going to short mode and back again did indeed matter. Since short mode is
31328      # case insensitive, let's make it lowercase to improve readability.
31329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31330      # Now convert it back to Unix-stile (cygpath)
31331      input_path=`$CYGPATH -u "$shortmode_path"`
31332      new_path="$input_path"
31333    fi
31334  fi
31335
31336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31337  if test "x$test_cygdrive_prefix" = x; then
31338    # As a simple fix, exclude /usr/bin since it's not a real path.
31339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31341      # a path prefixed by /cygdrive for fixpath to work.
31342      new_path="$CYGWIN_ROOT_PATH$input_path"
31343    fi
31344  fi
31345
31346
31347  if test "x$path" != "x$new_path"; then
31348    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31351  fi
31352
31353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31354
31355  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31356  has_colon=`$ECHO $path | $GREP ^.:`
31357  new_path="$path"
31358  if test "x$has_colon" = x; then
31359    # Not in mixed or Windows style, start by that.
31360    new_path=`cmd //c echo $path`
31361  fi
31362
31363
31364  input_path="$new_path"
31365  # Check if we need to convert this using DOS-style short mode. If the path
31366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31367  # take no chances and rewrite it.
31368  # Note: m4 eats our [], so we need to use [ and ] instead.
31369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31370  if test "x$has_forbidden_chars" != x; then
31371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31373  fi
31374
31375
31376  windows_path="$new_path"
31377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31378    unix_path=`$CYGPATH -u "$windows_path"`
31379    new_path="$unix_path"
31380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31382    new_path="$unix_path"
31383  fi
31384
31385  if test "x$path" != "x$new_path"; then
31386    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31389  fi
31390
31391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31393
31394  else
31395    # We're on a posix platform. Hooray! :)
31396    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31397    has_space=`$ECHO "$path" | $GREP " "`
31398    if test "x$has_space" != x; then
31399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31402    fi
31403
31404    # Use eval to expand a potential ~
31405    eval path="$path"
31406    if test ! -f "$path" && test ! -d "$path"; then
31407      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31408    fi
31409
31410    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31411  fi
31412
31413
31414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31415
31416  # Input might be given as Windows format, start by converting to
31417  # unix format.
31418  path="$POTENTIAL_FREETYPE_LIB_PATH"
31419  new_path=`$CYGPATH -u "$path"`
31420
31421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31424  # "foo.exe" is OK but "foo" is an error.
31425  #
31426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31427  # It is also a way to make sure we got the proper file name for the real test later on.
31428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31429  if test "x$test_shortpath" = x; then
31430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31433  fi
31434
31435  # Call helper function which possibly converts this using DOS-style short mode.
31436  # If so, the updated path is stored in $new_path.
31437
31438  input_path="$new_path"
31439  # Check if we need to convert this using DOS-style short mode. If the path
31440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31441  # take no chances and rewrite it.
31442  # Note: m4 eats our [], so we need to use [ and ] instead.
31443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31444  if test "x$has_forbidden_chars" != x; then
31445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31449      # Going to short mode and back again did indeed matter. Since short mode is
31450      # case insensitive, let's make it lowercase to improve readability.
31451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31452      # Now convert it back to Unix-stile (cygpath)
31453      input_path=`$CYGPATH -u "$shortmode_path"`
31454      new_path="$input_path"
31455    fi
31456  fi
31457
31458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31459  if test "x$test_cygdrive_prefix" = x; then
31460    # As a simple fix, exclude /usr/bin since it's not a real path.
31461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31463      # a path prefixed by /cygdrive for fixpath to work.
31464      new_path="$CYGWIN_ROOT_PATH$input_path"
31465    fi
31466  fi
31467
31468
31469  if test "x$path" != "x$new_path"; then
31470    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31473  fi
31474
31475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31476
31477  path="$POTENTIAL_FREETYPE_LIB_PATH"
31478  has_colon=`$ECHO $path | $GREP ^.:`
31479  new_path="$path"
31480  if test "x$has_colon" = x; then
31481    # Not in mixed or Windows style, start by that.
31482    new_path=`cmd //c echo $path`
31483  fi
31484
31485
31486  input_path="$new_path"
31487  # Check if we need to convert this using DOS-style short mode. If the path
31488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31489  # take no chances and rewrite it.
31490  # Note: m4 eats our [], so we need to use [ and ] instead.
31491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31492  if test "x$has_forbidden_chars" != x; then
31493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31495  fi
31496
31497
31498  windows_path="$new_path"
31499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31500    unix_path=`$CYGPATH -u "$windows_path"`
31501    new_path="$unix_path"
31502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31504    new_path="$unix_path"
31505  fi
31506
31507  if test "x$path" != "x$new_path"; then
31508    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31511  fi
31512
31513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31515
31516  else
31517    # We're on a posix platform. Hooray! :)
31518    path="$POTENTIAL_FREETYPE_LIB_PATH"
31519    has_space=`$ECHO "$path" | $GREP " "`
31520    if test "x$has_space" != x; then
31521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31523      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31524    fi
31525
31526    # Use eval to expand a potential ~
31527    eval path="$path"
31528    if test ! -f "$path" && test ! -d "$path"; then
31529      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31530    fi
31531
31532    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31533  fi
31534
31535
31536    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31538$as_echo_n "checking for freetype includes... " >&6; }
31539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31540$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31541    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31543$as_echo_n "checking for freetype libraries... " >&6; }
31544    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31545$as_echo "$FREETYPE_LIB_PATH" >&6; }
31546  fi
31547
31548        if test "x$FOUND_FREETYPE" != xyes; then
31549          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31550        fi
31551      else
31552        # User specified only one of lib or include. This is an error.
31553        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31554          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31555$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31556          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31557        else
31558          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31559$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31560          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31561        fi
31562      fi
31563    else
31564      # User did not specify settings, but we need freetype. Try to locate it.
31565
31566      if test "x$BUNDLE_FREETYPE" = x; then
31567        # If not specified, default is to bundle freetype only on windows
31568        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31569          BUNDLE_FREETYPE=yes
31570        else
31571          BUNDLE_FREETYPE=no
31572        fi
31573      fi
31574
31575      if test "x$FOUND_FREETYPE" != xyes; then
31576        # Check builddeps
31577
31578
31579  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31580    # Source the builddeps file again, to make sure it uses the latest variables!
31581    . $builddepsfile
31582    # Look for a target and build machine specific resource!
31583    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31584    if test "x$resource" = x; then
31585      # Ok, lets instead look for a target specific resource
31586      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31587    fi
31588    if test "x$resource" = x; then
31589      # Ok, lets instead look for a build specific resource
31590      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31591    fi
31592    if test "x$resource" = x; then
31593      # Ok, lets instead look for a generic resource
31594      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31595      resource=${builddep_freetype2}
31596    fi
31597    if test "x$resource" != x; then
31598      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31599$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31600      # If the resource in the builddeps.conf file is an existing directory,
31601      # for example /java/linux/cups
31602      if test -d ${resource}; then
31603        depdir=${resource}
31604      else
31605
31606  # freetype2 is for example mymodule
31607  # $resource is for example libs/general/libmymod_1_2_3.zip
31608  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31609  # $with_builddeps_dir is for example /localhome/builddeps
31610  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31611  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31612  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31613  filename=`basename $resource`
31614  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31615  filebase=${filename%%.*}
31616  extension=${filename#*.}
31617  installdir=$with_builddeps_dir/$filebase
31618  if test ! -f $installdir/$filename.unpacked; then
31619    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31620$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31621    if test ! -d $installdir; then
31622      mkdir -p $installdir
31623    fi
31624    if test ! -d $installdir; then
31625      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31626    fi
31627    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31628    touch $tmpfile
31629    if test ! -f $tmpfile; then
31630      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31631    fi
31632
31633  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31634  # $tmpfile is the local file name for the downloaded file.
31635  VALID_TOOL=no
31636  if test "x$BDEPS_FTP" = xwget; then
31637    VALID_TOOL=yes
31638    wget -O $tmpfile $with_builddeps_server/$resource
31639  fi
31640  if test "x$BDEPS_FTP" = xlftp; then
31641    VALID_TOOL=yes
31642    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31643  fi
31644  if test "x$BDEPS_FTP" = xftp; then
31645    VALID_TOOL=yes
31646    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31647    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31648    FTPUSERPWD=${FTPSERVER%%@*}
31649    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31650      FTPUSER=${userpwd%%:*}
31651      FTPPWD=${userpwd#*@}
31652      FTPSERVER=${FTPSERVER#*@}
31653    else
31654      FTPUSER=ftp
31655      FTPPWD=ftp
31656    fi
31657    # the "pass" command does not work on some
31658    # ftp clients (read ftp.exe) but if it works,
31659    # passive mode is better!
31660    ( \
31661        echo "user $FTPUSER $FTPPWD"        ; \
31662        echo "pass"                         ; \
31663        echo "bin"                          ; \
31664        echo "get $FTPPATH $tmpfile"              ; \
31665    ) | ftp -in $FTPSERVER
31666  fi
31667  if test "x$VALID_TOOL" != xyes; then
31668    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31669  fi
31670
31671    mv $tmpfile $installdir/$filename
31672    if test ! -s $installdir/$filename; then
31673      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31674    fi
31675    case "$extension" in
31676      zip)  echo "Unzipping $installdir/$filename..."
31677        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31678        ;;
31679      tar.gz) echo "Untaring $installdir/$filename..."
31680        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31681        ;;
31682      tgz) echo "Untaring $installdir/$filename..."
31683        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31684        ;;
31685      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31686        ;;
31687    esac
31688  fi
31689  if test -f $installdir/$filename.unpacked; then
31690    depdir=$installdir
31691  fi
31692
31693      fi
31694      # Source the builddeps file again, because in the previous command, the depdir
31695      # was updated to point at the current build dependency install directory.
31696      . $builddepsfile
31697      # Now extract variables from the builddeps.conf files.
31698      theroot=${builddep_freetype2_ROOT}
31699      thecflags=${builddep_freetype2_CFLAGS}
31700      thelibs=${builddep_freetype2_LIBS}
31701      if test "x$depdir" = x; then
31702        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31703      fi
31704      FREETYPE=$depdir
31705      if test "x$theroot" != x; then
31706        FREETYPE="$theroot"
31707      fi
31708      if test "x$thecflags" != x; then
31709        FREETYPE_CFLAGS="$thecflags"
31710      fi
31711      if test "x$thelibs" != x; then
31712        FREETYPE_LIBS="$thelibs"
31713      fi
31714      FOUND_FREETYPE=yes
31715      else FOUND_FREETYPE=no
31716
31717    fi
31718    else FOUND_FREETYPE=no
31719
31720  fi
31721
31722        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31723        if test "x$FOUND_FREETYPE" = xyes; then
31724          if test "x$BUNDLE_FREETYPE" = xyes; then
31725            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31726$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31727            FOUND_FREETYPE=no
31728          else
31729            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31730$as_echo_n "checking for freetype... " >&6; }
31731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31732$as_echo "yes (using builddeps)" >&6; }
31733          fi
31734        fi
31735      fi
31736
31737      if test "x$FOUND_FREETYPE" != xyes; then
31738        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31739        if test "x$PKG_CONFIG" != x; then
31740
31741pkg_failed=no
31742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31743$as_echo_n "checking for FREETYPE... " >&6; }
31744
31745if test -n "$FREETYPE_CFLAGS"; then
31746    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31747 elif test -n "$PKG_CONFIG"; then
31748    if test -n "$PKG_CONFIG" && \
31749    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31750  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31751  ac_status=$?
31752  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31753  test $ac_status = 0; }; then
31754  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31755else
31756  pkg_failed=yes
31757fi
31758 else
31759    pkg_failed=untried
31760fi
31761if test -n "$FREETYPE_LIBS"; then
31762    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31763 elif test -n "$PKG_CONFIG"; then
31764    if test -n "$PKG_CONFIG" && \
31765    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31766  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31767  ac_status=$?
31768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31769  test $ac_status = 0; }; then
31770  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31771else
31772  pkg_failed=yes
31773fi
31774 else
31775    pkg_failed=untried
31776fi
31777
31778
31779
31780if test $pkg_failed = yes; then
31781
31782if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31783        _pkg_short_errors_supported=yes
31784else
31785        _pkg_short_errors_supported=no
31786fi
31787        if test $_pkg_short_errors_supported = yes; then
31788	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31789        else
31790	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31791        fi
31792	# Put the nasty error message in config.log where it belongs
31793	echo "$FREETYPE_PKG_ERRORS" >&5
31794
31795	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31796$as_echo "no" >&6; }
31797                FOUND_FREETYPE=no
31798elif test $pkg_failed = untried; then
31799	FOUND_FREETYPE=no
31800else
31801	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31802	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31804$as_echo "yes" >&6; }
31805	FOUND_FREETYPE=yes
31806fi
31807          if test "x$FOUND_FREETYPE" = xyes; then
31808            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31809            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31810            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31811            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31812              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31813            fi
31814            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31815            if test "x$BUNDLE_FREETYPE" = xyes; then
31816              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31817$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31818              FOUND_FREETYPE=no
31819            else
31820              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31821$as_echo_n "checking for freetype... " >&6; }
31822              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31823$as_echo "yes (using pkg-config)" >&6; }
31824            fi
31825          fi
31826        fi
31827      fi
31828
31829      if test "x$FOUND_FREETYPE" != xyes; then
31830        # Check in well-known locations
31831        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31832          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
31833
31834  windows_path="$FREETYPE_BASE_DIR"
31835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31836    unix_path=`$CYGPATH -u "$windows_path"`
31837    FREETYPE_BASE_DIR="$unix_path"
31838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31840    FREETYPE_BASE_DIR="$unix_path"
31841  fi
31842
31843
31844  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
31845  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
31846  METHOD="well-known location"
31847
31848  # First check if the files exists.
31849  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31850    # We found an arbitrary include file. That's a good sign.
31851    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31852$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31853    FOUND_FREETYPE=yes
31854
31855    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31856    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31857      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31859      FOUND_FREETYPE=no
31860    else
31861      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31862        # On Windows, we will need both .lib and .dll file.
31863        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31864          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31865$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31866          FOUND_FREETYPE=no
31867        fi
31868      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
31869        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31870        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31871      fi
31872    fi
31873  fi
31874
31875  if test "x$FOUND_FREETYPE" = xyes; then
31876
31877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31878
31879  # Input might be given as Windows format, start by converting to
31880  # unix format.
31881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31882  new_path=`$CYGPATH -u "$path"`
31883
31884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31887  # "foo.exe" is OK but "foo" is an error.
31888  #
31889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31890  # It is also a way to make sure we got the proper file name for the real test later on.
31891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31892  if test "x$test_shortpath" = x; then
31893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31895    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31896  fi
31897
31898  # Call helper function which possibly converts this using DOS-style short mode.
31899  # If so, the updated path is stored in $new_path.
31900
31901  input_path="$new_path"
31902  # Check if we need to convert this using DOS-style short mode. If the path
31903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31904  # take no chances and rewrite it.
31905  # Note: m4 eats our [], so we need to use [ and ] instead.
31906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31907  if test "x$has_forbidden_chars" != x; then
31908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31912      # Going to short mode and back again did indeed matter. Since short mode is
31913      # case insensitive, let's make it lowercase to improve readability.
31914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31915      # Now convert it back to Unix-stile (cygpath)
31916      input_path=`$CYGPATH -u "$shortmode_path"`
31917      new_path="$input_path"
31918    fi
31919  fi
31920
31921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31922  if test "x$test_cygdrive_prefix" = x; then
31923    # As a simple fix, exclude /usr/bin since it's not a real path.
31924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31926      # a path prefixed by /cygdrive for fixpath to work.
31927      new_path="$CYGWIN_ROOT_PATH$input_path"
31928    fi
31929  fi
31930
31931
31932  if test "x$path" != "x$new_path"; then
31933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31936  fi
31937
31938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31939
31940  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31941  has_colon=`$ECHO $path | $GREP ^.:`
31942  new_path="$path"
31943  if test "x$has_colon" = x; then
31944    # Not in mixed or Windows style, start by that.
31945    new_path=`cmd //c echo $path`
31946  fi
31947
31948
31949  input_path="$new_path"
31950  # Check if we need to convert this using DOS-style short mode. If the path
31951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31952  # take no chances and rewrite it.
31953  # Note: m4 eats our [], so we need to use [ and ] instead.
31954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31955  if test "x$has_forbidden_chars" != x; then
31956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31958  fi
31959
31960
31961  windows_path="$new_path"
31962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31963    unix_path=`$CYGPATH -u "$windows_path"`
31964    new_path="$unix_path"
31965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31967    new_path="$unix_path"
31968  fi
31969
31970  if test "x$path" != "x$new_path"; then
31971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31974  fi
31975
31976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31978
31979  else
31980    # We're on a posix platform. Hooray! :)
31981    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31982    has_space=`$ECHO "$path" | $GREP " "`
31983    if test "x$has_space" != x; then
31984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31987    fi
31988
31989    # Use eval to expand a potential ~
31990    eval path="$path"
31991    if test ! -f "$path" && test ! -d "$path"; then
31992      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31993    fi
31994
31995    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31996  fi
31997
31998
31999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32000
32001  # Input might be given as Windows format, start by converting to
32002  # unix format.
32003  path="$POTENTIAL_FREETYPE_LIB_PATH"
32004  new_path=`$CYGPATH -u "$path"`
32005
32006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32009  # "foo.exe" is OK but "foo" is an error.
32010  #
32011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32012  # It is also a way to make sure we got the proper file name for the real test later on.
32013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32014  if test "x$test_shortpath" = x; then
32015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32017    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32018  fi
32019
32020  # Call helper function which possibly converts this using DOS-style short mode.
32021  # If so, the updated path is stored in $new_path.
32022
32023  input_path="$new_path"
32024  # Check if we need to convert this using DOS-style short mode. If the path
32025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32026  # take no chances and rewrite it.
32027  # Note: m4 eats our [], so we need to use [ and ] instead.
32028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32029  if test "x$has_forbidden_chars" != x; then
32030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32034      # Going to short mode and back again did indeed matter. Since short mode is
32035      # case insensitive, let's make it lowercase to improve readability.
32036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32037      # Now convert it back to Unix-stile (cygpath)
32038      input_path=`$CYGPATH -u "$shortmode_path"`
32039      new_path="$input_path"
32040    fi
32041  fi
32042
32043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32044  if test "x$test_cygdrive_prefix" = x; then
32045    # As a simple fix, exclude /usr/bin since it's not a real path.
32046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32048      # a path prefixed by /cygdrive for fixpath to work.
32049      new_path="$CYGWIN_ROOT_PATH$input_path"
32050    fi
32051  fi
32052
32053
32054  if test "x$path" != "x$new_path"; then
32055    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32058  fi
32059
32060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32061
32062  path="$POTENTIAL_FREETYPE_LIB_PATH"
32063  has_colon=`$ECHO $path | $GREP ^.:`
32064  new_path="$path"
32065  if test "x$has_colon" = x; then
32066    # Not in mixed or Windows style, start by that.
32067    new_path=`cmd //c echo $path`
32068  fi
32069
32070
32071  input_path="$new_path"
32072  # Check if we need to convert this using DOS-style short mode. If the path
32073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32074  # take no chances and rewrite it.
32075  # Note: m4 eats our [], so we need to use [ and ] instead.
32076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32077  if test "x$has_forbidden_chars" != x; then
32078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32080  fi
32081
32082
32083  windows_path="$new_path"
32084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32085    unix_path=`$CYGPATH -u "$windows_path"`
32086    new_path="$unix_path"
32087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32089    new_path="$unix_path"
32090  fi
32091
32092  if test "x$path" != "x$new_path"; then
32093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32096  fi
32097
32098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32100
32101  else
32102    # We're on a posix platform. Hooray! :)
32103    path="$POTENTIAL_FREETYPE_LIB_PATH"
32104    has_space=`$ECHO "$path" | $GREP " "`
32105    if test "x$has_space" != x; then
32106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32108      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32109    fi
32110
32111    # Use eval to expand a potential ~
32112    eval path="$path"
32113    if test ! -f "$path" && test ! -d "$path"; then
32114      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32115    fi
32116
32117    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32118  fi
32119
32120
32121    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32123$as_echo_n "checking for freetype includes... " >&6; }
32124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32125$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32126    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32128$as_echo_n "checking for freetype libraries... " >&6; }
32129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32130$as_echo "$FREETYPE_LIB_PATH" >&6; }
32131  fi
32132
32133          if test "x$FOUND_FREETYPE" != xyes; then
32134            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32135
32136  windows_path="$FREETYPE_BASE_DIR"
32137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32138    unix_path=`$CYGPATH -u "$windows_path"`
32139    FREETYPE_BASE_DIR="$unix_path"
32140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32142    FREETYPE_BASE_DIR="$unix_path"
32143  fi
32144
32145
32146  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32147  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32148  METHOD="well-known location"
32149
32150  # First check if the files exists.
32151  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32152    # We found an arbitrary include file. That's a good sign.
32153    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32154$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32155    FOUND_FREETYPE=yes
32156
32157    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32158    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32159      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32160$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32161      FOUND_FREETYPE=no
32162    else
32163      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32164        # On Windows, we will need both .lib and .dll file.
32165        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32166          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32167$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32168          FOUND_FREETYPE=no
32169        fi
32170      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
32171        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32172        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32173      fi
32174    fi
32175  fi
32176
32177  if test "x$FOUND_FREETYPE" = xyes; then
32178
32179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32180
32181  # Input might be given as Windows format, start by converting to
32182  # unix format.
32183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32184  new_path=`$CYGPATH -u "$path"`
32185
32186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32189  # "foo.exe" is OK but "foo" is an error.
32190  #
32191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32192  # It is also a way to make sure we got the proper file name for the real test later on.
32193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32194  if test "x$test_shortpath" = x; then
32195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32197    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32198  fi
32199
32200  # Call helper function which possibly converts this using DOS-style short mode.
32201  # If so, the updated path is stored in $new_path.
32202
32203  input_path="$new_path"
32204  # Check if we need to convert this using DOS-style short mode. If the path
32205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32206  # take no chances and rewrite it.
32207  # Note: m4 eats our [], so we need to use [ and ] instead.
32208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32209  if test "x$has_forbidden_chars" != x; then
32210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32214      # Going to short mode and back again did indeed matter. Since short mode is
32215      # case insensitive, let's make it lowercase to improve readability.
32216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32217      # Now convert it back to Unix-stile (cygpath)
32218      input_path=`$CYGPATH -u "$shortmode_path"`
32219      new_path="$input_path"
32220    fi
32221  fi
32222
32223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32224  if test "x$test_cygdrive_prefix" = x; then
32225    # As a simple fix, exclude /usr/bin since it's not a real path.
32226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32228      # a path prefixed by /cygdrive for fixpath to work.
32229      new_path="$CYGWIN_ROOT_PATH$input_path"
32230    fi
32231  fi
32232
32233
32234  if test "x$path" != "x$new_path"; then
32235    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32238  fi
32239
32240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32241
32242  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32243  has_colon=`$ECHO $path | $GREP ^.:`
32244  new_path="$path"
32245  if test "x$has_colon" = x; then
32246    # Not in mixed or Windows style, start by that.
32247    new_path=`cmd //c echo $path`
32248  fi
32249
32250
32251  input_path="$new_path"
32252  # Check if we need to convert this using DOS-style short mode. If the path
32253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32254  # take no chances and rewrite it.
32255  # Note: m4 eats our [], so we need to use [ and ] instead.
32256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32257  if test "x$has_forbidden_chars" != x; then
32258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32260  fi
32261
32262
32263  windows_path="$new_path"
32264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32265    unix_path=`$CYGPATH -u "$windows_path"`
32266    new_path="$unix_path"
32267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32269    new_path="$unix_path"
32270  fi
32271
32272  if test "x$path" != "x$new_path"; then
32273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32276  fi
32277
32278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32280
32281  else
32282    # We're on a posix platform. Hooray! :)
32283    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32284    has_space=`$ECHO "$path" | $GREP " "`
32285    if test "x$has_space" != x; then
32286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32287$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32288      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32289    fi
32290
32291    # Use eval to expand a potential ~
32292    eval path="$path"
32293    if test ! -f "$path" && test ! -d "$path"; then
32294      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32295    fi
32296
32297    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32298  fi
32299
32300
32301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32302
32303  # Input might be given as Windows format, start by converting to
32304  # unix format.
32305  path="$POTENTIAL_FREETYPE_LIB_PATH"
32306  new_path=`$CYGPATH -u "$path"`
32307
32308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32311  # "foo.exe" is OK but "foo" is an error.
32312  #
32313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32314  # It is also a way to make sure we got the proper file name for the real test later on.
32315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32316  if test "x$test_shortpath" = x; then
32317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32319    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32320  fi
32321
32322  # Call helper function which possibly converts this using DOS-style short mode.
32323  # If so, the updated path is stored in $new_path.
32324
32325  input_path="$new_path"
32326  # Check if we need to convert this using DOS-style short mode. If the path
32327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32328  # take no chances and rewrite it.
32329  # Note: m4 eats our [], so we need to use [ and ] instead.
32330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32331  if test "x$has_forbidden_chars" != x; then
32332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32336      # Going to short mode and back again did indeed matter. Since short mode is
32337      # case insensitive, let's make it lowercase to improve readability.
32338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32339      # Now convert it back to Unix-stile (cygpath)
32340      input_path=`$CYGPATH -u "$shortmode_path"`
32341      new_path="$input_path"
32342    fi
32343  fi
32344
32345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32346  if test "x$test_cygdrive_prefix" = x; then
32347    # As a simple fix, exclude /usr/bin since it's not a real path.
32348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32350      # a path prefixed by /cygdrive for fixpath to work.
32351      new_path="$CYGWIN_ROOT_PATH$input_path"
32352    fi
32353  fi
32354
32355
32356  if test "x$path" != "x$new_path"; then
32357    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32360  fi
32361
32362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32363
32364  path="$POTENTIAL_FREETYPE_LIB_PATH"
32365  has_colon=`$ECHO $path | $GREP ^.:`
32366  new_path="$path"
32367  if test "x$has_colon" = x; then
32368    # Not in mixed or Windows style, start by that.
32369    new_path=`cmd //c echo $path`
32370  fi
32371
32372
32373  input_path="$new_path"
32374  # Check if we need to convert this using DOS-style short mode. If the path
32375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32376  # take no chances and rewrite it.
32377  # Note: m4 eats our [], so we need to use [ and ] instead.
32378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32379  if test "x$has_forbidden_chars" != x; then
32380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32382  fi
32383
32384
32385  windows_path="$new_path"
32386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32387    unix_path=`$CYGPATH -u "$windows_path"`
32388    new_path="$unix_path"
32389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32391    new_path="$unix_path"
32392  fi
32393
32394  if test "x$path" != "x$new_path"; then
32395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32398  fi
32399
32400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32402
32403  else
32404    # We're on a posix platform. Hooray! :)
32405    path="$POTENTIAL_FREETYPE_LIB_PATH"
32406    has_space=`$ECHO "$path" | $GREP " "`
32407    if test "x$has_space" != x; then
32408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32410      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32411    fi
32412
32413    # Use eval to expand a potential ~
32414    eval path="$path"
32415    if test ! -f "$path" && test ! -d "$path"; then
32416      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32417    fi
32418
32419    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32420  fi
32421
32422
32423    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32425$as_echo_n "checking for freetype includes... " >&6; }
32426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32427$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32428    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32430$as_echo_n "checking for freetype libraries... " >&6; }
32431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32432$as_echo "$FREETYPE_LIB_PATH" >&6; }
32433  fi
32434
32435          fi
32436        else
32437          if test "x$SYS_ROOT" = "x/"; then
32438            FREETYPE_ROOT=
32439          else
32440            FREETYPE_ROOT="$SYS_ROOT"
32441          fi
32442          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32443
32444  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32445  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32446  METHOD="well-known location"
32447
32448  # First check if the files exists.
32449  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32450    # We found an arbitrary include file. That's a good sign.
32451    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32452$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32453    FOUND_FREETYPE=yes
32454
32455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32457      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32459      FOUND_FREETYPE=no
32460    else
32461      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32462        # On Windows, we will need both .lib and .dll file.
32463        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32464          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32466          FOUND_FREETYPE=no
32467        fi
32468      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
32469        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32470        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32471      fi
32472    fi
32473  fi
32474
32475  if test "x$FOUND_FREETYPE" = xyes; then
32476
32477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32478
32479  # Input might be given as Windows format, start by converting to
32480  # unix format.
32481  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32482  new_path=`$CYGPATH -u "$path"`
32483
32484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32487  # "foo.exe" is OK but "foo" is an error.
32488  #
32489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32490  # It is also a way to make sure we got the proper file name for the real test later on.
32491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32492  if test "x$test_shortpath" = x; then
32493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32496  fi
32497
32498  # Call helper function which possibly converts this using DOS-style short mode.
32499  # If so, the updated path is stored in $new_path.
32500
32501  input_path="$new_path"
32502  # Check if we need to convert this using DOS-style short mode. If the path
32503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32504  # take no chances and rewrite it.
32505  # Note: m4 eats our [], so we need to use [ and ] instead.
32506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32507  if test "x$has_forbidden_chars" != x; then
32508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32512      # Going to short mode and back again did indeed matter. Since short mode is
32513      # case insensitive, let's make it lowercase to improve readability.
32514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32515      # Now convert it back to Unix-stile (cygpath)
32516      input_path=`$CYGPATH -u "$shortmode_path"`
32517      new_path="$input_path"
32518    fi
32519  fi
32520
32521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32522  if test "x$test_cygdrive_prefix" = x; then
32523    # As a simple fix, exclude /usr/bin since it's not a real path.
32524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32526      # a path prefixed by /cygdrive for fixpath to work.
32527      new_path="$CYGWIN_ROOT_PATH$input_path"
32528    fi
32529  fi
32530
32531
32532  if test "x$path" != "x$new_path"; then
32533    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32536  fi
32537
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539
32540  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32541  has_colon=`$ECHO $path | $GREP ^.:`
32542  new_path="$path"
32543  if test "x$has_colon" = x; then
32544    # Not in mixed or Windows style, start by that.
32545    new_path=`cmd //c echo $path`
32546  fi
32547
32548
32549  input_path="$new_path"
32550  # Check if we need to convert this using DOS-style short mode. If the path
32551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32552  # take no chances and rewrite it.
32553  # Note: m4 eats our [], so we need to use [ and ] instead.
32554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32555  if test "x$has_forbidden_chars" != x; then
32556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32558  fi
32559
32560
32561  windows_path="$new_path"
32562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32563    unix_path=`$CYGPATH -u "$windows_path"`
32564    new_path="$unix_path"
32565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32567    new_path="$unix_path"
32568  fi
32569
32570  if test "x$path" != "x$new_path"; then
32571    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32574  fi
32575
32576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32578
32579  else
32580    # We're on a posix platform. Hooray! :)
32581    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32582    has_space=`$ECHO "$path" | $GREP " "`
32583    if test "x$has_space" != x; then
32584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32587    fi
32588
32589    # Use eval to expand a potential ~
32590    eval path="$path"
32591    if test ! -f "$path" && test ! -d "$path"; then
32592      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32593    fi
32594
32595    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32596  fi
32597
32598
32599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32600
32601  # Input might be given as Windows format, start by converting to
32602  # unix format.
32603  path="$POTENTIAL_FREETYPE_LIB_PATH"
32604  new_path=`$CYGPATH -u "$path"`
32605
32606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32609  # "foo.exe" is OK but "foo" is an error.
32610  #
32611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32612  # It is also a way to make sure we got the proper file name for the real test later on.
32613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32614  if test "x$test_shortpath" = x; then
32615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32617    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32618  fi
32619
32620  # Call helper function which possibly converts this using DOS-style short mode.
32621  # If so, the updated path is stored in $new_path.
32622
32623  input_path="$new_path"
32624  # Check if we need to convert this using DOS-style short mode. If the path
32625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32626  # take no chances and rewrite it.
32627  # Note: m4 eats our [], so we need to use [ and ] instead.
32628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32629  if test "x$has_forbidden_chars" != x; then
32630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32634      # Going to short mode and back again did indeed matter. Since short mode is
32635      # case insensitive, let's make it lowercase to improve readability.
32636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32637      # Now convert it back to Unix-stile (cygpath)
32638      input_path=`$CYGPATH -u "$shortmode_path"`
32639      new_path="$input_path"
32640    fi
32641  fi
32642
32643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32644  if test "x$test_cygdrive_prefix" = x; then
32645    # As a simple fix, exclude /usr/bin since it's not a real path.
32646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32648      # a path prefixed by /cygdrive for fixpath to work.
32649      new_path="$CYGWIN_ROOT_PATH$input_path"
32650    fi
32651  fi
32652
32653
32654  if test "x$path" != "x$new_path"; then
32655    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32657$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32658  fi
32659
32660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32661
32662  path="$POTENTIAL_FREETYPE_LIB_PATH"
32663  has_colon=`$ECHO $path | $GREP ^.:`
32664  new_path="$path"
32665  if test "x$has_colon" = x; then
32666    # Not in mixed or Windows style, start by that.
32667    new_path=`cmd //c echo $path`
32668  fi
32669
32670
32671  input_path="$new_path"
32672  # Check if we need to convert this using DOS-style short mode. If the path
32673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32674  # take no chances and rewrite it.
32675  # Note: m4 eats our [], so we need to use [ and ] instead.
32676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32677  if test "x$has_forbidden_chars" != x; then
32678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32680  fi
32681
32682
32683  windows_path="$new_path"
32684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32685    unix_path=`$CYGPATH -u "$windows_path"`
32686    new_path="$unix_path"
32687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32689    new_path="$unix_path"
32690  fi
32691
32692  if test "x$path" != "x$new_path"; then
32693    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32696  fi
32697
32698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32700
32701  else
32702    # We're on a posix platform. Hooray! :)
32703    path="$POTENTIAL_FREETYPE_LIB_PATH"
32704    has_space=`$ECHO "$path" | $GREP " "`
32705    if test "x$has_space" != x; then
32706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32708      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32709    fi
32710
32711    # Use eval to expand a potential ~
32712    eval path="$path"
32713    if test ! -f "$path" && test ! -d "$path"; then
32714      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32715    fi
32716
32717    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32718  fi
32719
32720
32721    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32723$as_echo_n "checking for freetype includes... " >&6; }
32724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32725$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32726    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32728$as_echo_n "checking for freetype libraries... " >&6; }
32729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32730$as_echo "$FREETYPE_LIB_PATH" >&6; }
32731  fi
32732
32733
32734          if test "x$FOUND_FREETYPE" != xyes; then
32735            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32736
32737  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32738  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32739  METHOD="well-known location"
32740
32741  # First check if the files exists.
32742  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32743    # We found an arbitrary include file. That's a good sign.
32744    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32745$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32746    FOUND_FREETYPE=yes
32747
32748    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32749    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32750      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32751$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32752      FOUND_FREETYPE=no
32753    else
32754      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32755        # On Windows, we will need both .lib and .dll file.
32756        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32757          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32758$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32759          FOUND_FREETYPE=no
32760        fi
32761      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
32762        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32763        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32764      fi
32765    fi
32766  fi
32767
32768  if test "x$FOUND_FREETYPE" = xyes; then
32769
32770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32771
32772  # Input might be given as Windows format, start by converting to
32773  # unix format.
32774  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32775  new_path=`$CYGPATH -u "$path"`
32776
32777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32780  # "foo.exe" is OK but "foo" is an error.
32781  #
32782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32783  # It is also a way to make sure we got the proper file name for the real test later on.
32784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32785  if test "x$test_shortpath" = x; then
32786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32788    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32789  fi
32790
32791  # Call helper function which possibly converts this using DOS-style short mode.
32792  # If so, the updated path is stored in $new_path.
32793
32794  input_path="$new_path"
32795  # Check if we need to convert this using DOS-style short mode. If the path
32796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32797  # take no chances and rewrite it.
32798  # Note: m4 eats our [], so we need to use [ and ] instead.
32799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32800  if test "x$has_forbidden_chars" != x; then
32801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32805      # Going to short mode and back again did indeed matter. Since short mode is
32806      # case insensitive, let's make it lowercase to improve readability.
32807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32808      # Now convert it back to Unix-stile (cygpath)
32809      input_path=`$CYGPATH -u "$shortmode_path"`
32810      new_path="$input_path"
32811    fi
32812  fi
32813
32814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32815  if test "x$test_cygdrive_prefix" = x; then
32816    # As a simple fix, exclude /usr/bin since it's not a real path.
32817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32819      # a path prefixed by /cygdrive for fixpath to work.
32820      new_path="$CYGWIN_ROOT_PATH$input_path"
32821    fi
32822  fi
32823
32824
32825  if test "x$path" != "x$new_path"; then
32826    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32829  fi
32830
32831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32832
32833  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32834  has_colon=`$ECHO $path | $GREP ^.:`
32835  new_path="$path"
32836  if test "x$has_colon" = x; then
32837    # Not in mixed or Windows style, start by that.
32838    new_path=`cmd //c echo $path`
32839  fi
32840
32841
32842  input_path="$new_path"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32851  fi
32852
32853
32854  windows_path="$new_path"
32855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32856    unix_path=`$CYGPATH -u "$windows_path"`
32857    new_path="$unix_path"
32858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32860    new_path="$unix_path"
32861  fi
32862
32863  if test "x$path" != "x$new_path"; then
32864    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32867  fi
32868
32869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32871
32872  else
32873    # We're on a posix platform. Hooray! :)
32874    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32875    has_space=`$ECHO "$path" | $GREP " "`
32876    if test "x$has_space" != x; then
32877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32879      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32880    fi
32881
32882    # Use eval to expand a potential ~
32883    eval path="$path"
32884    if test ! -f "$path" && test ! -d "$path"; then
32885      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32886    fi
32887
32888    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32889  fi
32890
32891
32892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32893
32894  # Input might be given as Windows format, start by converting to
32895  # unix format.
32896  path="$POTENTIAL_FREETYPE_LIB_PATH"
32897  new_path=`$CYGPATH -u "$path"`
32898
32899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32902  # "foo.exe" is OK but "foo" is an error.
32903  #
32904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32905  # It is also a way to make sure we got the proper file name for the real test later on.
32906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32907  if test "x$test_shortpath" = x; then
32908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32911  fi
32912
32913  # Call helper function which possibly converts this using DOS-style short mode.
32914  # If so, the updated path is stored in $new_path.
32915
32916  input_path="$new_path"
32917  # Check if we need to convert this using DOS-style short mode. If the path
32918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32919  # take no chances and rewrite it.
32920  # Note: m4 eats our [], so we need to use [ and ] instead.
32921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32922  if test "x$has_forbidden_chars" != x; then
32923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32927      # Going to short mode and back again did indeed matter. Since short mode is
32928      # case insensitive, let's make it lowercase to improve readability.
32929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32930      # Now convert it back to Unix-stile (cygpath)
32931      input_path=`$CYGPATH -u "$shortmode_path"`
32932      new_path="$input_path"
32933    fi
32934  fi
32935
32936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32937  if test "x$test_cygdrive_prefix" = x; then
32938    # As a simple fix, exclude /usr/bin since it's not a real path.
32939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32941      # a path prefixed by /cygdrive for fixpath to work.
32942      new_path="$CYGWIN_ROOT_PATH$input_path"
32943    fi
32944  fi
32945
32946
32947  if test "x$path" != "x$new_path"; then
32948    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32951  fi
32952
32953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32954
32955  path="$POTENTIAL_FREETYPE_LIB_PATH"
32956  has_colon=`$ECHO $path | $GREP ^.:`
32957  new_path="$path"
32958  if test "x$has_colon" = x; then
32959    # Not in mixed or Windows style, start by that.
32960    new_path=`cmd //c echo $path`
32961  fi
32962
32963
32964  input_path="$new_path"
32965  # Check if we need to convert this using DOS-style short mode. If the path
32966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32967  # take no chances and rewrite it.
32968  # Note: m4 eats our [], so we need to use [ and ] instead.
32969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32970  if test "x$has_forbidden_chars" != x; then
32971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32973  fi
32974
32975
32976  windows_path="$new_path"
32977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32978    unix_path=`$CYGPATH -u "$windows_path"`
32979    new_path="$unix_path"
32980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32982    new_path="$unix_path"
32983  fi
32984
32985  if test "x$path" != "x$new_path"; then
32986    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32989  fi
32990
32991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32993
32994  else
32995    # We're on a posix platform. Hooray! :)
32996    path="$POTENTIAL_FREETYPE_LIB_PATH"
32997    has_space=`$ECHO "$path" | $GREP " "`
32998    if test "x$has_space" != x; then
32999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33001      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33002    fi
33003
33004    # Use eval to expand a potential ~
33005    eval path="$path"
33006    if test ! -f "$path" && test ! -d "$path"; then
33007      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33008    fi
33009
33010    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33011  fi
33012
33013
33014    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33016$as_echo_n "checking for freetype includes... " >&6; }
33017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33018$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33019    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33021$as_echo_n "checking for freetype libraries... " >&6; }
33022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33023$as_echo "$FREETYPE_LIB_PATH" >&6; }
33024  fi
33025
33026          fi
33027
33028          if test "x$FOUND_FREETYPE" != xyes; then
33029            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33030            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33031
33032  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33033  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33034  METHOD="well-known location"
33035
33036  # First check if the files exists.
33037  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33038    # We found an arbitrary include file. That's a good sign.
33039    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33040$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33041    FOUND_FREETYPE=yes
33042
33043    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33044    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33045      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33047      FOUND_FREETYPE=no
33048    else
33049      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33050        # On Windows, we will need both .lib and .dll file.
33051        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33052          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33053$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33054          FOUND_FREETYPE=no
33055        fi
33056      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
33057        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33058        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33059      fi
33060    fi
33061  fi
33062
33063  if test "x$FOUND_FREETYPE" = xyes; then
33064
33065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33066
33067  # Input might be given as Windows format, start by converting to
33068  # unix format.
33069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33070  new_path=`$CYGPATH -u "$path"`
33071
33072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33075  # "foo.exe" is OK but "foo" is an error.
33076  #
33077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33078  # It is also a way to make sure we got the proper file name for the real test later on.
33079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33080  if test "x$test_shortpath" = x; then
33081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33084  fi
33085
33086  # Call helper function which possibly converts this using DOS-style short mode.
33087  # If so, the updated path is stored in $new_path.
33088
33089  input_path="$new_path"
33090  # Check if we need to convert this using DOS-style short mode. If the path
33091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33092  # take no chances and rewrite it.
33093  # Note: m4 eats our [], so we need to use [ and ] instead.
33094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33095  if test "x$has_forbidden_chars" != x; then
33096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33100      # Going to short mode and back again did indeed matter. Since short mode is
33101      # case insensitive, let's make it lowercase to improve readability.
33102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33103      # Now convert it back to Unix-stile (cygpath)
33104      input_path=`$CYGPATH -u "$shortmode_path"`
33105      new_path="$input_path"
33106    fi
33107  fi
33108
33109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33110  if test "x$test_cygdrive_prefix" = x; then
33111    # As a simple fix, exclude /usr/bin since it's not a real path.
33112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33114      # a path prefixed by /cygdrive for fixpath to work.
33115      new_path="$CYGWIN_ROOT_PATH$input_path"
33116    fi
33117  fi
33118
33119
33120  if test "x$path" != "x$new_path"; then
33121    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33124  fi
33125
33126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33127
33128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33129  has_colon=`$ECHO $path | $GREP ^.:`
33130  new_path="$path"
33131  if test "x$has_colon" = x; then
33132    # Not in mixed or Windows style, start by that.
33133    new_path=`cmd //c echo $path`
33134  fi
33135
33136
33137  input_path="$new_path"
33138  # Check if we need to convert this using DOS-style short mode. If the path
33139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33140  # take no chances and rewrite it.
33141  # Note: m4 eats our [], so we need to use [ and ] instead.
33142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33143  if test "x$has_forbidden_chars" != x; then
33144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33146  fi
33147
33148
33149  windows_path="$new_path"
33150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33151    unix_path=`$CYGPATH -u "$windows_path"`
33152    new_path="$unix_path"
33153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33155    new_path="$unix_path"
33156  fi
33157
33158  if test "x$path" != "x$new_path"; then
33159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33162  fi
33163
33164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33166
33167  else
33168    # We're on a posix platform. Hooray! :)
33169    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33170    has_space=`$ECHO "$path" | $GREP " "`
33171    if test "x$has_space" != x; then
33172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33174      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33175    fi
33176
33177    # Use eval to expand a potential ~
33178    eval path="$path"
33179    if test ! -f "$path" && test ! -d "$path"; then
33180      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33181    fi
33182
33183    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33184  fi
33185
33186
33187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33188
33189  # Input might be given as Windows format, start by converting to
33190  # unix format.
33191  path="$POTENTIAL_FREETYPE_LIB_PATH"
33192  new_path=`$CYGPATH -u "$path"`
33193
33194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33197  # "foo.exe" is OK but "foo" is an error.
33198  #
33199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33200  # It is also a way to make sure we got the proper file name for the real test later on.
33201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33202  if test "x$test_shortpath" = x; then
33203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33205    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33206  fi
33207
33208  # Call helper function which possibly converts this using DOS-style short mode.
33209  # If so, the updated path is stored in $new_path.
33210
33211  input_path="$new_path"
33212  # Check if we need to convert this using DOS-style short mode. If the path
33213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33214  # take no chances and rewrite it.
33215  # Note: m4 eats our [], so we need to use [ and ] instead.
33216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33217  if test "x$has_forbidden_chars" != x; then
33218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33222      # Going to short mode and back again did indeed matter. Since short mode is
33223      # case insensitive, let's make it lowercase to improve readability.
33224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33225      # Now convert it back to Unix-stile (cygpath)
33226      input_path=`$CYGPATH -u "$shortmode_path"`
33227      new_path="$input_path"
33228    fi
33229  fi
33230
33231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33232  if test "x$test_cygdrive_prefix" = x; then
33233    # As a simple fix, exclude /usr/bin since it's not a real path.
33234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33236      # a path prefixed by /cygdrive for fixpath to work.
33237      new_path="$CYGWIN_ROOT_PATH$input_path"
33238    fi
33239  fi
33240
33241
33242  if test "x$path" != "x$new_path"; then
33243    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33246  fi
33247
33248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33249
33250  path="$POTENTIAL_FREETYPE_LIB_PATH"
33251  has_colon=`$ECHO $path | $GREP ^.:`
33252  new_path="$path"
33253  if test "x$has_colon" = x; then
33254    # Not in mixed or Windows style, start by that.
33255    new_path=`cmd //c echo $path`
33256  fi
33257
33258
33259  input_path="$new_path"
33260  # Check if we need to convert this using DOS-style short mode. If the path
33261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33262  # take no chances and rewrite it.
33263  # Note: m4 eats our [], so we need to use [ and ] instead.
33264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33265  if test "x$has_forbidden_chars" != x; then
33266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33268  fi
33269
33270
33271  windows_path="$new_path"
33272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33273    unix_path=`$CYGPATH -u "$windows_path"`
33274    new_path="$unix_path"
33275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33277    new_path="$unix_path"
33278  fi
33279
33280  if test "x$path" != "x$new_path"; then
33281    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33284  fi
33285
33286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33288
33289  else
33290    # We're on a posix platform. Hooray! :)
33291    path="$POTENTIAL_FREETYPE_LIB_PATH"
33292    has_space=`$ECHO "$path" | $GREP " "`
33293    if test "x$has_space" != x; then
33294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33296      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33297    fi
33298
33299    # Use eval to expand a potential ~
33300    eval path="$path"
33301    if test ! -f "$path" && test ! -d "$path"; then
33302      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33303    fi
33304
33305    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33306  fi
33307
33308
33309    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33311$as_echo_n "checking for freetype includes... " >&6; }
33312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33313$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33314    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33316$as_echo_n "checking for freetype libraries... " >&6; }
33317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33318$as_echo "$FREETYPE_LIB_PATH" >&6; }
33319  fi
33320
33321            else
33322
33323  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33324  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33325  METHOD="well-known location"
33326
33327  # First check if the files exists.
33328  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33329    # We found an arbitrary include file. That's a good sign.
33330    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33331$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33332    FOUND_FREETYPE=yes
33333
33334    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33335    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33336      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33337$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33338      FOUND_FREETYPE=no
33339    else
33340      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33341        # On Windows, we will need both .lib and .dll file.
33342        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33343          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33344$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33345          FOUND_FREETYPE=no
33346        fi
33347      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
33348        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33349        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33350      fi
33351    fi
33352  fi
33353
33354  if test "x$FOUND_FREETYPE" = xyes; then
33355
33356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33357
33358  # Input might be given as Windows format, start by converting to
33359  # unix format.
33360  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33361  new_path=`$CYGPATH -u "$path"`
33362
33363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33366  # "foo.exe" is OK but "foo" is an error.
33367  #
33368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33369  # It is also a way to make sure we got the proper file name for the real test later on.
33370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33371  if test "x$test_shortpath" = x; then
33372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33374    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33375  fi
33376
33377  # Call helper function which possibly converts this using DOS-style short mode.
33378  # If so, the updated path is stored in $new_path.
33379
33380  input_path="$new_path"
33381  # Check if we need to convert this using DOS-style short mode. If the path
33382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33383  # take no chances and rewrite it.
33384  # Note: m4 eats our [], so we need to use [ and ] instead.
33385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33386  if test "x$has_forbidden_chars" != x; then
33387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33391      # Going to short mode and back again did indeed matter. Since short mode is
33392      # case insensitive, let's make it lowercase to improve readability.
33393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33394      # Now convert it back to Unix-stile (cygpath)
33395      input_path=`$CYGPATH -u "$shortmode_path"`
33396      new_path="$input_path"
33397    fi
33398  fi
33399
33400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33401  if test "x$test_cygdrive_prefix" = x; then
33402    # As a simple fix, exclude /usr/bin since it's not a real path.
33403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33405      # a path prefixed by /cygdrive for fixpath to work.
33406      new_path="$CYGWIN_ROOT_PATH$input_path"
33407    fi
33408  fi
33409
33410
33411  if test "x$path" != "x$new_path"; then
33412    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33414$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33415  fi
33416
33417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33418
33419  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33420  has_colon=`$ECHO $path | $GREP ^.:`
33421  new_path="$path"
33422  if test "x$has_colon" = x; then
33423    # Not in mixed or Windows style, start by that.
33424    new_path=`cmd //c echo $path`
33425  fi
33426
33427
33428  input_path="$new_path"
33429  # Check if we need to convert this using DOS-style short mode. If the path
33430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33431  # take no chances and rewrite it.
33432  # Note: m4 eats our [], so we need to use [ and ] instead.
33433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33434  if test "x$has_forbidden_chars" != x; then
33435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33437  fi
33438
33439
33440  windows_path="$new_path"
33441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33442    unix_path=`$CYGPATH -u "$windows_path"`
33443    new_path="$unix_path"
33444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33446    new_path="$unix_path"
33447  fi
33448
33449  if test "x$path" != "x$new_path"; then
33450    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33452$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33453  fi
33454
33455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33457
33458  else
33459    # We're on a posix platform. Hooray! :)
33460    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33461    has_space=`$ECHO "$path" | $GREP " "`
33462    if test "x$has_space" != x; then
33463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33465      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33466    fi
33467
33468    # Use eval to expand a potential ~
33469    eval path="$path"
33470    if test ! -f "$path" && test ! -d "$path"; then
33471      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33472    fi
33473
33474    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33475  fi
33476
33477
33478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33479
33480  # Input might be given as Windows format, start by converting to
33481  # unix format.
33482  path="$POTENTIAL_FREETYPE_LIB_PATH"
33483  new_path=`$CYGPATH -u "$path"`
33484
33485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33488  # "foo.exe" is OK but "foo" is an error.
33489  #
33490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33491  # It is also a way to make sure we got the proper file name for the real test later on.
33492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33493  if test "x$test_shortpath" = x; then
33494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33495$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33496    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33497  fi
33498
33499  # Call helper function which possibly converts this using DOS-style short mode.
33500  # If so, the updated path is stored in $new_path.
33501
33502  input_path="$new_path"
33503  # Check if we need to convert this using DOS-style short mode. If the path
33504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33505  # take no chances and rewrite it.
33506  # Note: m4 eats our [], so we need to use [ and ] instead.
33507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33508  if test "x$has_forbidden_chars" != x; then
33509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33513      # Going to short mode and back again did indeed matter. Since short mode is
33514      # case insensitive, let's make it lowercase to improve readability.
33515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33516      # Now convert it back to Unix-stile (cygpath)
33517      input_path=`$CYGPATH -u "$shortmode_path"`
33518      new_path="$input_path"
33519    fi
33520  fi
33521
33522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33523  if test "x$test_cygdrive_prefix" = x; then
33524    # As a simple fix, exclude /usr/bin since it's not a real path.
33525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33527      # a path prefixed by /cygdrive for fixpath to work.
33528      new_path="$CYGWIN_ROOT_PATH$input_path"
33529    fi
33530  fi
33531
33532
33533  if test "x$path" != "x$new_path"; then
33534    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33536$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33537  fi
33538
33539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33540
33541  path="$POTENTIAL_FREETYPE_LIB_PATH"
33542  has_colon=`$ECHO $path | $GREP ^.:`
33543  new_path="$path"
33544  if test "x$has_colon" = x; then
33545    # Not in mixed or Windows style, start by that.
33546    new_path=`cmd //c echo $path`
33547  fi
33548
33549
33550  input_path="$new_path"
33551  # Check if we need to convert this using DOS-style short mode. If the path
33552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33553  # take no chances and rewrite it.
33554  # Note: m4 eats our [], so we need to use [ and ] instead.
33555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33556  if test "x$has_forbidden_chars" != x; then
33557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33559  fi
33560
33561
33562  windows_path="$new_path"
33563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33564    unix_path=`$CYGPATH -u "$windows_path"`
33565    new_path="$unix_path"
33566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33568    new_path="$unix_path"
33569  fi
33570
33571  if test "x$path" != "x$new_path"; then
33572    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33575  fi
33576
33577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33579
33580  else
33581    # We're on a posix platform. Hooray! :)
33582    path="$POTENTIAL_FREETYPE_LIB_PATH"
33583    has_space=`$ECHO "$path" | $GREP " "`
33584    if test "x$has_space" != x; then
33585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33588    fi
33589
33590    # Use eval to expand a potential ~
33591    eval path="$path"
33592    if test ! -f "$path" && test ! -d "$path"; then
33593      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33594    fi
33595
33596    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33597  fi
33598
33599
33600    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33602$as_echo_n "checking for freetype includes... " >&6; }
33603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33604$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33605    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33607$as_echo_n "checking for freetype libraries... " >&6; }
33608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33609$as_echo "$FREETYPE_LIB_PATH" >&6; }
33610  fi
33611
33612              if test "x$FOUND_FREETYPE" != xyes; then
33613
33614  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33615  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33616  METHOD="well-known location"
33617
33618  # First check if the files exists.
33619  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33620    # We found an arbitrary include file. That's a good sign.
33621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33622$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33623    FOUND_FREETYPE=yes
33624
33625    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33626    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33627      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33628$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33629      FOUND_FREETYPE=no
33630    else
33631      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33632        # On Windows, we will need both .lib and .dll file.
33633        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33634          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33636          FOUND_FREETYPE=no
33637        fi
33638      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
33639        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33640        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33641      fi
33642    fi
33643  fi
33644
33645  if test "x$FOUND_FREETYPE" = xyes; then
33646
33647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33648
33649  # Input might be given as Windows format, start by converting to
33650  # unix format.
33651  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33652  new_path=`$CYGPATH -u "$path"`
33653
33654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33657  # "foo.exe" is OK but "foo" is an error.
33658  #
33659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33660  # It is also a way to make sure we got the proper file name for the real test later on.
33661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33662  if test "x$test_shortpath" = x; then
33663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33664$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33665    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33666  fi
33667
33668  # Call helper function which possibly converts this using DOS-style short mode.
33669  # If so, the updated path is stored in $new_path.
33670
33671  input_path="$new_path"
33672  # Check if we need to convert this using DOS-style short mode. If the path
33673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33674  # take no chances and rewrite it.
33675  # Note: m4 eats our [], so we need to use [ and ] instead.
33676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33677  if test "x$has_forbidden_chars" != x; then
33678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33682      # Going to short mode and back again did indeed matter. Since short mode is
33683      # case insensitive, let's make it lowercase to improve readability.
33684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33685      # Now convert it back to Unix-stile (cygpath)
33686      input_path=`$CYGPATH -u "$shortmode_path"`
33687      new_path="$input_path"
33688    fi
33689  fi
33690
33691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33692  if test "x$test_cygdrive_prefix" = x; then
33693    # As a simple fix, exclude /usr/bin since it's not a real path.
33694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33696      # a path prefixed by /cygdrive for fixpath to work.
33697      new_path="$CYGWIN_ROOT_PATH$input_path"
33698    fi
33699  fi
33700
33701
33702  if test "x$path" != "x$new_path"; then
33703    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33705$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33706  fi
33707
33708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33709
33710  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33711  has_colon=`$ECHO $path | $GREP ^.:`
33712  new_path="$path"
33713  if test "x$has_colon" = x; then
33714    # Not in mixed or Windows style, start by that.
33715    new_path=`cmd //c echo $path`
33716  fi
33717
33718
33719  input_path="$new_path"
33720  # Check if we need to convert this using DOS-style short mode. If the path
33721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33722  # take no chances and rewrite it.
33723  # Note: m4 eats our [], so we need to use [ and ] instead.
33724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33725  if test "x$has_forbidden_chars" != x; then
33726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33728  fi
33729
33730
33731  windows_path="$new_path"
33732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33733    unix_path=`$CYGPATH -u "$windows_path"`
33734    new_path="$unix_path"
33735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33737    new_path="$unix_path"
33738  fi
33739
33740  if test "x$path" != "x$new_path"; then
33741    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33743$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33744  fi
33745
33746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33748
33749  else
33750    # We're on a posix platform. Hooray! :)
33751    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33752    has_space=`$ECHO "$path" | $GREP " "`
33753    if test "x$has_space" != x; then
33754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33755$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33756      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33757    fi
33758
33759    # Use eval to expand a potential ~
33760    eval path="$path"
33761    if test ! -f "$path" && test ! -d "$path"; then
33762      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33763    fi
33764
33765    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33766  fi
33767
33768
33769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33770
33771  # Input might be given as Windows format, start by converting to
33772  # unix format.
33773  path="$POTENTIAL_FREETYPE_LIB_PATH"
33774  new_path=`$CYGPATH -u "$path"`
33775
33776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33779  # "foo.exe" is OK but "foo" is an error.
33780  #
33781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33782  # It is also a way to make sure we got the proper file name for the real test later on.
33783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33784  if test "x$test_shortpath" = x; then
33785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33786$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33787    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33788  fi
33789
33790  # Call helper function which possibly converts this using DOS-style short mode.
33791  # If so, the updated path is stored in $new_path.
33792
33793  input_path="$new_path"
33794  # Check if we need to convert this using DOS-style short mode. If the path
33795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33796  # take no chances and rewrite it.
33797  # Note: m4 eats our [], so we need to use [ and ] instead.
33798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33799  if test "x$has_forbidden_chars" != x; then
33800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33804      # Going to short mode and back again did indeed matter. Since short mode is
33805      # case insensitive, let's make it lowercase to improve readability.
33806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33807      # Now convert it back to Unix-stile (cygpath)
33808      input_path=`$CYGPATH -u "$shortmode_path"`
33809      new_path="$input_path"
33810    fi
33811  fi
33812
33813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33814  if test "x$test_cygdrive_prefix" = x; then
33815    # As a simple fix, exclude /usr/bin since it's not a real path.
33816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33818      # a path prefixed by /cygdrive for fixpath to work.
33819      new_path="$CYGWIN_ROOT_PATH$input_path"
33820    fi
33821  fi
33822
33823
33824  if test "x$path" != "x$new_path"; then
33825    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33828  fi
33829
33830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33831
33832  path="$POTENTIAL_FREETYPE_LIB_PATH"
33833  has_colon=`$ECHO $path | $GREP ^.:`
33834  new_path="$path"
33835  if test "x$has_colon" = x; then
33836    # Not in mixed or Windows style, start by that.
33837    new_path=`cmd //c echo $path`
33838  fi
33839
33840
33841  input_path="$new_path"
33842  # Check if we need to convert this using DOS-style short mode. If the path
33843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33844  # take no chances and rewrite it.
33845  # Note: m4 eats our [], so we need to use [ and ] instead.
33846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33847  if test "x$has_forbidden_chars" != x; then
33848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33850  fi
33851
33852
33853  windows_path="$new_path"
33854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33855    unix_path=`$CYGPATH -u "$windows_path"`
33856    new_path="$unix_path"
33857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33859    new_path="$unix_path"
33860  fi
33861
33862  if test "x$path" != "x$new_path"; then
33863    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33865$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33866  fi
33867
33868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33870
33871  else
33872    # We're on a posix platform. Hooray! :)
33873    path="$POTENTIAL_FREETYPE_LIB_PATH"
33874    has_space=`$ECHO "$path" | $GREP " "`
33875    if test "x$has_space" != x; then
33876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33877$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33878      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33879    fi
33880
33881    # Use eval to expand a potential ~
33882    eval path="$path"
33883    if test ! -f "$path" && test ! -d "$path"; then
33884      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33885    fi
33886
33887    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33888  fi
33889
33890
33891    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33893$as_echo_n "checking for freetype includes... " >&6; }
33894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33895$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33896    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33898$as_echo_n "checking for freetype libraries... " >&6; }
33899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33900$as_echo "$FREETYPE_LIB_PATH" >&6; }
33901  fi
33902
33903              fi
33904            fi
33905          fi
33906        fi
33907      fi # end check in well-known locations
33908
33909      if test "x$FOUND_FREETYPE" != xyes; then
33910
33911  # Print a helpful message on how to acquire the necessary build dependency.
33912  # freetype is the help tag: freetype, cups, pulse, alsa etc
33913  MISSING_DEPENDENCY=freetype
33914
33915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33916    cygwin_help $MISSING_DEPENDENCY
33917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33918    msys_help $MISSING_DEPENDENCY
33919  else
33920    PKGHANDLER_COMMAND=
33921
33922    case $PKGHANDLER in
33923      apt-get)
33924        apt_help     $MISSING_DEPENDENCY ;;
33925      yum)
33926        yum_help     $MISSING_DEPENDENCY ;;
33927      port)
33928        port_help    $MISSING_DEPENDENCY ;;
33929      pkgutil)
33930        pkgutil_help $MISSING_DEPENDENCY ;;
33931      pkgadd)
33932        pkgadd_help  $MISSING_DEPENDENCY ;;
33933      * )
33934        break ;;
33935    esac
33936
33937    if test "x$PKGHANDLER_COMMAND" != x; then
33938      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33939    fi
33940  fi
33941
33942        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
33943      fi
33944    fi # end user specified settings
33945
33946    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
33947    if test "x$FREETYPE_CFLAGS" = x; then
33948
33949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33950
33951  # Input might be given as Windows format, start by converting to
33952  # unix format.
33953  path="$FREETYPE_INCLUDE_PATH"
33954  new_path=`$CYGPATH -u "$path"`
33955
33956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33959  # "foo.exe" is OK but "foo" is an error.
33960  #
33961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33962  # It is also a way to make sure we got the proper file name for the real test later on.
33963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33964  if test "x$test_shortpath" = x; then
33965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33966$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33967    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
33968  fi
33969
33970  # Call helper function which possibly converts this using DOS-style short mode.
33971  # If so, the updated path is stored in $new_path.
33972
33973  input_path="$new_path"
33974  # Check if we need to convert this using DOS-style short mode. If the path
33975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33976  # take no chances and rewrite it.
33977  # Note: m4 eats our [], so we need to use [ and ] instead.
33978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33979  if test "x$has_forbidden_chars" != x; then
33980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33984      # Going to short mode and back again did indeed matter. Since short mode is
33985      # case insensitive, let's make it lowercase to improve readability.
33986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33987      # Now convert it back to Unix-stile (cygpath)
33988      input_path=`$CYGPATH -u "$shortmode_path"`
33989      new_path="$input_path"
33990    fi
33991  fi
33992
33993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33994  if test "x$test_cygdrive_prefix" = x; then
33995    # As a simple fix, exclude /usr/bin since it's not a real path.
33996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33998      # a path prefixed by /cygdrive for fixpath to work.
33999      new_path="$CYGWIN_ROOT_PATH$input_path"
34000    fi
34001  fi
34002
34003
34004  if test "x$path" != "x$new_path"; then
34005    FREETYPE_INCLUDE_PATH="$new_path"
34006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34007$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34008  fi
34009
34010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34011
34012  path="$FREETYPE_INCLUDE_PATH"
34013  has_colon=`$ECHO $path | $GREP ^.:`
34014  new_path="$path"
34015  if test "x$has_colon" = x; then
34016    # Not in mixed or Windows style, start by that.
34017    new_path=`cmd //c echo $path`
34018  fi
34019
34020
34021  input_path="$new_path"
34022  # Check if we need to convert this using DOS-style short mode. If the path
34023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34024  # take no chances and rewrite it.
34025  # Note: m4 eats our [], so we need to use [ and ] instead.
34026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34027  if test "x$has_forbidden_chars" != x; then
34028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34030  fi
34031
34032
34033  windows_path="$new_path"
34034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34035    unix_path=`$CYGPATH -u "$windows_path"`
34036    new_path="$unix_path"
34037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34039    new_path="$unix_path"
34040  fi
34041
34042  if test "x$path" != "x$new_path"; then
34043    FREETYPE_INCLUDE_PATH="$new_path"
34044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34045$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34046  fi
34047
34048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34050
34051  else
34052    # We're on a posix platform. Hooray! :)
34053    path="$FREETYPE_INCLUDE_PATH"
34054    has_space=`$ECHO "$path" | $GREP " "`
34055    if test "x$has_space" != x; then
34056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34057$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34058      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34059    fi
34060
34061    # Use eval to expand a potential ~
34062    eval path="$path"
34063    if test ! -f "$path" && test ! -d "$path"; then
34064      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34065    fi
34066
34067    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34068  fi
34069
34070      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34071        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34072      else
34073        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34074      fi
34075    fi
34076
34077    if test "x$FREETYPE_LIBS" = x; then
34078
34079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34080
34081  # Input might be given as Windows format, start by converting to
34082  # unix format.
34083  path="$FREETYPE_LIB_PATH"
34084  new_path=`$CYGPATH -u "$path"`
34085
34086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34089  # "foo.exe" is OK but "foo" is an error.
34090  #
34091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34092  # It is also a way to make sure we got the proper file name for the real test later on.
34093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34094  if test "x$test_shortpath" = x; then
34095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34096$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34097    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34098  fi
34099
34100  # Call helper function which possibly converts this using DOS-style short mode.
34101  # If so, the updated path is stored in $new_path.
34102
34103  input_path="$new_path"
34104  # Check if we need to convert this using DOS-style short mode. If the path
34105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34106  # take no chances and rewrite it.
34107  # Note: m4 eats our [], so we need to use [ and ] instead.
34108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34109  if test "x$has_forbidden_chars" != x; then
34110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34114      # Going to short mode and back again did indeed matter. Since short mode is
34115      # case insensitive, let's make it lowercase to improve readability.
34116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34117      # Now convert it back to Unix-stile (cygpath)
34118      input_path=`$CYGPATH -u "$shortmode_path"`
34119      new_path="$input_path"
34120    fi
34121  fi
34122
34123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34124  if test "x$test_cygdrive_prefix" = x; then
34125    # As a simple fix, exclude /usr/bin since it's not a real path.
34126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34128      # a path prefixed by /cygdrive for fixpath to work.
34129      new_path="$CYGWIN_ROOT_PATH$input_path"
34130    fi
34131  fi
34132
34133
34134  if test "x$path" != "x$new_path"; then
34135    FREETYPE_LIB_PATH="$new_path"
34136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34137$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34138  fi
34139
34140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34141
34142  path="$FREETYPE_LIB_PATH"
34143  has_colon=`$ECHO $path | $GREP ^.:`
34144  new_path="$path"
34145  if test "x$has_colon" = x; then
34146    # Not in mixed or Windows style, start by that.
34147    new_path=`cmd //c echo $path`
34148  fi
34149
34150
34151  input_path="$new_path"
34152  # Check if we need to convert this using DOS-style short mode. If the path
34153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34154  # take no chances and rewrite it.
34155  # Note: m4 eats our [], so we need to use [ and ] instead.
34156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34157  if test "x$has_forbidden_chars" != x; then
34158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34160  fi
34161
34162
34163  windows_path="$new_path"
34164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34165    unix_path=`$CYGPATH -u "$windows_path"`
34166    new_path="$unix_path"
34167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34169    new_path="$unix_path"
34170  fi
34171
34172  if test "x$path" != "x$new_path"; then
34173    FREETYPE_LIB_PATH="$new_path"
34174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34175$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34176  fi
34177
34178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34180
34181  else
34182    # We're on a posix platform. Hooray! :)
34183    path="$FREETYPE_LIB_PATH"
34184    has_space=`$ECHO "$path" | $GREP " "`
34185    if test "x$has_space" != x; then
34186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34187$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34189    fi
34190
34191    # Use eval to expand a potential ~
34192    eval path="$path"
34193    if test ! -f "$path" && test ! -d "$path"; then
34194      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34195    fi
34196
34197    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34198  fi
34199
34200      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34201        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34202      else
34203        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34204      fi
34205    fi
34206
34207    # Try to compile it
34208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34209$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34210    ac_ext=cpp
34211ac_cpp='$CXXCPP $CPPFLAGS'
34212ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34213ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34214ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34215
34216    PREV_CXXCFLAGS="$CXXFLAGS"
34217    PREV_LIBS="$LIBS"
34218    PREV_CXX="$CXX"
34219    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34220    LIBS="$LIBS $FREETYPE_LIBS"
34221    CXX="$FIXPATH $CXX"
34222    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34223/* end confdefs.h.  */
34224
34225          #include<ft2build.h>
34226          #include FT_FREETYPE_H
34227          int main () {
34228            FT_Init_FreeType(NULL);
34229            return 0;
34230          }
34231
34232_ACEOF
34233if ac_fn_cxx_try_link "$LINENO"; then :
34234
34235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34236$as_echo "yes" >&6; }
34237
34238else
34239
34240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34241$as_echo "no" >&6; }
34242          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34243$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34244          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34245$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34246
34247
34248  # Print a helpful message on how to acquire the necessary build dependency.
34249  # freetype is the help tag: freetype, cups, pulse, alsa etc
34250  MISSING_DEPENDENCY=freetype
34251
34252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34253    cygwin_help $MISSING_DEPENDENCY
34254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34255    msys_help $MISSING_DEPENDENCY
34256  else
34257    PKGHANDLER_COMMAND=
34258
34259    case $PKGHANDLER in
34260      apt-get)
34261        apt_help     $MISSING_DEPENDENCY ;;
34262      yum)
34263        yum_help     $MISSING_DEPENDENCY ;;
34264      port)
34265        port_help    $MISSING_DEPENDENCY ;;
34266      pkgutil)
34267        pkgutil_help $MISSING_DEPENDENCY ;;
34268      pkgadd)
34269        pkgadd_help  $MISSING_DEPENDENCY ;;
34270      * )
34271        break ;;
34272    esac
34273
34274    if test "x$PKGHANDLER_COMMAND" != x; then
34275      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34276    fi
34277  fi
34278
34279
34280          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34281
34282
34283fi
34284rm -f core conftest.err conftest.$ac_objext \
34285    conftest$ac_exeext conftest.$ac_ext
34286    CXXCFLAGS="$PREV_CXXFLAGS"
34287    LIBS="$PREV_LIBS"
34288    CXX="$PREV_CXX"
34289    ac_ext=cpp
34290ac_cpp='$CXXCPP $CPPFLAGS'
34291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34294
34295
34296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34297$as_echo_n "checking if we should bundle freetype... " >&6; }
34298    if test "x$BUNDLE_FREETYPE" = xyes; then
34299      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34300    fi
34301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34302$as_echo "$BUNDLE_FREETYPE" >&6; }
34303
34304  fi # end freetype needed
34305
34306
34307
34308
34309
34310
34311
34312  ###############################################################################
34313  #
34314  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34315  #
34316
34317# Check whether --with-alsa was given.
34318if test "${with_alsa+set}" = set; then :
34319  withval=$with_alsa;
34320fi
34321
34322
34323# Check whether --with-alsa-include was given.
34324if test "${with_alsa_include+set}" = set; then :
34325  withval=$with_alsa_include;
34326fi
34327
34328
34329# Check whether --with-alsa-lib was given.
34330if test "${with_alsa_lib+set}" = set; then :
34331  withval=$with_alsa_lib;
34332fi
34333
34334
34335  if test "x$ALSA_NOT_NEEDED" = xyes; then
34336    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34337      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34338$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34339    fi
34340    ALSA_CFLAGS=
34341    ALSA_LIBS=
34342  else
34343    ALSA_FOUND=no
34344
34345    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34346      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34347    fi
34348
34349    if test "x${with_alsa}" != x; then
34350      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34351      ALSA_CFLAGS="-I${with_alsa}/include"
34352      ALSA_FOUND=yes
34353    fi
34354    if test "x${with_alsa_include}" != x; then
34355      ALSA_CFLAGS="-I${with_alsa_include}"
34356      ALSA_FOUND=yes
34357    fi
34358    if test "x${with_alsa_lib}" != x; then
34359      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34360      ALSA_FOUND=yes
34361    fi
34362    if test "x$ALSA_FOUND" = xno; then
34363
34364
34365  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34366    # Source the builddeps file again, to make sure it uses the latest variables!
34367    . $builddepsfile
34368    # Look for a target and build machine specific resource!
34369    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34370    if test "x$resource" = x; then
34371      # Ok, lets instead look for a target specific resource
34372      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34373    fi
34374    if test "x$resource" = x; then
34375      # Ok, lets instead look for a build specific resource
34376      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34377    fi
34378    if test "x$resource" = x; then
34379      # Ok, lets instead look for a generic resource
34380      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34381      resource=${builddep_alsa}
34382    fi
34383    if test "x$resource" != x; then
34384      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34385$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34386      # If the resource in the builddeps.conf file is an existing directory,
34387      # for example /java/linux/cups
34388      if test -d ${resource}; then
34389        depdir=${resource}
34390      else
34391
34392  # alsa is for example mymodule
34393  # $resource is for example libs/general/libmymod_1_2_3.zip
34394  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34395  # $with_builddeps_dir is for example /localhome/builddeps
34396  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34397  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34398  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34399  filename=`basename $resource`
34400  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34401  filebase=${filename%%.*}
34402  extension=${filename#*.}
34403  installdir=$with_builddeps_dir/$filebase
34404  if test ! -f $installdir/$filename.unpacked; then
34405    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34406$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34407    if test ! -d $installdir; then
34408      mkdir -p $installdir
34409    fi
34410    if test ! -d $installdir; then
34411      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34412    fi
34413    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34414    touch $tmpfile
34415    if test ! -f $tmpfile; then
34416      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34417    fi
34418
34419  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34420  # $tmpfile is the local file name for the downloaded file.
34421  VALID_TOOL=no
34422  if test "x$BDEPS_FTP" = xwget; then
34423    VALID_TOOL=yes
34424    wget -O $tmpfile $with_builddeps_server/$resource
34425  fi
34426  if test "x$BDEPS_FTP" = xlftp; then
34427    VALID_TOOL=yes
34428    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34429  fi
34430  if test "x$BDEPS_FTP" = xftp; then
34431    VALID_TOOL=yes
34432    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34433    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34434    FTPUSERPWD=${FTPSERVER%%@*}
34435    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34436      FTPUSER=${userpwd%%:*}
34437      FTPPWD=${userpwd#*@}
34438      FTPSERVER=${FTPSERVER#*@}
34439    else
34440      FTPUSER=ftp
34441      FTPPWD=ftp
34442    fi
34443    # the "pass" command does not work on some
34444    # ftp clients (read ftp.exe) but if it works,
34445    # passive mode is better!
34446    ( \
34447        echo "user $FTPUSER $FTPPWD"        ; \
34448        echo "pass"                         ; \
34449        echo "bin"                          ; \
34450        echo "get $FTPPATH $tmpfile"              ; \
34451    ) | ftp -in $FTPSERVER
34452  fi
34453  if test "x$VALID_TOOL" != xyes; then
34454    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34455  fi
34456
34457    mv $tmpfile $installdir/$filename
34458    if test ! -s $installdir/$filename; then
34459      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34460    fi
34461    case "$extension" in
34462      zip)  echo "Unzipping $installdir/$filename..."
34463        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34464        ;;
34465      tar.gz) echo "Untaring $installdir/$filename..."
34466        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34467        ;;
34468      tgz) echo "Untaring $installdir/$filename..."
34469        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34470        ;;
34471      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34472        ;;
34473    esac
34474  fi
34475  if test -f $installdir/$filename.unpacked; then
34476    depdir=$installdir
34477  fi
34478
34479      fi
34480      # Source the builddeps file again, because in the previous command, the depdir
34481      # was updated to point at the current build dependency install directory.
34482      . $builddepsfile
34483      # Now extract variables from the builddeps.conf files.
34484      theroot=${builddep_alsa_ROOT}
34485      thecflags=${builddep_alsa_CFLAGS}
34486      thelibs=${builddep_alsa_LIBS}
34487      if test "x$depdir" = x; then
34488        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34489      fi
34490      ALSA=$depdir
34491      if test "x$theroot" != x; then
34492        ALSA="$theroot"
34493      fi
34494      if test "x$thecflags" != x; then
34495        ALSA_CFLAGS="$thecflags"
34496      fi
34497      if test "x$thelibs" != x; then
34498        ALSA_LIBS="$thelibs"
34499      fi
34500      ALSA_FOUND=yes
34501      else ALSA_FOUND=no
34502
34503    fi
34504    else ALSA_FOUND=no
34505
34506  fi
34507
34508    fi
34509    if test "x$ALSA_FOUND" = xno; then
34510
34511pkg_failed=no
34512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34513$as_echo_n "checking for ALSA... " >&6; }
34514
34515if test -n "$ALSA_CFLAGS"; then
34516    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34517 elif test -n "$PKG_CONFIG"; then
34518    if test -n "$PKG_CONFIG" && \
34519    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34520  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34521  ac_status=$?
34522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34523  test $ac_status = 0; }; then
34524  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34525else
34526  pkg_failed=yes
34527fi
34528 else
34529    pkg_failed=untried
34530fi
34531if test -n "$ALSA_LIBS"; then
34532    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34533 elif test -n "$PKG_CONFIG"; then
34534    if test -n "$PKG_CONFIG" && \
34535    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34536  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34537  ac_status=$?
34538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34539  test $ac_status = 0; }; then
34540  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34541else
34542  pkg_failed=yes
34543fi
34544 else
34545    pkg_failed=untried
34546fi
34547
34548
34549
34550if test $pkg_failed = yes; then
34551
34552if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34553        _pkg_short_errors_supported=yes
34554else
34555        _pkg_short_errors_supported=no
34556fi
34557        if test $_pkg_short_errors_supported = yes; then
34558	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34559        else
34560	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34561        fi
34562	# Put the nasty error message in config.log where it belongs
34563	echo "$ALSA_PKG_ERRORS" >&5
34564
34565	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34566$as_echo "no" >&6; }
34567                ALSA_FOUND=no
34568elif test $pkg_failed = untried; then
34569	ALSA_FOUND=no
34570else
34571	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34572	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34574$as_echo "yes" >&6; }
34575	ALSA_FOUND=yes
34576fi
34577    fi
34578    if test "x$ALSA_FOUND" = xno; then
34579      for ac_header in alsa/asoundlib.h
34580do :
34581  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34582if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34583  cat >>confdefs.h <<_ACEOF
34584#define HAVE_ALSA_ASOUNDLIB_H 1
34585_ACEOF
34586
34587            ALSA_FOUND=yes
34588            ALSA_CFLAGS=-Iignoreme
34589            ALSA_LIBS=-lasound
34590            DEFAULT_ALSA=yes
34591
34592else
34593  ALSA_FOUND=no
34594fi
34595
34596done
34597
34598    fi
34599    if test "x$ALSA_FOUND" = xno; then
34600
34601  # Print a helpful message on how to acquire the necessary build dependency.
34602  # alsa is the help tag: freetype, cups, pulse, alsa etc
34603  MISSING_DEPENDENCY=alsa
34604
34605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34606    cygwin_help $MISSING_DEPENDENCY
34607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34608    msys_help $MISSING_DEPENDENCY
34609  else
34610    PKGHANDLER_COMMAND=
34611
34612    case $PKGHANDLER in
34613      apt-get)
34614        apt_help     $MISSING_DEPENDENCY ;;
34615      yum)
34616        yum_help     $MISSING_DEPENDENCY ;;
34617      port)
34618        port_help    $MISSING_DEPENDENCY ;;
34619      pkgutil)
34620        pkgutil_help $MISSING_DEPENDENCY ;;
34621      pkgadd)
34622        pkgadd_help  $MISSING_DEPENDENCY ;;
34623      * )
34624        break ;;
34625    esac
34626
34627    if test "x$PKGHANDLER_COMMAND" != x; then
34628      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34629    fi
34630  fi
34631
34632      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34633    fi
34634  fi
34635
34636
34637
34638
34639
34640
34641  ###############################################################################
34642  #
34643  # Check for the jpeg library
34644  #
34645
34646  USE_EXTERNAL_LIBJPEG=true
34647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34648$as_echo_n "checking for main in -ljpeg... " >&6; }
34649if ${ac_cv_lib_jpeg_main+:} false; then :
34650  $as_echo_n "(cached) " >&6
34651else
34652  ac_check_lib_save_LIBS=$LIBS
34653LIBS="-ljpeg  $LIBS"
34654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34655/* end confdefs.h.  */
34656
34657
34658int
34659main ()
34660{
34661return main ();
34662  ;
34663  return 0;
34664}
34665_ACEOF
34666if ac_fn_cxx_try_link "$LINENO"; then :
34667  ac_cv_lib_jpeg_main=yes
34668else
34669  ac_cv_lib_jpeg_main=no
34670fi
34671rm -f core conftest.err conftest.$ac_objext \
34672    conftest$ac_exeext conftest.$ac_ext
34673LIBS=$ac_check_lib_save_LIBS
34674fi
34675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34676$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34677if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34678  cat >>confdefs.h <<_ACEOF
34679#define HAVE_LIBJPEG 1
34680_ACEOF
34681
34682  LIBS="-ljpeg $LIBS"
34683
34684else
34685   USE_EXTERNAL_LIBJPEG=false
34686      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34687$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34688
34689fi
34690
34691
34692
34693  ###############################################################################
34694  #
34695  # Check for the gif library
34696  #
34697
34698
34699# Check whether --with-giflib was given.
34700if test "${with_giflib+set}" = set; then :
34701  withval=$with_giflib;
34702fi
34703
34704
34705
34706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34707$as_echo_n "checking for which giflib to use... " >&6; }
34708
34709  # default is bundled
34710  DEFAULT_GIFLIB=bundled
34711
34712  #
34713  # if user didn't specify, use DEFAULT_GIFLIB
34714  #
34715  if test "x${with_giflib}" = "x"; then
34716    with_giflib=${DEFAULT_GIFLIB}
34717  fi
34718
34719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34720$as_echo "${with_giflib}" >&6; }
34721
34722  if test "x${with_giflib}" = "xbundled"; then
34723    USE_EXTERNAL_LIBGIF=false
34724  elif test "x${with_giflib}" = "xsystem"; then
34725    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34726if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34727
34728else
34729   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34730fi
34731
34732
34733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34734$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34735if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34736  $as_echo_n "(cached) " >&6
34737else
34738  ac_check_lib_save_LIBS=$LIBS
34739LIBS="-lgif  $LIBS"
34740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34741/* end confdefs.h.  */
34742
34743/* Override any GCC internal prototype to avoid an error.
34744   Use char because int might match the return type of a GCC
34745   builtin and then its argument prototype would still apply.  */
34746#ifdef __cplusplus
34747extern "C"
34748#endif
34749char DGifGetCode ();
34750int
34751main ()
34752{
34753return DGifGetCode ();
34754  ;
34755  return 0;
34756}
34757_ACEOF
34758if ac_fn_cxx_try_link "$LINENO"; then :
34759  ac_cv_lib_gif_DGifGetCode=yes
34760else
34761  ac_cv_lib_gif_DGifGetCode=no
34762fi
34763rm -f core conftest.err conftest.$ac_objext \
34764    conftest$ac_exeext conftest.$ac_ext
34765LIBS=$ac_check_lib_save_LIBS
34766fi
34767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34768$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34769if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34770  cat >>confdefs.h <<_ACEOF
34771#define HAVE_LIBGIF 1
34772_ACEOF
34773
34774  LIBS="-lgif $LIBS"
34775
34776else
34777   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34778fi
34779
34780
34781    USE_EXTERNAL_LIBGIF=true
34782  else
34783    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34784  fi
34785
34786
34787  ###############################################################################
34788  #
34789  # Check for the zlib library
34790  #
34791
34792
34793# Check whether --with-zlib was given.
34794if test "${with_zlib+set}" = set; then :
34795  withval=$with_zlib;
34796fi
34797
34798
34799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34800$as_echo_n "checking for compress in -lz... " >&6; }
34801if ${ac_cv_lib_z_compress+:} false; then :
34802  $as_echo_n "(cached) " >&6
34803else
34804  ac_check_lib_save_LIBS=$LIBS
34805LIBS="-lz  $LIBS"
34806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34807/* end confdefs.h.  */
34808
34809/* Override any GCC internal prototype to avoid an error.
34810   Use char because int might match the return type of a GCC
34811   builtin and then its argument prototype would still apply.  */
34812#ifdef __cplusplus
34813extern "C"
34814#endif
34815char compress ();
34816int
34817main ()
34818{
34819return compress ();
34820  ;
34821  return 0;
34822}
34823_ACEOF
34824if ac_fn_cxx_try_link "$LINENO"; then :
34825  ac_cv_lib_z_compress=yes
34826else
34827  ac_cv_lib_z_compress=no
34828fi
34829rm -f core conftest.err conftest.$ac_objext \
34830    conftest$ac_exeext conftest.$ac_ext
34831LIBS=$ac_check_lib_save_LIBS
34832fi
34833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34834$as_echo "$ac_cv_lib_z_compress" >&6; }
34835if test "x$ac_cv_lib_z_compress" = xyes; then :
34836   ZLIB_FOUND=yes
34837else
34838   ZLIB_FOUND=no
34839fi
34840
34841
34842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
34843$as_echo_n "checking for which zlib to use... " >&6; }
34844
34845  DEFAULT_ZLIB=bundled
34846  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
34847    #
34848    # On macosx default is system...on others default is
34849    #
34850    DEFAULT_ZLIB=system
34851  fi
34852
34853  if test "x${ZLIB_FOUND}" != "xyes"; then
34854    #
34855    # If we don't find any system...set default to bundled
34856    #
34857    DEFAULT_ZLIB=bundled
34858  fi
34859
34860  #
34861  # If user didn't specify, use DEFAULT_ZLIB
34862  #
34863  if test "x${with_zlib}" = "x"; then
34864    with_zlib=${DEFAULT_ZLIB}
34865  fi
34866
34867  if test "x${with_zlib}" = "xbundled"; then
34868    USE_EXTERNAL_LIBZ=false
34869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
34870$as_echo "bundled" >&6; }
34871  elif test "x${with_zlib}" = "xsystem"; then
34872    if test "x${ZLIB_FOUND}" = "xyes"; then
34873      USE_EXTERNAL_LIBZ=true
34874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
34875$as_echo "system" >&6; }
34876    else
34877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
34878$as_echo "system not found" >&6; }
34879      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
34880    fi
34881  else
34882    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
34883  fi
34884
34885
34886
34887  ###############################################################################
34888  LIBZIP_CAN_USE_MMAP=true
34889
34890
34891
34892  ###############################################################################
34893  #
34894  # Check if altzone exists in time.h
34895  #
34896
34897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34898/* end confdefs.h.  */
34899#include <time.h>
34900int
34901main ()
34902{
34903return (int)altzone;
34904  ;
34905  return 0;
34906}
34907_ACEOF
34908if ac_fn_cxx_try_link "$LINENO"; then :
34909  has_altzone=yes
34910else
34911  has_altzone=no
34912fi
34913rm -f core conftest.err conftest.$ac_objext \
34914    conftest$ac_exeext conftest.$ac_ext
34915  if test "x$has_altzone" = xyes; then
34916
34917$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
34918
34919  fi
34920
34921  ###############################################################################
34922  #
34923  # Check the maths library
34924  #
34925
34926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
34927$as_echo_n "checking for cos in -lm... " >&6; }
34928if ${ac_cv_lib_m_cos+:} false; then :
34929  $as_echo_n "(cached) " >&6
34930else
34931  ac_check_lib_save_LIBS=$LIBS
34932LIBS="-lm  $LIBS"
34933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34934/* end confdefs.h.  */
34935
34936/* Override any GCC internal prototype to avoid an error.
34937   Use char because int might match the return type of a GCC
34938   builtin and then its argument prototype would still apply.  */
34939#ifdef __cplusplus
34940extern "C"
34941#endif
34942char cos ();
34943int
34944main ()
34945{
34946return cos ();
34947  ;
34948  return 0;
34949}
34950_ACEOF
34951if ac_fn_cxx_try_link "$LINENO"; then :
34952  ac_cv_lib_m_cos=yes
34953else
34954  ac_cv_lib_m_cos=no
34955fi
34956rm -f core conftest.err conftest.$ac_objext \
34957    conftest$ac_exeext conftest.$ac_ext
34958LIBS=$ac_check_lib_save_LIBS
34959fi
34960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
34961$as_echo "$ac_cv_lib_m_cos" >&6; }
34962if test "x$ac_cv_lib_m_cos" = xyes; then :
34963  cat >>confdefs.h <<_ACEOF
34964#define HAVE_LIBM 1
34965_ACEOF
34966
34967  LIBS="-lm $LIBS"
34968
34969else
34970
34971        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
34972$as_echo "$as_me: Maths library was not found" >&6;}
34973
34974
34975fi
34976
34977
34978
34979  ###############################################################################
34980  #
34981  # Check for libdl.so
34982
34983  save_LIBS="$LIBS"
34984  LIBS=""
34985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
34986$as_echo_n "checking for dlopen in -ldl... " >&6; }
34987if ${ac_cv_lib_dl_dlopen+:} false; then :
34988  $as_echo_n "(cached) " >&6
34989else
34990  ac_check_lib_save_LIBS=$LIBS
34991LIBS="-ldl  $LIBS"
34992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34993/* end confdefs.h.  */
34994
34995/* Override any GCC internal prototype to avoid an error.
34996   Use char because int might match the return type of a GCC
34997   builtin and then its argument prototype would still apply.  */
34998#ifdef __cplusplus
34999extern "C"
35000#endif
35001char dlopen ();
35002int
35003main ()
35004{
35005return dlopen ();
35006  ;
35007  return 0;
35008}
35009_ACEOF
35010if ac_fn_cxx_try_link "$LINENO"; then :
35011  ac_cv_lib_dl_dlopen=yes
35012else
35013  ac_cv_lib_dl_dlopen=no
35014fi
35015rm -f core conftest.err conftest.$ac_objext \
35016    conftest$ac_exeext conftest.$ac_ext
35017LIBS=$ac_check_lib_save_LIBS
35018fi
35019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35020$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35021if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35022  cat >>confdefs.h <<_ACEOF
35023#define HAVE_LIBDL 1
35024_ACEOF
35025
35026  LIBS="-ldl $LIBS"
35027
35028fi
35029
35030  LIBDL="$LIBS"
35031
35032  LIBS="$save_LIBS"
35033
35034
35035  ###############################################################################
35036  #
35037  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35038  # dynamic build is configured on command line.
35039  #
35040
35041# Check whether --with-stdc++lib was given.
35042if test "${with_stdc__lib+set}" = set; then :
35043  withval=$with_stdc__lib;
35044        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35045                && test "x$with_stdc__lib" != xdefault; then
35046          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35047        fi
35048
35049else
35050  with_stdc__lib=default
35051
35052fi
35053
35054
35055  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35056    # Test if -lstdc++ works.
35057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35058$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35059    ac_ext=cpp
35060ac_cpp='$CXXCPP $CPPFLAGS'
35061ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35062ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35063ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35064
35065    OLD_CXXFLAGS="$CXXFLAGS"
35066    CXXFLAGS="$CXXFLAGS -lstdc++"
35067    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35068/* end confdefs.h.  */
35069
35070int
35071main ()
35072{
35073return 0;
35074  ;
35075  return 0;
35076}
35077_ACEOF
35078if ac_fn_cxx_try_link "$LINENO"; then :
35079  has_dynamic_libstdcxx=yes
35080else
35081  has_dynamic_libstdcxx=no
35082fi
35083rm -f core conftest.err conftest.$ac_objext \
35084    conftest$ac_exeext conftest.$ac_ext
35085    CXXFLAGS="$OLD_CXXFLAGS"
35086    ac_ext=cpp
35087ac_cpp='$CXXCPP $CPPFLAGS'
35088ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35089ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35090ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35091
35092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35093$as_echo "$has_dynamic_libstdcxx" >&6; }
35094
35095    # Test if stdc++ can be linked statically.
35096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35097$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35098    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35099    ac_ext=cpp
35100ac_cpp='$CXXCPP $CPPFLAGS'
35101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35104
35105    OLD_LIBS="$LIBS"
35106    OLD_CXX="$CXX"
35107    LIBS="$STATIC_STDCXX_FLAGS"
35108    CXX="$CC"
35109    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35110/* end confdefs.h.  */
35111
35112int
35113main ()
35114{
35115return 0;
35116  ;
35117  return 0;
35118}
35119_ACEOF
35120if ac_fn_cxx_try_link "$LINENO"; then :
35121  has_static_libstdcxx=yes
35122else
35123  has_static_libstdcxx=no
35124fi
35125rm -f core conftest.err conftest.$ac_objext \
35126    conftest$ac_exeext conftest.$ac_ext
35127    LIBS="$OLD_LIBS"
35128    CXX="$OLD_CXX"
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    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35136$as_echo "$has_static_libstdcxx" >&6; }
35137
35138    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35139      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35140    fi
35141
35142    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35143      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35144    fi
35145
35146    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35147      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35148    fi
35149
35150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35151$as_echo_n "checking how to link with libstdc++... " >&6; }
35152    # If dynamic was requested, it's available since it would fail above otherwise.
35153    # If dynamic wasn't requested, go with static unless it isn't available.
35154    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35155      LIBCXX="$LIBCXX -lstdc++"
35156      LDCXX="$CXX"
35157      STATIC_CXX_SETTING="STATIC_CXX=false"
35158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35159$as_echo "dynamic" >&6; }
35160    else
35161      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35162      LDCXX="$CC"
35163      STATIC_CXX_SETTING="STATIC_CXX=true"
35164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35165$as_echo "static" >&6; }
35166    fi
35167  fi
35168
35169
35170  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35171    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35172
35173pkg_failed=no
35174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35175$as_echo_n "checking for LIBFFI... " >&6; }
35176
35177if test -n "$LIBFFI_CFLAGS"; then
35178    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35179 elif test -n "$PKG_CONFIG"; then
35180    if test -n "$PKG_CONFIG" && \
35181    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35182  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35183  ac_status=$?
35184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35185  test $ac_status = 0; }; then
35186  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35187else
35188  pkg_failed=yes
35189fi
35190 else
35191    pkg_failed=untried
35192fi
35193if test -n "$LIBFFI_LIBS"; then
35194    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35195 elif test -n "$PKG_CONFIG"; then
35196    if test -n "$PKG_CONFIG" && \
35197    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35198  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35199  ac_status=$?
35200  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35201  test $ac_status = 0; }; then
35202  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35203else
35204  pkg_failed=yes
35205fi
35206 else
35207    pkg_failed=untried
35208fi
35209
35210
35211
35212if test $pkg_failed = yes; then
35213
35214if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35215        _pkg_short_errors_supported=yes
35216else
35217        _pkg_short_errors_supported=no
35218fi
35219        if test $_pkg_short_errors_supported = yes; then
35220	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35221        else
35222	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35223        fi
35224	# Put the nasty error message in config.log where it belongs
35225	echo "$LIBFFI_PKG_ERRORS" >&5
35226
35227	as_fn_error $? "Package requirements (libffi) were not met:
35228
35229$LIBFFI_PKG_ERRORS
35230
35231Consider adjusting the PKG_CONFIG_PATH environment variable if you
35232installed software in a non-standard prefix.
35233
35234Alternatively, you may set the environment variables LIBFFI_CFLAGS
35235and LIBFFI_LIBS to avoid the need to call pkg-config.
35236See the pkg-config man page for more details.
35237" "$LINENO" 5
35238elif test $pkg_failed = untried; then
35239	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35241as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35242is in your PATH or set the PKG_CONFIG environment variable to the full
35243path to pkg-config.
35244
35245Alternatively, you may set the environment variables LIBFFI_CFLAGS
35246and LIBFFI_LIBS to avoid the need to call pkg-config.
35247See the pkg-config man page for more details.
35248
35249To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35250See \`config.log' for more details" "$LINENO" 5; }
35251else
35252	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35253	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35255$as_echo "yes" >&6; }
35256	:
35257fi
35258
35259  fi
35260
35261  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35262    # Extract the first word of "llvm-config", so it can be a program name with args.
35263set dummy llvm-config; ac_word=$2
35264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265$as_echo_n "checking for $ac_word... " >&6; }
35266if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35267  $as_echo_n "(cached) " >&6
35268else
35269  if test -n "$LLVM_CONFIG"; then
35270  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35271else
35272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35273for as_dir in $PATH
35274do
35275  IFS=$as_save_IFS
35276  test -z "$as_dir" && as_dir=.
35277    for ac_exec_ext in '' $ac_executable_extensions; do
35278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35279    ac_cv_prog_LLVM_CONFIG="llvm-config"
35280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35281    break 2
35282  fi
35283done
35284  done
35285IFS=$as_save_IFS
35286
35287fi
35288fi
35289LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35290if test -n "$LLVM_CONFIG"; then
35291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35292$as_echo "$LLVM_CONFIG" >&6; }
35293else
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35295$as_echo "no" >&6; }
35296fi
35297
35298
35299
35300    if test "x$LLVM_CONFIG" != xllvm-config; then
35301      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35302    fi
35303
35304    llvm_components="jit mcjit engine nativecodegen native"
35305    unset LLVM_CFLAGS
35306    for flag in $("$LLVM_CONFIG" --cxxflags); do
35307      if echo "${flag}" | grep -q '^-[ID]'; then
35308        if test "${flag}" != "-D_DEBUG" ; then
35309          if test "${LLVM_CFLAGS}" != "" ; then
35310            LLVM_CFLAGS="${LLVM_CFLAGS} "
35311          fi
35312          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35313        fi
35314      fi
35315    done
35316    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35317    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35318
35319    unset LLVM_LDFLAGS
35320    for flag in $("${LLVM_CONFIG}" --ldflags); do
35321      if echo "${flag}" | grep -q '^-L'; then
35322        if test "${LLVM_LDFLAGS}" != ""; then
35323          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35324        fi
35325        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35326      fi
35327    done
35328
35329    unset LLVM_LIBS
35330    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35331      if echo "${flag}" | grep -q '^-l'; then
35332        if test "${LLVM_LIBS}" != ""; then
35333          LLVM_LIBS="${LLVM_LIBS} "
35334        fi
35335        LLVM_LIBS="${LLVM_LIBS}${flag}"
35336      fi
35337    done
35338
35339
35340
35341
35342  fi
35343
35344  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35345  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35346    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35347  fi
35348
35349  # TODO better (platform agnostic) test
35350  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35351    LIBCXX="-lstdc++"
35352  fi
35353
35354
35355
35356
35357
35358###############################################################################
35359#
35360# We need to do some final tweaking, when everything else is done.
35361#
35362###############################################################################
35363
35364
35365  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35366
35367
35368  # The name of the Service Agent jar.
35369  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35370  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35371    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35372  fi
35373
35374
35375
35376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35377$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35378
35379    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35380      ENABLE_INTREE_EC=yes
35381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35382$as_echo "yes" >&6; }
35383    else
35384      ENABLE_INTREE_EC=no
35385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35386$as_echo "no" >&6; }
35387    fi
35388
35389
35390
35391
35392###############################################################################
35393#
35394# Configure parts of the build that only affect the build performance,
35395# not the result.
35396#
35397###############################################################################
35398
35399
35400  # How many cores do we have on this build system?
35401
35402# Check whether --with-num-cores was given.
35403if test "${with_num_cores+set}" = set; then :
35404  withval=$with_num_cores;
35405fi
35406
35407  if test "x$with_num_cores" = x; then
35408    # The number of cores were not specified, try to probe them.
35409
35410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35411$as_echo_n "checking for number of cores... " >&6; }
35412  NUM_CORES=1
35413  FOUND_CORES=no
35414
35415  if test -f /proc/cpuinfo; then
35416    # Looks like a Linux (or cygwin) system
35417    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35418    FOUND_CORES=yes
35419  elif test -x /usr/sbin/psrinfo; then
35420    # Looks like a Solaris system
35421    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35422    FOUND_CORES=yes
35423  elif test -x /usr/sbin/system_profiler; then
35424    # Looks like a MacOSX system
35425    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35426    FOUND_CORES=yes
35427  elif test -n "$NUMBER_OF_PROCESSORS"; then
35428    # On windows, look in the env
35429    NUM_CORES=$NUMBER_OF_PROCESSORS
35430    FOUND_CORES=yes
35431  fi
35432
35433  if test "x$FOUND_CORES" = xyes; then
35434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35435$as_echo "$NUM_CORES" >&6; }
35436  else
35437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35438$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35440$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35441  fi
35442
35443  else
35444    NUM_CORES=$with_num_cores
35445  fi
35446
35447
35448
35449  # How much memory do we have on this build system?
35450
35451# Check whether --with-memory-size was given.
35452if test "${with_memory_size+set}" = set; then :
35453  withval=$with_memory_size;
35454fi
35455
35456  if test "x$with_memory_size" = x; then
35457    # The memory size was not specified, try to probe it.
35458
35459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35460$as_echo_n "checking for memory size... " >&6; }
35461  # Default to 1024 MB
35462  MEMORY_SIZE=1024
35463  FOUND_MEM=no
35464
35465  if test -f /proc/meminfo; then
35466    # Looks like a Linux (or cygwin) system
35467    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35468    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35469    FOUND_MEM=yes
35470  elif test -x /usr/sbin/prtconf; then
35471    # Looks like a Solaris system
35472    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
35473    FOUND_MEM=yes
35474  elif test -x /usr/sbin/system_profiler; then
35475    # Looks like a MacOSX system
35476    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35477    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35478    FOUND_MEM=yes
35479  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35480    # Windows, but without cygwin
35481    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35482    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35483    FOUND_MEM=yes
35484  fi
35485
35486  if test "x$FOUND_MEM" = xyes; then
35487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35488$as_echo "$MEMORY_SIZE MB" >&6; }
35489  else
35490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35491$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35493$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35494  fi
35495
35496  else
35497    MEMORY_SIZE=$with_memory_size
35498  fi
35499
35500
35501
35502  # Provide a decent default number of parallel jobs for make depending on
35503  # number of cores, amount of memory and machine architecture.
35504
35505# Check whether --with-jobs was given.
35506if test "${with_jobs+set}" = set; then :
35507  withval=$with_jobs;
35508fi
35509
35510  if test "x$with_jobs" = x; then
35511    # Number of jobs was not specified, calculate.
35512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35513$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35514    # Approximate memory in GB, rounding up a bit.
35515    memory_gb=`expr $MEMORY_SIZE / 1100`
35516    # Pick the lowest of memory in gb and number of cores.
35517    if test "$memory_gb" -lt "$NUM_CORES"; then
35518      JOBS="$memory_gb"
35519    else
35520      JOBS="$NUM_CORES"
35521      # On bigger machines, leave some room for other processes to run
35522      if test "$JOBS" -gt "4"; then
35523        JOBS=`expr $JOBS '*' 90 / 100`
35524      fi
35525    fi
35526    # Cap number of jobs to 16
35527    if test "$JOBS" -gt "16"; then
35528      JOBS=16
35529    fi
35530    if test "$JOBS" -eq "0"; then
35531      JOBS=1
35532    fi
35533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35534$as_echo "$JOBS" >&6; }
35535  else
35536    JOBS=$with_jobs
35537  fi
35538
35539
35540
35541# Setup smart javac (after cores and memory have been setup)
35542
35543
35544# Check whether --with-sjavac-server-java was given.
35545if test "${with_sjavac_server_java+set}" = set; then :
35546  withval=$with_sjavac_server_java;
35547fi
35548
35549
35550  if test "x$with_sjavac_server_java" != x; then
35551    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35552    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35553    if test "x$FOUND_VERSION" = x; then
35554      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35555    fi
35556  else
35557    SJAVAC_SERVER_JAVA=""
35558    # Hotspot specific options.
35559
35560  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35561  $ECHO "Command: $JAVA -verbosegc -version" >&5
35562  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35563  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35564  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35565  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35566    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35567    JVM_ARG_OK=true
35568  else
35569    $ECHO "Arg failed:" >&5
35570    $ECHO "$OUTPUT" >&5
35571    JVM_ARG_OK=false
35572  fi
35573
35574    # JRockit specific options.
35575
35576  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35577  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35578  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35579  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35580  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35581  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35582    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35583    JVM_ARG_OK=true
35584  else
35585    $ECHO "Arg failed:" >&5
35586    $ECHO "$OUTPUT" >&5
35587    JVM_ARG_OK=false
35588  fi
35589
35590    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35591  fi
35592
35593
35594  if test "$MEMORY_SIZE" -gt "2500"; then
35595
35596  $ECHO "Check if jvm arg is ok: -d64" >&5
35597  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35598  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35599  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35600  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35601  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35602    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35603    JVM_ARG_OK=true
35604  else
35605    $ECHO "Arg failed:" >&5
35606    $ECHO "$OUTPUT" >&5
35607    JVM_ARG_OK=false
35608  fi
35609
35610    if test "$JVM_ARG_OK" = true; then
35611      JVM_64BIT=true
35612      JVM_ARG_OK=false
35613    fi
35614  fi
35615
35616  if test "$JVM_64BIT" = true; then
35617    if test "$MEMORY_SIZE" -gt "17000"; then
35618
35619  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35620  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35621  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35622  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35623  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35624  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35625    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35626    JVM_ARG_OK=true
35627  else
35628    $ECHO "Arg failed:" >&5
35629    $ECHO "$OUTPUT" >&5
35630    JVM_ARG_OK=false
35631  fi
35632
35633    fi
35634    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35635
35636  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35637  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35638  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35639  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35640  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35641  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35642    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35643    JVM_ARG_OK=true
35644  else
35645    $ECHO "Arg failed:" >&5
35646    $ECHO "$OUTPUT" >&5
35647    JVM_ARG_OK=false
35648  fi
35649
35650    fi
35651    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35652
35653  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35654  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35655  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35656  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35657  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35658  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35659    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35660    JVM_ARG_OK=true
35661  else
35662    $ECHO "Arg failed:" >&5
35663    $ECHO "$OUTPUT" >&5
35664    JVM_ARG_OK=false
35665  fi
35666
35667    fi
35668    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35669
35670  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35671  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35672  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35673  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35674  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35675  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35676    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35677    JVM_ARG_OK=true
35678  else
35679    $ECHO "Arg failed:" >&5
35680    $ECHO "$OUTPUT" >&5
35681    JVM_ARG_OK=false
35682  fi
35683
35684    fi
35685  fi
35686  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35687
35688  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35689  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35690  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35691  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35692  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35693  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35694    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35695    JVM_ARG_OK=true
35696  else
35697    $ECHO "Arg failed:" >&5
35698    $ECHO "$OUTPUT" >&5
35699    JVM_ARG_OK=false
35700  fi
35701
35702  fi
35703  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35704
35705  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35706  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35707  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35708  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35709  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35710  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35711    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35712    JVM_ARG_OK=true
35713  else
35714    $ECHO "Arg failed:" >&5
35715    $ECHO "$OUTPUT" >&5
35716    JVM_ARG_OK=false
35717  fi
35718
35719  fi
35720  if test "$JVM_ARG_OK" = false; then
35721
35722  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35723  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35724  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35725  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35726  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35727  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35728    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35729    JVM_ARG_OK=true
35730  else
35731    $ECHO "Arg failed:" >&5
35732    $ECHO "$OUTPUT" >&5
35733    JVM_ARG_OK=false
35734  fi
35735
35736  fi
35737
35738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35739$as_echo_n "checking whether to use sjavac... " >&6; }
35740  # Check whether --enable-sjavac was given.
35741if test "${enable_sjavac+set}" = set; then :
35742  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35743else
35744  ENABLE_SJAVAC='no'
35745fi
35746
35747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35748$as_echo "$ENABLE_SJAVAC" >&6; }
35749
35750
35751  if test "x$ENABLE_SJAVAC" = xyes; then
35752    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35753  else
35754    SJAVAC_SERVER_DIR=
35755  fi
35756
35757
35758
35759# Can the C/C++ compiler use precompiled headers?
35760
35761
35762  ###############################################################################
35763  #
35764  # Can the C/C++ compiler use precompiled headers?
35765  #
35766  # Check whether --enable-precompiled-headers was given.
35767if test "${enable_precompiled_headers+set}" = set; then :
35768  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35769else
35770  ENABLE_PRECOMPH=yes
35771fi
35772
35773
35774  USE_PRECOMPILED_HEADER=1
35775  if test "x$ENABLE_PRECOMPH" = xno; then
35776    USE_PRECOMPILED_HEADER=0
35777  fi
35778
35779  if test "x$ENABLE_PRECOMPH" = xyes; then
35780    # Check that the compiler actually supports precomp headers.
35781    if test "x$GCC" = xyes; then
35782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35783$as_echo_n "checking that precompiled headers work... " >&6; }
35784      echo "int alfa();" > conftest.h
35785      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35786      if test ! -f conftest.hpp.gch; then
35787        USE_PRECOMPILED_HEADER=0
35788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35789$as_echo "no" >&6; }
35790      else
35791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35792$as_echo "yes" >&6; }
35793      fi
35794      rm -f conftest.h conftest.hpp.gch
35795    fi
35796  fi
35797
35798
35799
35800
35801# Setup use of ccache, if available
35802
35803  # Check whether --enable-ccache was given.
35804if test "${enable_ccache+set}" = set; then :
35805  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35806else
35807  ENABLE_CCACHE=yes
35808fi
35809
35810  if test "x$ENABLE_CCACHE" = xyes; then
35811    OLD_PATH="$PATH"
35812    if test "x$TOOLS_DIR" != x; then
35813      PATH=$TOOLS_DIR:$PATH
35814    fi
35815    # Extract the first word of "ccache", so it can be a program name with args.
35816set dummy ccache; ac_word=$2
35817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35818$as_echo_n "checking for $ac_word... " >&6; }
35819if ${ac_cv_path_CCACHE+:} false; then :
35820  $as_echo_n "(cached) " >&6
35821else
35822  case $CCACHE in
35823  [\\/]* | ?:[\\/]*)
35824  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35825  ;;
35826  *)
35827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35828for as_dir in $PATH
35829do
35830  IFS=$as_save_IFS
35831  test -z "$as_dir" && as_dir=.
35832    for ac_exec_ext in '' $ac_executable_extensions; do
35833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35834    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
35835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35836    break 2
35837  fi
35838done
35839  done
35840IFS=$as_save_IFS
35841
35842  ;;
35843esac
35844fi
35845CCACHE=$ac_cv_path_CCACHE
35846if test -n "$CCACHE"; then
35847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
35848$as_echo "$CCACHE" >&6; }
35849else
35850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35851$as_echo "no" >&6; }
35852fi
35853
35854
35855    PATH="$OLD_PATH"
35856  else
35857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
35858$as_echo_n "checking for ccache... " >&6; }
35859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
35860$as_echo "explicitly disabled" >&6; }
35861    CCACHE=
35862  fi
35863
35864
35865
35866# Check whether --with-ccache-dir was given.
35867if test "${with_ccache_dir+set}" = set; then :
35868  withval=$with_ccache_dir;
35869fi
35870
35871
35872  if test "x$with_ccache_dir" != x; then
35873    # When using a non home ccache directory, assume the use is to share ccache files
35874    # with other users. Thus change the umask.
35875    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
35876  fi
35877  CCACHE_FOUND=""
35878  if test "x$CCACHE" != x; then
35879
35880  if test "x$CCACHE" != x; then
35881    CCACHE_FOUND="true"
35882    # Only use ccache if it is 3.1.4 or later, which supports
35883    # precompiled headers.
35884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
35885$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
35886    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
35887    if test "x$HAS_GOOD_CCACHE" = x; then
35888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
35889$as_echo "no, disabling ccache" >&6; }
35890      CCACHE=
35891    else
35892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35893$as_echo "yes" >&6; }
35894      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
35895$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
35896      PUSHED_FLAGS="$CXXFLAGS"
35897      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
35898      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35899/* end confdefs.h.  */
35900
35901int
35902main ()
35903{
35904
35905  ;
35906  return 0;
35907}
35908_ACEOF
35909if ac_fn_cxx_try_compile "$LINENO"; then :
35910  CC_KNOWS_CCACHE_TRICK=yes
35911else
35912  CC_KNOWS_CCACHE_TRICK=no
35913fi
35914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35915      CXXFLAGS="$PUSHED_FLAGS"
35916      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
35917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35918$as_echo "yes" >&6; }
35919      else
35920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
35921$as_echo "no, disabling ccaching of precompiled headers" >&6; }
35922        CCACHE=
35923      fi
35924    fi
35925  fi
35926
35927  if test "x$CCACHE" != x; then
35928    CCACHE_SLOPPINESS=time_macros
35929    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
35930    CCACHE_FLAGS=-fpch-preprocess
35931
35932    if test "x$SET_CCACHE_DIR" != x; then
35933      mkdir -p $CCACHE_DIR > /dev/null 2>&1
35934      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
35935    fi
35936  fi
35937
35938  fi
35939
35940
35941###############################################################################
35942#
35943# And now the finish...
35944#
35945###############################################################################
35946
35947# Check for some common pitfalls
35948
35949  if test x"$OPENJDK_BUILD_OS" = xwindows; then
35950    file_to_test="$SRC_ROOT/LICENSE"
35951    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
35952      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
35953    fi
35954  fi
35955
35956
35957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
35958$as_echo_n "checking if build directory is on local disk... " >&6; }
35959
35960  # df -l lists only local disks; if the given directory is not found then
35961  # a non-zero exit code is given
35962  if test "x$DF" = x; then
35963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35964      # msys does not have df; use Windows "net use" instead.
35965      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
35966      if test "x$IS_NETWORK_DISK" = x; then
35967        OUTPUT_DIR_IS_LOCAL="yes"
35968      else
35969        OUTPUT_DIR_IS_LOCAL="no"
35970      fi
35971    else
35972      # No df here, say it's local
35973      OUTPUT_DIR_IS_LOCAL="yes"
35974    fi
35975  else
35976    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
35977      OUTPUT_DIR_IS_LOCAL="yes"
35978    else
35979      OUTPUT_DIR_IS_LOCAL="no"
35980    fi
35981  fi
35982
35983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
35984$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
35985
35986
35987
35988  # Check if the user has any old-style ALT_ variables set.
35989  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
35990
35991  # Before generating output files, test if they exist. If they do, this is a reconfigure.
35992  # Since we can't properly handle the dependencies for this, warn the user about the situation
35993  if test -e $OUTPUT_ROOT/spec.gmk; then
35994    IS_RECONFIGURE=yes
35995  else
35996    IS_RECONFIGURE=no
35997  fi
35998
35999  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36000    HIDE_PERFORMANCE_HINTS=yes
36001  else
36002    HIDE_PERFORMANCE_HINTS=no
36003    # Hide it the next time around...
36004    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36005  fi
36006
36007
36008# At the end, call the custom hook. (Dummy macro if no custom sources available)
36009
36010
36011# We're messing a bit with internal autoconf variables to put the config.status
36012# in the output directory instead of the current directory.
36013CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36014
36015# Create the actual output files. Now the main work of configure is done.
36016cat >confcache <<\_ACEOF
36017# This file is a shell script that caches the results of configure
36018# tests run on this system so they can be shared between configure
36019# scripts and configure runs, see configure's option --config-cache.
36020# It is not useful on other systems.  If it contains results you don't
36021# want to keep, you may remove or edit it.
36022#
36023# config.status only pays attention to the cache file if you give it
36024# the --recheck option to rerun configure.
36025#
36026# `ac_cv_env_foo' variables (set or unset) will be overridden when
36027# loading this file, other *unset* `ac_cv_foo' will be assigned the
36028# following values.
36029
36030_ACEOF
36031
36032# The following way of writing the cache mishandles newlines in values,
36033# but we know of no workaround that is simple, portable, and efficient.
36034# So, we kill variables containing newlines.
36035# Ultrix sh set writes to stderr and can't be redirected directly,
36036# and sets the high bit in the cache file unless we assign to the vars.
36037(
36038  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36039    eval ac_val=\$$ac_var
36040    case $ac_val in #(
36041    *${as_nl}*)
36042      case $ac_var in #(
36043      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36044$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36045      esac
36046      case $ac_var in #(
36047      _ | IFS | as_nl) ;; #(
36048      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36049      *) { eval $ac_var=; unset $ac_var;} ;;
36050      esac ;;
36051    esac
36052  done
36053
36054  (set) 2>&1 |
36055    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36056    *${as_nl}ac_space=\ *)
36057      # `set' does not quote correctly, so add quotes: double-quote
36058      # substitution turns \\\\ into \\, and sed turns \\ into \.
36059      sed -n \
36060	"s/'/'\\\\''/g;
36061	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36062      ;; #(
36063    *)
36064      # `set' quotes correctly as required by POSIX, so do not add quotes.
36065      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36066      ;;
36067    esac |
36068    sort
36069) |
36070  sed '
36071     /^ac_cv_env_/b end
36072     t clear
36073     :clear
36074     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36075     t end
36076     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36077     :end' >>confcache
36078if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36079  if test -w "$cache_file"; then
36080    if test "x$cache_file" != "x/dev/null"; then
36081      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36082$as_echo "$as_me: updating cache $cache_file" >&6;}
36083      if test ! -f "$cache_file" || test -h "$cache_file"; then
36084	cat confcache >"$cache_file"
36085      else
36086        case $cache_file in #(
36087        */* | ?:*)
36088	  mv -f confcache "$cache_file"$$ &&
36089	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36090        *)
36091	  mv -f confcache "$cache_file" ;;
36092	esac
36093      fi
36094    fi
36095  else
36096    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36097$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36098  fi
36099fi
36100rm -f confcache
36101
36102test "x$prefix" = xNONE && prefix=$ac_default_prefix
36103# Let make expand exec_prefix.
36104test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36105
36106DEFS=-DHAVE_CONFIG_H
36107
36108ac_libobjs=
36109ac_ltlibobjs=
36110U=
36111for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36112  # 1. Remove the extension, and $U if already installed.
36113  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36114  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36115  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36116  #    will be set to the directory where LIBOBJS objects are built.
36117  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36118  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36119done
36120LIBOBJS=$ac_libobjs
36121
36122LTLIBOBJS=$ac_ltlibobjs
36123
36124
36125
36126: "${CONFIG_STATUS=./config.status}"
36127ac_write_fail=0
36128ac_clean_files_save=$ac_clean_files
36129ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36130{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36131$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36132as_write_fail=0
36133cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36134#! $SHELL
36135# Generated by $as_me.
36136# Run this file to recreate the current configuration.
36137# Compiler output produced by configure, useful for debugging
36138# configure, is in config.log if it exists.
36139
36140debug=false
36141ac_cs_recheck=false
36142ac_cs_silent=false
36143
36144SHELL=\${CONFIG_SHELL-$SHELL}
36145export SHELL
36146_ASEOF
36147cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36148## -------------------- ##
36149## M4sh Initialization. ##
36150## -------------------- ##
36151
36152# Be more Bourne compatible
36153DUALCASE=1; export DUALCASE # for MKS sh
36154if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36155  emulate sh
36156  NULLCMD=:
36157  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36158  # is contrary to our usage.  Disable this feature.
36159  alias -g '${1+"$@"}'='"$@"'
36160  setopt NO_GLOB_SUBST
36161else
36162  case `(set -o) 2>/dev/null` in #(
36163  *posix*) :
36164    set -o posix ;; #(
36165  *) :
36166     ;;
36167esac
36168fi
36169
36170
36171as_nl='
36172'
36173export as_nl
36174# Printing a long string crashes Solaris 7 /usr/bin/printf.
36175as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36176as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36177as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36178# Prefer a ksh shell builtin over an external printf program on Solaris,
36179# but without wasting forks for bash or zsh.
36180if test -z "$BASH_VERSION$ZSH_VERSION" \
36181    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36182  as_echo='print -r --'
36183  as_echo_n='print -rn --'
36184elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36185  as_echo='printf %s\n'
36186  as_echo_n='printf %s'
36187else
36188  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36189    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36190    as_echo_n='/usr/ucb/echo -n'
36191  else
36192    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36193    as_echo_n_body='eval
36194      arg=$1;
36195      case $arg in #(
36196      *"$as_nl"*)
36197	expr "X$arg" : "X\\(.*\\)$as_nl";
36198	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36199      esac;
36200      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36201    '
36202    export as_echo_n_body
36203    as_echo_n='sh -c $as_echo_n_body as_echo'
36204  fi
36205  export as_echo_body
36206  as_echo='sh -c $as_echo_body as_echo'
36207fi
36208
36209# The user is always right.
36210if test "${PATH_SEPARATOR+set}" != set; then
36211  PATH_SEPARATOR=:
36212  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36213    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36214      PATH_SEPARATOR=';'
36215  }
36216fi
36217
36218
36219# IFS
36220# We need space, tab and new line, in precisely that order.  Quoting is
36221# there to prevent editors from complaining about space-tab.
36222# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36223# splitting by setting IFS to empty value.)
36224IFS=" ""	$as_nl"
36225
36226# Find who we are.  Look in the path if we contain no directory separator.
36227as_myself=
36228case $0 in #((
36229  *[\\/]* ) as_myself=$0 ;;
36230  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36231for as_dir in $PATH
36232do
36233  IFS=$as_save_IFS
36234  test -z "$as_dir" && as_dir=.
36235    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36236  done
36237IFS=$as_save_IFS
36238
36239     ;;
36240esac
36241# We did not find ourselves, most probably we were run as `sh COMMAND'
36242# in which case we are not to be found in the path.
36243if test "x$as_myself" = x; then
36244  as_myself=$0
36245fi
36246if test ! -f "$as_myself"; then
36247  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36248  exit 1
36249fi
36250
36251# Unset variables that we do not need and which cause bugs (e.g. in
36252# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36253# suppresses any "Segmentation fault" message there.  '((' could
36254# trigger a bug in pdksh 5.2.14.
36255for as_var in BASH_ENV ENV MAIL MAILPATH
36256do eval test x\${$as_var+set} = xset \
36257  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36258done
36259PS1='$ '
36260PS2='> '
36261PS4='+ '
36262
36263# NLS nuisances.
36264LC_ALL=C
36265export LC_ALL
36266LANGUAGE=C
36267export LANGUAGE
36268
36269# CDPATH.
36270(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36271
36272
36273# as_fn_error STATUS ERROR [LINENO LOG_FD]
36274# ----------------------------------------
36275# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36276# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36277# script with STATUS, using 1 if that was 0.
36278as_fn_error ()
36279{
36280  as_status=$1; test $as_status -eq 0 && as_status=1
36281  if test "$4"; then
36282    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36283    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36284  fi
36285  $as_echo "$as_me: error: $2" >&2
36286  as_fn_exit $as_status
36287} # as_fn_error
36288
36289
36290# as_fn_set_status STATUS
36291# -----------------------
36292# Set $? to STATUS, without forking.
36293as_fn_set_status ()
36294{
36295  return $1
36296} # as_fn_set_status
36297
36298# as_fn_exit STATUS
36299# -----------------
36300# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36301as_fn_exit ()
36302{
36303  set +e
36304  as_fn_set_status $1
36305  exit $1
36306} # as_fn_exit
36307
36308# as_fn_unset VAR
36309# ---------------
36310# Portably unset VAR.
36311as_fn_unset ()
36312{
36313  { eval $1=; unset $1;}
36314}
36315as_unset=as_fn_unset
36316# as_fn_append VAR VALUE
36317# ----------------------
36318# Append the text in VALUE to the end of the definition contained in VAR. Take
36319# advantage of any shell optimizations that allow amortized linear growth over
36320# repeated appends, instead of the typical quadratic growth present in naive
36321# implementations.
36322if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36323  eval 'as_fn_append ()
36324  {
36325    eval $1+=\$2
36326  }'
36327else
36328  as_fn_append ()
36329  {
36330    eval $1=\$$1\$2
36331  }
36332fi # as_fn_append
36333
36334# as_fn_arith ARG...
36335# ------------------
36336# Perform arithmetic evaluation on the ARGs, and store the result in the
36337# global $as_val. Take advantage of shells that can avoid forks. The arguments
36338# must be portable across $(()) and expr.
36339if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36340  eval 'as_fn_arith ()
36341  {
36342    as_val=$(( $* ))
36343  }'
36344else
36345  as_fn_arith ()
36346  {
36347    as_val=`expr "$@" || test $? -eq 1`
36348  }
36349fi # as_fn_arith
36350
36351
36352if expr a : '\(a\)' >/dev/null 2>&1 &&
36353   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36354  as_expr=expr
36355else
36356  as_expr=false
36357fi
36358
36359if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36360  as_basename=basename
36361else
36362  as_basename=false
36363fi
36364
36365if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36366  as_dirname=dirname
36367else
36368  as_dirname=false
36369fi
36370
36371as_me=`$as_basename -- "$0" ||
36372$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36373	 X"$0" : 'X\(//\)$' \| \
36374	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36375$as_echo X/"$0" |
36376    sed '/^.*\/\([^/][^/]*\)\/*$/{
36377	    s//\1/
36378	    q
36379	  }
36380	  /^X\/\(\/\/\)$/{
36381	    s//\1/
36382	    q
36383	  }
36384	  /^X\/\(\/\).*/{
36385	    s//\1/
36386	    q
36387	  }
36388	  s/.*/./; q'`
36389
36390# Avoid depending upon Character Ranges.
36391as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36392as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36393as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36394as_cr_digits='0123456789'
36395as_cr_alnum=$as_cr_Letters$as_cr_digits
36396
36397ECHO_C= ECHO_N= ECHO_T=
36398case `echo -n x` in #(((((
36399-n*)
36400  case `echo 'xy\c'` in
36401  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36402  xy)  ECHO_C='\c';;
36403  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36404       ECHO_T='	';;
36405  esac;;
36406*)
36407  ECHO_N='-n';;
36408esac
36409
36410rm -f conf$$ conf$$.exe conf$$.file
36411if test -d conf$$.dir; then
36412  rm -f conf$$.dir/conf$$.file
36413else
36414  rm -f conf$$.dir
36415  mkdir conf$$.dir 2>/dev/null
36416fi
36417if (echo >conf$$.file) 2>/dev/null; then
36418  if ln -s conf$$.file conf$$ 2>/dev/null; then
36419    as_ln_s='ln -s'
36420    # ... but there are two gotchas:
36421    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36422    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36423    # In both cases, we have to default to `cp -pR'.
36424    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36425      as_ln_s='cp -pR'
36426  elif ln conf$$.file conf$$ 2>/dev/null; then
36427    as_ln_s=ln
36428  else
36429    as_ln_s='cp -pR'
36430  fi
36431else
36432  as_ln_s='cp -pR'
36433fi
36434rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36435rmdir conf$$.dir 2>/dev/null
36436
36437
36438# as_fn_mkdir_p
36439# -------------
36440# Create "$as_dir" as a directory, including parents if necessary.
36441as_fn_mkdir_p ()
36442{
36443
36444  case $as_dir in #(
36445  -*) as_dir=./$as_dir;;
36446  esac
36447  test -d "$as_dir" || eval $as_mkdir_p || {
36448    as_dirs=
36449    while :; do
36450      case $as_dir in #(
36451      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36452      *) as_qdir=$as_dir;;
36453      esac
36454      as_dirs="'$as_qdir' $as_dirs"
36455      as_dir=`$as_dirname -- "$as_dir" ||
36456$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36457	 X"$as_dir" : 'X\(//\)[^/]' \| \
36458	 X"$as_dir" : 'X\(//\)$' \| \
36459	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36460$as_echo X"$as_dir" |
36461    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36462	    s//\1/
36463	    q
36464	  }
36465	  /^X\(\/\/\)[^/].*/{
36466	    s//\1/
36467	    q
36468	  }
36469	  /^X\(\/\/\)$/{
36470	    s//\1/
36471	    q
36472	  }
36473	  /^X\(\/\).*/{
36474	    s//\1/
36475	    q
36476	  }
36477	  s/.*/./; q'`
36478      test -d "$as_dir" && break
36479    done
36480    test -z "$as_dirs" || eval "mkdir $as_dirs"
36481  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36482
36483
36484} # as_fn_mkdir_p
36485if mkdir -p . 2>/dev/null; then
36486  as_mkdir_p='mkdir -p "$as_dir"'
36487else
36488  test -d ./-p && rmdir ./-p
36489  as_mkdir_p=false
36490fi
36491
36492
36493# as_fn_executable_p FILE
36494# -----------------------
36495# Test if FILE is an executable regular file.
36496as_fn_executable_p ()
36497{
36498  test -f "$1" && test -x "$1"
36499} # as_fn_executable_p
36500as_test_x='test -x'
36501as_executable_p=as_fn_executable_p
36502
36503# Sed expression to map a string onto a valid CPP name.
36504as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36505
36506# Sed expression to map a string onto a valid variable name.
36507as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36508
36509
36510exec 6>&1
36511## ----------------------------------- ##
36512## Main body of $CONFIG_STATUS script. ##
36513## ----------------------------------- ##
36514_ASEOF
36515test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36516
36517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36518# Save the log message, to keep $0 and so on meaningful, and to
36519# report actual input values of CONFIG_FILES etc. instead of their
36520# values after options handling.
36521ac_log="
36522This file was extended by OpenJDK $as_me jdk8, which was
36523generated by GNU Autoconf 2.69.  Invocation command line was
36524
36525  CONFIG_FILES    = $CONFIG_FILES
36526  CONFIG_HEADERS  = $CONFIG_HEADERS
36527  CONFIG_LINKS    = $CONFIG_LINKS
36528  CONFIG_COMMANDS = $CONFIG_COMMANDS
36529  $ $0 $@
36530
36531on `(hostname || uname -n) 2>/dev/null | sed 1q`
36532"
36533
36534_ACEOF
36535
36536case $ac_config_files in *"
36537"*) set x $ac_config_files; shift; ac_config_files=$*;;
36538esac
36539
36540case $ac_config_headers in *"
36541"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36542esac
36543
36544
36545cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36546# Files that config.status was made for.
36547config_files="$ac_config_files"
36548config_headers="$ac_config_headers"
36549
36550_ACEOF
36551
36552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36553ac_cs_usage="\
36554\`$as_me' instantiates files and other configuration actions
36555from templates according to the current configuration.  Unless the files
36556and actions are specified as TAGs, all are instantiated by default.
36557
36558Usage: $0 [OPTION]... [TAG]...
36559
36560  -h, --help       print this help, then exit
36561  -V, --version    print version number and configuration settings, then exit
36562      --config     print configuration, then exit
36563  -q, --quiet, --silent
36564                   do not print progress messages
36565  -d, --debug      don't remove temporary files
36566      --recheck    update $as_me by reconfiguring in the same conditions
36567      --file=FILE[:TEMPLATE]
36568                   instantiate the configuration file FILE
36569      --header=FILE[:TEMPLATE]
36570                   instantiate the configuration header FILE
36571
36572Configuration files:
36573$config_files
36574
36575Configuration headers:
36576$config_headers
36577
36578Report bugs to <build-dev@openjdk.java.net>.
36579OpenJDK home page: <http://openjdk.java.net>."
36580
36581_ACEOF
36582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36583ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36584ac_cs_version="\\
36585OpenJDK config.status jdk8
36586configured by $0, generated by GNU Autoconf 2.69,
36587  with options \\"\$ac_cs_config\\"
36588
36589Copyright (C) 2012 Free Software Foundation, Inc.
36590This config.status script is free software; the Free Software Foundation
36591gives unlimited permission to copy, distribute and modify it."
36592
36593ac_pwd='$ac_pwd'
36594srcdir='$srcdir'
36595AWK='$AWK'
36596test -n "\$AWK" || AWK=awk
36597_ACEOF
36598
36599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36600# The default lists apply if the user does not specify any file.
36601ac_need_defaults=:
36602while test $# != 0
36603do
36604  case $1 in
36605  --*=?*)
36606    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36607    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36608    ac_shift=:
36609    ;;
36610  --*=)
36611    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36612    ac_optarg=
36613    ac_shift=:
36614    ;;
36615  *)
36616    ac_option=$1
36617    ac_optarg=$2
36618    ac_shift=shift
36619    ;;
36620  esac
36621
36622  case $ac_option in
36623  # Handling of the options.
36624  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36625    ac_cs_recheck=: ;;
36626  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36627    $as_echo "$ac_cs_version"; exit ;;
36628  --config | --confi | --conf | --con | --co | --c )
36629    $as_echo "$ac_cs_config"; exit ;;
36630  --debug | --debu | --deb | --de | --d | -d )
36631    debug=: ;;
36632  --file | --fil | --fi | --f )
36633    $ac_shift
36634    case $ac_optarg in
36635    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36636    '') as_fn_error $? "missing file argument" ;;
36637    esac
36638    as_fn_append CONFIG_FILES " '$ac_optarg'"
36639    ac_need_defaults=false;;
36640  --header | --heade | --head | --hea )
36641    $ac_shift
36642    case $ac_optarg in
36643    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36644    esac
36645    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36646    ac_need_defaults=false;;
36647  --he | --h)
36648    # Conflict between --help and --header
36649    as_fn_error $? "ambiguous option: \`$1'
36650Try \`$0 --help' for more information.";;
36651  --help | --hel | -h )
36652    $as_echo "$ac_cs_usage"; exit ;;
36653  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36654  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36655    ac_cs_silent=: ;;
36656
36657  # This is an error.
36658  -*) as_fn_error $? "unrecognized option: \`$1'
36659Try \`$0 --help' for more information." ;;
36660
36661  *) as_fn_append ac_config_targets " $1"
36662     ac_need_defaults=false ;;
36663
36664  esac
36665  shift
36666done
36667
36668ac_configure_extra_args=
36669
36670if $ac_cs_silent; then
36671  exec 6>/dev/null
36672  ac_configure_extra_args="$ac_configure_extra_args --silent"
36673fi
36674
36675_ACEOF
36676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36677if \$ac_cs_recheck; then
36678  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36679  shift
36680  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36681  CONFIG_SHELL='$SHELL'
36682  export CONFIG_SHELL
36683  exec "\$@"
36684fi
36685
36686_ACEOF
36687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36688exec 5>>config.log
36689{
36690  echo
36691  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36692## Running $as_me. ##
36693_ASBOX
36694  $as_echo "$ac_log"
36695} >&5
36696
36697_ACEOF
36698cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36699_ACEOF
36700
36701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36702
36703# Handling of arguments.
36704for ac_config_target in $ac_config_targets
36705do
36706  case $ac_config_target in
36707    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36708    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36709    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36710    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36711    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36712    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36713    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36714
36715  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36716  esac
36717done
36718
36719
36720# If the user did not use the arguments to specify the items to instantiate,
36721# then the envvar interface is used.  Set only those that are not.
36722# We use the long form for the default assignment because of an extremely
36723# bizarre bug on SunOS 4.1.3.
36724if $ac_need_defaults; then
36725  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36726  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36727fi
36728
36729# Have a temporary directory for convenience.  Make it in the build tree
36730# simply because there is no reason against having it here, and in addition,
36731# creating and moving files from /tmp can sometimes cause problems.
36732# Hook for its removal unless debugging.
36733# Note that there is a small window in which the directory will not be cleaned:
36734# after its creation but before its name has been assigned to `$tmp'.
36735$debug ||
36736{
36737  tmp= ac_tmp=
36738  trap 'exit_status=$?
36739  : "${ac_tmp:=$tmp}"
36740  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36741' 0
36742  trap 'as_fn_exit 1' 1 2 13 15
36743}
36744# Create a (secure) tmp directory for tmp files.
36745
36746{
36747  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36748  test -d "$tmp"
36749}  ||
36750{
36751  tmp=./conf$$-$RANDOM
36752  (umask 077 && mkdir "$tmp")
36753} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36754ac_tmp=$tmp
36755
36756# Set up the scripts for CONFIG_FILES section.
36757# No need to generate them if there are no CONFIG_FILES.
36758# This happens for instance with `./config.status config.h'.
36759if test -n "$CONFIG_FILES"; then
36760
36761
36762ac_cr=`echo X | tr X '\015'`
36763# On cygwin, bash can eat \r inside `` if the user requested igncr.
36764# But we know of no other shell where ac_cr would be empty at this
36765# point, so we can use a bashism as a fallback.
36766if test "x$ac_cr" = x; then
36767  eval ac_cr=\$\'\\r\'
36768fi
36769ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36770if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36771  ac_cs_awk_cr='\\r'
36772else
36773  ac_cs_awk_cr=$ac_cr
36774fi
36775
36776echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36777_ACEOF
36778
36779
36780{
36781  echo "cat >conf$$subs.awk <<_ACEOF" &&
36782  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36783  echo "_ACEOF"
36784} >conf$$subs.sh ||
36785  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36786ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36787ac_delim='%!_!# '
36788for ac_last_try in false false false false false :; do
36789  . ./conf$$subs.sh ||
36790    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36791
36792  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36793  if test $ac_delim_n = $ac_delim_num; then
36794    break
36795  elif $ac_last_try; then
36796    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36797  else
36798    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36799  fi
36800done
36801rm -f conf$$subs.sh
36802
36803cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36804cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36805_ACEOF
36806sed -n '
36807h
36808s/^/S["/; s/!.*/"]=/
36809p
36810g
36811s/^[^!]*!//
36812:repl
36813t repl
36814s/'"$ac_delim"'$//
36815t delim
36816:nl
36817h
36818s/\(.\{148\}\)..*/\1/
36819t more1
36820s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36821p
36822n
36823b repl
36824:more1
36825s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36826p
36827g
36828s/.\{148\}//
36829t nl
36830:delim
36831h
36832s/\(.\{148\}\)..*/\1/
36833t more2
36834s/["\\]/\\&/g; s/^/"/; s/$/"/
36835p
36836b
36837:more2
36838s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36839p
36840g
36841s/.\{148\}//
36842t delim
36843' <conf$$subs.awk | sed '
36844/^[^""]/{
36845  N
36846  s/\n//
36847}
36848' >>$CONFIG_STATUS || ac_write_fail=1
36849rm -f conf$$subs.awk
36850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36851_ACAWK
36852cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36853  for (key in S) S_is_set[key] = 1
36854  FS = ""
36855
36856}
36857{
36858  line = $ 0
36859  nfields = split(line, field, "@")
36860  substed = 0
36861  len = length(field[1])
36862  for (i = 2; i < nfields; i++) {
36863    key = field[i]
36864    keylen = length(key)
36865    if (S_is_set[key]) {
36866      value = S[key]
36867      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36868      len += length(value) + length(field[++i])
36869      substed = 1
36870    } else
36871      len += 1 + keylen
36872  }
36873
36874  print line
36875}
36876
36877_ACAWK
36878_ACEOF
36879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36880if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36881  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36882else
36883  cat
36884fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36885  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36886_ACEOF
36887
36888# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36889# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36890# trailing colons and then remove the whole line if VPATH becomes empty
36891# (actually we leave an empty line to preserve line numbers).
36892if test "x$srcdir" = x.; then
36893  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36894h
36895s///
36896s/^/:/
36897s/[	 ]*$/:/
36898s/:\$(srcdir):/:/g
36899s/:\${srcdir}:/:/g
36900s/:@srcdir@:/:/g
36901s/^:*//
36902s/:*$//
36903x
36904s/\(=[	 ]*\).*/\1/
36905G
36906s/\n//
36907s/^[^=]*=[	 ]*$//
36908}'
36909fi
36910
36911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36912fi # test -n "$CONFIG_FILES"
36913
36914# Set up the scripts for CONFIG_HEADERS section.
36915# No need to generate them if there are no CONFIG_HEADERS.
36916# This happens for instance with `./config.status Makefile'.
36917if test -n "$CONFIG_HEADERS"; then
36918cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36919BEGIN {
36920_ACEOF
36921
36922# Transform confdefs.h into an awk script `defines.awk', embedded as
36923# here-document in config.status, that substitutes the proper values into
36924# config.h.in to produce config.h.
36925
36926# Create a delimiter string that does not exist in confdefs.h, to ease
36927# handling of long lines.
36928ac_delim='%!_!# '
36929for ac_last_try in false false :; do
36930  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36931  if test -z "$ac_tt"; then
36932    break
36933  elif $ac_last_try; then
36934    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36935  else
36936    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36937  fi
36938done
36939
36940# For the awk script, D is an array of macro values keyed by name,
36941# likewise P contains macro parameters if any.  Preserve backslash
36942# newline sequences.
36943
36944ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36945sed -n '
36946s/.\{148\}/&'"$ac_delim"'/g
36947t rset
36948:rset
36949s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36950t def
36951d
36952:def
36953s/\\$//
36954t bsnl
36955s/["\\]/\\&/g
36956s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36957D["\1"]=" \3"/p
36958s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36959d
36960:bsnl
36961s/["\\]/\\&/g
36962s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36963D["\1"]=" \3\\\\\\n"\\/p
36964t cont
36965s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36966t cont
36967d
36968:cont
36969n
36970s/.\{148\}/&'"$ac_delim"'/g
36971t clear
36972:clear
36973s/\\$//
36974t bsnlc
36975s/["\\]/\\&/g; s/^/"/; s/$/"/p
36976d
36977:bsnlc
36978s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
36979b cont
36980' <confdefs.h | sed '
36981s/'"$ac_delim"'/"\\\
36982"/g' >>$CONFIG_STATUS || ac_write_fail=1
36983
36984cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36985  for (key in D) D_is_set[key] = 1
36986  FS = ""
36987}
36988/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
36989  line = \$ 0
36990  split(line, arg, " ")
36991  if (arg[1] == "#") {
36992    defundef = arg[2]
36993    mac1 = arg[3]
36994  } else {
36995    defundef = substr(arg[1], 2)
36996    mac1 = arg[2]
36997  }
36998  split(mac1, mac2, "(") #)
36999  macro = mac2[1]
37000  prefix = substr(line, 1, index(line, defundef) - 1)
37001  if (D_is_set[macro]) {
37002    # Preserve the white space surrounding the "#".
37003    print prefix "define", macro P[macro] D[macro]
37004    next
37005  } else {
37006    # Replace #undef with comments.  This is necessary, for example,
37007    # in the case of _POSIX_SOURCE, which is predefined and required
37008    # on some systems where configure will not decide to define it.
37009    if (defundef == "undef") {
37010      print "/*", prefix defundef, macro, "*/"
37011      next
37012    }
37013  }
37014}
37015{ print }
37016_ACAWK
37017_ACEOF
37018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37019  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37020fi # test -n "$CONFIG_HEADERS"
37021
37022
37023eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37024shift
37025for ac_tag
37026do
37027  case $ac_tag in
37028  :[FHLC]) ac_mode=$ac_tag; continue;;
37029  esac
37030  case $ac_mode$ac_tag in
37031  :[FHL]*:*);;
37032  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37033  :[FH]-) ac_tag=-:-;;
37034  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37035  esac
37036  ac_save_IFS=$IFS
37037  IFS=:
37038  set x $ac_tag
37039  IFS=$ac_save_IFS
37040  shift
37041  ac_file=$1
37042  shift
37043
37044  case $ac_mode in
37045  :L) ac_source=$1;;
37046  :[FH])
37047    ac_file_inputs=
37048    for ac_f
37049    do
37050      case $ac_f in
37051      -) ac_f="$ac_tmp/stdin";;
37052      *) # Look for the file first in the build tree, then in the source tree
37053	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37054	 # because $ac_f cannot contain `:'.
37055	 test -f "$ac_f" ||
37056	   case $ac_f in
37057	   [\\/$]*) false;;
37058	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37059	   esac ||
37060	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37061      esac
37062      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37063      as_fn_append ac_file_inputs " '$ac_f'"
37064    done
37065
37066    # Let's still pretend it is `configure' which instantiates (i.e., don't
37067    # use $as_me), people would be surprised to read:
37068    #    /* config.h.  Generated by config.status.  */
37069    configure_input='Generated from '`
37070	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37071	`' by configure.'
37072    if test x"$ac_file" != x-; then
37073      configure_input="$ac_file.  $configure_input"
37074      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37075$as_echo "$as_me: creating $ac_file" >&6;}
37076    fi
37077    # Neutralize special characters interpreted by sed in replacement strings.
37078    case $configure_input in #(
37079    *\&* | *\|* | *\\* )
37080       ac_sed_conf_input=`$as_echo "$configure_input" |
37081       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37082    *) ac_sed_conf_input=$configure_input;;
37083    esac
37084
37085    case $ac_tag in
37086    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37087      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37088    esac
37089    ;;
37090  esac
37091
37092  ac_dir=`$as_dirname -- "$ac_file" ||
37093$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37094	 X"$ac_file" : 'X\(//\)[^/]' \| \
37095	 X"$ac_file" : 'X\(//\)$' \| \
37096	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37097$as_echo X"$ac_file" |
37098    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37099	    s//\1/
37100	    q
37101	  }
37102	  /^X\(\/\/\)[^/].*/{
37103	    s//\1/
37104	    q
37105	  }
37106	  /^X\(\/\/\)$/{
37107	    s//\1/
37108	    q
37109	  }
37110	  /^X\(\/\).*/{
37111	    s//\1/
37112	    q
37113	  }
37114	  s/.*/./; q'`
37115  as_dir="$ac_dir"; as_fn_mkdir_p
37116  ac_builddir=.
37117
37118case "$ac_dir" in
37119.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37120*)
37121  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37122  # A ".." for each directory in $ac_dir_suffix.
37123  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37124  case $ac_top_builddir_sub in
37125  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37126  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37127  esac ;;
37128esac
37129ac_abs_top_builddir=$ac_pwd
37130ac_abs_builddir=$ac_pwd$ac_dir_suffix
37131# for backward compatibility:
37132ac_top_builddir=$ac_top_build_prefix
37133
37134case $srcdir in
37135  .)  # We are building in place.
37136    ac_srcdir=.
37137    ac_top_srcdir=$ac_top_builddir_sub
37138    ac_abs_top_srcdir=$ac_pwd ;;
37139  [\\/]* | ?:[\\/]* )  # Absolute name.
37140    ac_srcdir=$srcdir$ac_dir_suffix;
37141    ac_top_srcdir=$srcdir
37142    ac_abs_top_srcdir=$srcdir ;;
37143  *) # Relative name.
37144    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37145    ac_top_srcdir=$ac_top_build_prefix$srcdir
37146    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37147esac
37148ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37149
37150
37151  case $ac_mode in
37152  :F)
37153  #
37154  # CONFIG_FILE
37155  #
37156
37157_ACEOF
37158
37159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37160# If the template does not know about datarootdir, expand it.
37161# FIXME: This hack should be removed a few years after 2.60.
37162ac_datarootdir_hack=; ac_datarootdir_seen=
37163ac_sed_dataroot='
37164/datarootdir/ {
37165  p
37166  q
37167}
37168/@datadir@/p
37169/@docdir@/p
37170/@infodir@/p
37171/@localedir@/p
37172/@mandir@/p'
37173case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37174*datarootdir*) ac_datarootdir_seen=yes;;
37175*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37176  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37177$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37178_ACEOF
37179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37180  ac_datarootdir_hack='
37181  s&@datadir@&$datadir&g
37182  s&@docdir@&$docdir&g
37183  s&@infodir@&$infodir&g
37184  s&@localedir@&$localedir&g
37185  s&@mandir@&$mandir&g
37186  s&\\\${datarootdir}&$datarootdir&g' ;;
37187esac
37188_ACEOF
37189
37190# Neutralize VPATH when `$srcdir' = `.'.
37191# Shell code in configure.ac might set extrasub.
37192# FIXME: do we really want to maintain this feature?
37193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37194ac_sed_extra="$ac_vpsub
37195$extrasub
37196_ACEOF
37197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37198:t
37199/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37200s|@configure_input@|$ac_sed_conf_input|;t t
37201s&@top_builddir@&$ac_top_builddir_sub&;t t
37202s&@top_build_prefix@&$ac_top_build_prefix&;t t
37203s&@srcdir@&$ac_srcdir&;t t
37204s&@abs_srcdir@&$ac_abs_srcdir&;t t
37205s&@top_srcdir@&$ac_top_srcdir&;t t
37206s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37207s&@builddir@&$ac_builddir&;t t
37208s&@abs_builddir@&$ac_abs_builddir&;t t
37209s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37210$ac_datarootdir_hack
37211"
37212eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37213  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37214
37215test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37216  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37217  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37218      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37219  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37220which seems to be undefined.  Please make sure it is defined" >&5
37221$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37222which seems to be undefined.  Please make sure it is defined" >&2;}
37223
37224  rm -f "$ac_tmp/stdin"
37225  case $ac_file in
37226  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37227  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37228  esac \
37229  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37230 ;;
37231  :H)
37232  #
37233  # CONFIG_HEADER
37234  #
37235  if test x"$ac_file" != x-; then
37236    {
37237      $as_echo "/* $configure_input  */" \
37238      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37239    } >"$ac_tmp/config.h" \
37240      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37241    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37242      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37243$as_echo "$as_me: $ac_file is unchanged" >&6;}
37244    else
37245      rm -f "$ac_file"
37246      mv "$ac_tmp/config.h" "$ac_file" \
37247	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37248    fi
37249  else
37250    $as_echo "/* $configure_input  */" \
37251      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37252      || as_fn_error $? "could not create -" "$LINENO" 5
37253  fi
37254 ;;
37255
37256
37257  esac
37258
37259done # for ac_tag
37260
37261
37262as_fn_exit 0
37263_ACEOF
37264ac_clean_files=$ac_clean_files_save
37265
37266test $ac_write_fail = 0 ||
37267  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37268
37269
37270# configure is writing to config.log, and then calls config.status.
37271# config.status does its own redirection, appending to config.log.
37272# Unfortunately, on DOS this fails, as config.log is still kept open
37273# by configure, so config.status won't be able to write to it; its
37274# output is simply discarded.  So we exec the FD to /dev/null,
37275# effectively closing config.log, so it can be properly (re)opened and
37276# appended to by config.status.  When coming back to configure, we
37277# need to make the FD available again.
37278if test "$no_create" != yes; then
37279  ac_cs_success=:
37280  ac_config_status_args=
37281  test "$silent" = yes &&
37282    ac_config_status_args="$ac_config_status_args --quiet"
37283  exec 5>/dev/null
37284  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37285  exec 5>>config.log
37286  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37287  # would make configure fail if this is the last instruction.
37288  $ac_cs_success || as_fn_exit 1
37289fi
37290if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37291  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37292$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37293fi
37294
37295
37296# Try to move the config.log file to the output directory.
37297if test -e ./config.log; then
37298  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37299fi
37300
37301# Make the compare script executable
37302$CHMOD +x $OUTPUT_ROOT/compare.sh
37303
37304# Finally output some useful information to the user
37305
37306  # Finally output some useful information to the user
37307
37308  if test "x$CCACHE_FOUND" != x; then
37309    if  test "x$HAS_GOOD_CCACHE" = x; then
37310      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37311      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37312    else
37313      CCACHE_STATUS="installed and in use"
37314    fi
37315  else
37316    if test "x$GCC" = xyes; then
37317      CCACHE_STATUS="not installed (consider installing)"
37318      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37319    else
37320      CCACHE_STATUS="not available for your system"
37321    fi
37322  fi
37323
37324  printf "\n"
37325  printf "====================================================\n"
37326  printf "A new configuration has been successfully created in\n"
37327  printf "$OUTPUT_ROOT\n"
37328  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37329    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37330  else
37331    printf "using default settings.\n"
37332  fi
37333
37334  printf "\n"
37335  printf "Configuration summary:\n"
37336  printf "* Debug level:    $DEBUG_LEVEL\n"
37337  printf "* JDK variant:    $JDK_VARIANT\n"
37338  printf "* JVM variants:   $with_jvm_variants\n"
37339  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37340
37341  printf "\n"
37342  printf "Tools summary:\n"
37343  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37344    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37345  fi
37346  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37347  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37348  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37349
37350  printf "\n"
37351  printf "Build performance summary:\n"
37352  printf "* Cores to use:   $JOBS\n"
37353  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37354  printf "* ccache status:  $CCACHE_STATUS\n"
37355  printf "\n"
37356
37357  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37358    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37359    printf "$CCACHE_HELP_MSG\n"
37360
37361  # Print a helpful message on how to acquire the necessary build dependency.
37362  # ccache is the help tag: freetype, cups, pulse, alsa etc
37363  MISSING_DEPENDENCY=ccache
37364
37365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37366    cygwin_help $MISSING_DEPENDENCY
37367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37368    msys_help $MISSING_DEPENDENCY
37369  else
37370    PKGHANDLER_COMMAND=
37371
37372    case $PKGHANDLER in
37373      apt-get)
37374        apt_help     $MISSING_DEPENDENCY ;;
37375      yum)
37376        yum_help     $MISSING_DEPENDENCY ;;
37377      port)
37378        port_help    $MISSING_DEPENDENCY ;;
37379      pkgutil)
37380        pkgutil_help $MISSING_DEPENDENCY ;;
37381      pkgadd)
37382        pkgadd_help  $MISSING_DEPENDENCY ;;
37383      * )
37384        break ;;
37385    esac
37386
37387    if test "x$PKGHANDLER_COMMAND" != x; then
37388      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37389    fi
37390  fi
37391
37392    printf "$HELP_MSG\n"
37393    printf "\n"
37394  fi
37395
37396  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37397    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37398    printf "will result in longer build times.\n"
37399    printf "\n"
37400  fi
37401
37402  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37403    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37404    printf "These are not respected, and will be ignored. It is recommended\n"
37405    printf "that you clean your environment. The following variables are set:\n"
37406    printf "$FOUND_ALT_VARIABLES\n"
37407    printf "\n"
37408  fi
37409
37410  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37411    printf "WARNING: Your build output directory is not on a local disk.\n"
37412    printf "This will severely degrade build performance!\n"
37413    printf "It is recommended that you create an output directory on a local disk,\n"
37414    printf "and run the configure script again from that directory.\n"
37415    printf "\n"
37416  fi
37417
37418  if test "x$IS_RECONFIGURE" = "xyes"; then
37419    printf "WARNING: The result of this configuration has overridden an older\n"
37420    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37421    printf "proper build. Failure to do so might result in strange build problems.\n"
37422    printf "\n"
37423  fi
37424
37425