generated-configure.sh revision 937:56c1a2adf6c4
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
750TOOLS_DIR_CXX
751POTENTIAL_CXX
752OBJEXT
753EXEEXT
754ac_ct_CC
755CPPFLAGS
756LDFLAGS
757CFLAGS
758CC
759ac_ct_PROPER_COMPILER_CC
760PROPER_COMPILER_CC
761TOOLS_DIR_CC
762POTENTIAL_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=1390907294
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/g'`
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$OPENJDK_TARGET_OS" = "xwindows"; then
19077    COMPILER_CHECK_LIST="cl"
19078  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19079    COMPILER_CHECK_LIST="cc gcc"
19080  else
19081    COMPILER_CHECK_LIST="gcc cc"
19082  fi
19083
19084
19085  COMPILER_NAME=C
19086  SEARCH_LIST="$COMPILER_CHECK_LIST"
19087
19088  if test "x$CC" != x; then
19089    # User has supplied compiler name already, always let that override.
19090    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
19091$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
19092    if test "x`basename $CC`" = "x$CC"; then
19093      # A command without a complete path is provided, search $PATH.
19094
19095      for ac_prog in $CC
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_POTENTIAL_CC+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $POTENTIAL_CC in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_POTENTIAL_CC="$POTENTIAL_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_POTENTIAL_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
19127POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19128if test -n "$POTENTIAL_CC"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19130$as_echo "$POTENTIAL_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 "$POTENTIAL_CC" && break
19138done
19139
19140      if test "x$POTENTIAL_CC" != x; then
19141        CC=$POTENTIAL_CC
19142      else
19143        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
19144      fi
19145    else
19146      # Otherwise it might already be a complete path
19147      if test ! -x "$CC"; then
19148        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
19149      fi
19150    fi
19151  else
19152    # No user supplied value. Locate compiler ourselves
19153    CC=
19154    # If TOOLS_DIR is set, check for all compiler names in there first
19155    # before checking the rest of the PATH.
19156    if test -n "$TOOLS_DIR"; then
19157      PATH_save="$PATH"
19158      PATH="$TOOLS_DIR"
19159      for ac_prog in $SEARCH_LIST
19160do
19161  # Extract the first word of "$ac_prog", so it can be a program name with args.
19162set dummy $ac_prog; ac_word=$2
19163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19164$as_echo_n "checking for $ac_word... " >&6; }
19165if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19166  $as_echo_n "(cached) " >&6
19167else
19168  case $TOOLS_DIR_CC in
19169  [\\/]* | ?:[\\/]*)
19170  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19171  ;;
19172  *)
19173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19174for as_dir in $PATH
19175do
19176  IFS=$as_save_IFS
19177  test -z "$as_dir" && as_dir=.
19178    for ac_exec_ext in '' $ac_executable_extensions; do
19179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19180    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19182    break 2
19183  fi
19184done
19185  done
19186IFS=$as_save_IFS
19187
19188  ;;
19189esac
19190fi
19191TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19192if test -n "$TOOLS_DIR_CC"; then
19193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19194$as_echo "$TOOLS_DIR_CC" >&6; }
19195else
19196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19197$as_echo "no" >&6; }
19198fi
19199
19200
19201  test -n "$TOOLS_DIR_CC" && break
19202done
19203
19204      CC=$TOOLS_DIR_CC
19205      PATH="$PATH_save"
19206    fi
19207
19208    # AC_PATH_PROGS can't be run multiple times with the same variable,
19209    # so create a new name for this run.
19210    if test "x$CC" = x; then
19211      for ac_prog in $SEARCH_LIST
19212do
19213  # Extract the first word of "$ac_prog", so it can be a program name with args.
19214set dummy $ac_prog; ac_word=$2
19215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19216$as_echo_n "checking for $ac_word... " >&6; }
19217if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19218  $as_echo_n "(cached) " >&6
19219else
19220  case $POTENTIAL_CC in
19221  [\\/]* | ?:[\\/]*)
19222  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19223  ;;
19224  *)
19225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19226for as_dir in $PATH
19227do
19228  IFS=$as_save_IFS
19229  test -z "$as_dir" && as_dir=.
19230    for ac_exec_ext in '' $ac_executable_extensions; do
19231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19232    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19234    break 2
19235  fi
19236done
19237  done
19238IFS=$as_save_IFS
19239
19240  ;;
19241esac
19242fi
19243POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19244if test -n "$POTENTIAL_CC"; then
19245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19246$as_echo "$POTENTIAL_CC" >&6; }
19247else
19248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19249$as_echo "no" >&6; }
19250fi
19251
19252
19253  test -n "$POTENTIAL_CC" && break
19254done
19255
19256      CC=$POTENTIAL_CC
19257    fi
19258
19259    if test "x$CC" = x; then
19260
19261  # Print a helpful message on how to acquire the necessary build dependency.
19262  # devkit is the help tag: freetype, cups, pulse, alsa etc
19263  MISSING_DEPENDENCY=devkit
19264
19265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19266    cygwin_help $MISSING_DEPENDENCY
19267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19268    msys_help $MISSING_DEPENDENCY
19269  else
19270    PKGHANDLER_COMMAND=
19271
19272    case $PKGHANDLER in
19273      apt-get)
19274        apt_help     $MISSING_DEPENDENCY ;;
19275      yum)
19276        yum_help     $MISSING_DEPENDENCY ;;
19277      port)
19278        port_help    $MISSING_DEPENDENCY ;;
19279      pkgutil)
19280        pkgutil_help $MISSING_DEPENDENCY ;;
19281      pkgadd)
19282        pkgadd_help  $MISSING_DEPENDENCY ;;
19283      * )
19284        break ;;
19285    esac
19286
19287    if test "x$PKGHANDLER_COMMAND" != x; then
19288      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19289    fi
19290  fi
19291
19292      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19293    fi
19294  fi
19295
19296  # Now we have a compiler binary in CC. Make sure it's okay.
19297
19298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19299
19300  # First separate the path from the arguments. This will split at the first
19301  # space.
19302  complete="$CC"
19303  path="${complete%% *}"
19304  tmp="$complete EOL"
19305  arguments="${tmp#* }"
19306
19307  # Input might be given as Windows format, start by converting to
19308  # unix format.
19309  new_path=`$CYGPATH -u "$path"`
19310
19311  # Now try to locate executable using which
19312  new_path=`$WHICH "$new_path" 2> /dev/null`
19313  # bat and cmd files are not always considered executable in cygwin causing which
19314  # to not find them
19315  if test "x$new_path" = x \
19316      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19317      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19318    new_path=`$CYGPATH -u "$path"`
19319  fi
19320  if test "x$new_path" = x; then
19321    # Oops. Which didn't find the executable.
19322    # The splitting of arguments from the executable at a space might have been incorrect,
19323    # since paths with space are more likely in Windows. Give it another try with the whole
19324    # argument.
19325    path="$complete"
19326    arguments="EOL"
19327    new_path=`$CYGPATH -u "$path"`
19328    new_path=`$WHICH "$new_path" 2> /dev/null`
19329    # bat and cmd files are not always considered executable in cygwin causing which
19330    # to not find them
19331    if test "x$new_path" = x \
19332        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19333        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19334      new_path=`$CYGPATH -u "$path"`
19335    fi
19336    if test "x$new_path" = x; then
19337      # It's still not found. Now this is an unrecoverable error.
19338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19339$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19340      has_space=`$ECHO "$complete" | $GREP " "`
19341      if test "x$has_space" != x; then
19342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19344      fi
19345      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19346    fi
19347  fi
19348
19349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19352  # "foo.exe" is OK but "foo" is an error.
19353  #
19354  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19355  # It is also a way to make sure we got the proper file name for the real test later on.
19356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19357  if test "x$test_shortpath" = x; then
19358    # Short path failed, file does not exist as specified.
19359    # Try adding .exe or .cmd
19360    if test -f "${new_path}.exe"; then
19361      input_to_shortpath="${new_path}.exe"
19362    elif test -f "${new_path}.cmd"; then
19363      input_to_shortpath="${new_path}.cmd"
19364    else
19365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19366$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19369      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19370    fi
19371  else
19372    input_to_shortpath="$new_path"
19373  fi
19374
19375  # Call helper function which possibly converts this using DOS-style short mode.
19376  # If so, the updated path is stored in $new_path.
19377  new_path="$input_to_shortpath"
19378
19379  input_path="$input_to_shortpath"
19380  # Check if we need to convert this using DOS-style short mode. If the path
19381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19382  # take no chances and rewrite it.
19383  # Note: m4 eats our [], so we need to use [ and ] instead.
19384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19385  if test "x$has_forbidden_chars" != x; then
19386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19390      # Going to short mode and back again did indeed matter. Since short mode is
19391      # case insensitive, let's make it lowercase to improve readability.
19392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19393      # Now convert it back to Unix-stile (cygpath)
19394      input_path=`$CYGPATH -u "$shortmode_path"`
19395      new_path="$input_path"
19396    fi
19397  fi
19398
19399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19400  if test "x$test_cygdrive_prefix" = x; then
19401    # As a simple fix, exclude /usr/bin since it's not a real path.
19402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19404      # a path prefixed by /cygdrive for fixpath to work.
19405      new_path="$CYGWIN_ROOT_PATH$input_path"
19406    fi
19407  fi
19408
19409  # remove trailing .exe if any
19410  new_path="${new_path/%.exe/}"
19411
19412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413
19414  # First separate the path from the arguments. This will split at the first
19415  # space.
19416  complete="$CC"
19417  path="${complete%% *}"
19418  tmp="$complete EOL"
19419  arguments="${tmp#* }"
19420
19421  # Input might be given as Windows format, start by converting to
19422  # unix format.
19423  new_path="$path"
19424
19425  windows_path="$new_path"
19426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19427    unix_path=`$CYGPATH -u "$windows_path"`
19428    new_path="$unix_path"
19429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19431    new_path="$unix_path"
19432  fi
19433
19434
19435  # Now try to locate executable using which
19436  new_path=`$WHICH "$new_path" 2> /dev/null`
19437
19438  if test "x$new_path" = x; then
19439    # Oops. Which didn't find the executable.
19440    # The splitting of arguments from the executable at a space might have been incorrect,
19441    # since paths with space are more likely in Windows. Give it another try with the whole
19442    # argument.
19443    path="$complete"
19444    arguments="EOL"
19445    new_path="$path"
19446
19447  windows_path="$new_path"
19448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19449    unix_path=`$CYGPATH -u "$windows_path"`
19450    new_path="$unix_path"
19451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19453    new_path="$unix_path"
19454  fi
19455
19456
19457    new_path=`$WHICH "$new_path" 2> /dev/null`
19458
19459    if test "x$new_path" = x; then
19460      # It's still not found. Now this is an unrecoverable error.
19461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19462$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19463      has_space=`$ECHO "$complete" | $GREP " "`
19464      if test "x$has_space" != x; then
19465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19467      fi
19468      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19469    fi
19470  fi
19471
19472  # Now new_path has a complete unix path to the binary
19473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19474    # Keep paths in /bin as-is, but remove trailing .exe if any
19475    new_path="${new_path/%.exe/}"
19476    # Do not save /bin paths to all_fixpath_prefixes!
19477  else
19478    # Not in mixed or Windows style, start by that.
19479    new_path=`cmd //c echo $new_path`
19480
19481  input_path="$new_path"
19482  # Check if we need to convert this using DOS-style short mode. If the path
19483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19484  # take no chances and rewrite it.
19485  # Note: m4 eats our [], so we need to use [ and ] instead.
19486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19487  if test "x$has_forbidden_chars" != x; then
19488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19490  fi
19491
19492    # Output is in $new_path
19493
19494  windows_path="$new_path"
19495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19496    unix_path=`$CYGPATH -u "$windows_path"`
19497    new_path="$unix_path"
19498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19500    new_path="$unix_path"
19501  fi
19502
19503    # remove trailing .exe if any
19504    new_path="${new_path/%.exe/}"
19505
19506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19508  fi
19509
19510  else
19511    # We're on a posix platform. Hooray! :)
19512    # First separate the path from the arguments. This will split at the first
19513    # space.
19514    complete="$CC"
19515    path="${complete%% *}"
19516    tmp="$complete EOL"
19517    arguments="${tmp#* }"
19518
19519    # Cannot rely on the command "which" here since it doesn't always work.
19520    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19521    if test -z "$is_absolute_path"; then
19522      # Path to executable is not absolute. Find it.
19523      IFS_save="$IFS"
19524      IFS=:
19525      for p in $PATH; do
19526        if test -f "$p/$path" && test -x "$p/$path"; then
19527          new_path="$p/$path"
19528          break
19529        fi
19530      done
19531      IFS="$IFS_save"
19532    else
19533      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19534$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19535      new_path="$path"
19536    fi
19537
19538    if test "x$new_path" = x; then
19539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19540$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19541      has_space=`$ECHO "$complete" | $GREP " "`
19542      if test "x$has_space" != x; then
19543        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19545      fi
19546      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19547    fi
19548  fi
19549
19550  # Now join together the path and the arguments once again
19551  if test "x$arguments" != xEOL; then
19552    new_complete="$new_path ${arguments% *}"
19553  else
19554    new_complete="$new_path"
19555  fi
19556
19557  if test "x$complete" != "x$new_complete"; then
19558    CC="$new_complete"
19559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19560$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19561  fi
19562
19563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19564$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19565  TEST_COMPILER="$CC"
19566
19567  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19568    # Follow a chain of symbolic links. Use readlink
19569    # where it exists, else fall back to horribly
19570    # complicated shell code.
19571    if test "x$READLINK_TESTED" != yes; then
19572      # On MacOSX there is a readlink tool with a different
19573      # purpose than the GNU readlink tool. Check the found readlink.
19574      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19575      if test "x$ISGNU" = x; then
19576        # A readlink that we do not know how to use.
19577        # Are there other non-GNU readlinks out there?
19578        READLINK_TESTED=yes
19579        READLINK=
19580      fi
19581    fi
19582
19583    if test "x$READLINK" != x; then
19584      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19585    else
19586      # Save the current directory for restoring afterwards
19587      STARTDIR=$PWD
19588      COUNTER=0
19589      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19590      sym_link_file=`$BASENAME $TEST_COMPILER`
19591      cd $sym_link_dir
19592      # Use -P flag to resolve symlinks in directories.
19593      cd `$THEPWDCMD -P`
19594      sym_link_dir=`$THEPWDCMD -P`
19595      # Resolve file symlinks
19596      while test $COUNTER -lt 20; do
19597        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19598        if test "x$ISLINK" == x; then
19599          # This is not a symbolic link! We are done!
19600          break
19601        fi
19602        # Again resolve directory symlinks since the target of the just found
19603        # link could be in a different directory
19604        cd `$DIRNAME $ISLINK`
19605        sym_link_dir=`$THEPWDCMD -P`
19606        sym_link_file=`$BASENAME $ISLINK`
19607        let COUNTER=COUNTER+1
19608      done
19609      cd $STARTDIR
19610      TEST_COMPILER=$sym_link_dir/$sym_link_file
19611    fi
19612  fi
19613
19614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19615$as_echo "$TEST_COMPILER" >&6; }
19616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19617$as_echo_n "checking if CC is disguised ccache... " >&6; }
19618
19619  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19620  if test "x$COMPILER_BASENAME" = "xccache"; then
19621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19622$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19623    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19624    # We want to control ccache invocation ourselves, so ignore this cc and try
19625    # searching again.
19626
19627    # Remove the path to the fake ccache cc from the PATH
19628    RETRY_COMPILER_SAVED_PATH="$PATH"
19629    COMPILER_DIRNAME=`$DIRNAME $CC`
19630    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19631
19632    # Try again looking for our compiler
19633    if test -n "$ac_tool_prefix"; then
19634  for ac_prog in $COMPILER_CHECK_LIST
19635  do
19636    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19637set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19639$as_echo_n "checking for $ac_word... " >&6; }
19640if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19641  $as_echo_n "(cached) " >&6
19642else
19643  if test -n "$PROPER_COMPILER_CC"; then
19644  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19645else
19646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19647for as_dir in $PATH
19648do
19649  IFS=$as_save_IFS
19650  test -z "$as_dir" && as_dir=.
19651    for ac_exec_ext in '' $ac_executable_extensions; do
19652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19653    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19655    break 2
19656  fi
19657done
19658  done
19659IFS=$as_save_IFS
19660
19661fi
19662fi
19663PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19664if test -n "$PROPER_COMPILER_CC"; then
19665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19666$as_echo "$PROPER_COMPILER_CC" >&6; }
19667else
19668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19669$as_echo "no" >&6; }
19670fi
19671
19672
19673    test -n "$PROPER_COMPILER_CC" && break
19674  done
19675fi
19676if test -z "$PROPER_COMPILER_CC"; then
19677  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19678  for ac_prog in $COMPILER_CHECK_LIST
19679do
19680  # Extract the first word of "$ac_prog", so it can be a program name with args.
19681set dummy $ac_prog; ac_word=$2
19682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19683$as_echo_n "checking for $ac_word... " >&6; }
19684if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19685  $as_echo_n "(cached) " >&6
19686else
19687  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19688  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19689else
19690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19691for as_dir in $PATH
19692do
19693  IFS=$as_save_IFS
19694  test -z "$as_dir" && as_dir=.
19695    for ac_exec_ext in '' $ac_executable_extensions; do
19696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19697    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19699    break 2
19700  fi
19701done
19702  done
19703IFS=$as_save_IFS
19704
19705fi
19706fi
19707ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19708if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19710$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19711else
19712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19713$as_echo "no" >&6; }
19714fi
19715
19716
19717  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19718done
19719
19720  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19721    PROPER_COMPILER_CC=""
19722  else
19723    case $cross_compiling:$ac_tool_warned in
19724yes:)
19725{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19726$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19727ac_tool_warned=yes ;;
19728esac
19729    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19730  fi
19731fi
19732
19733
19734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19735
19736  # First separate the path from the arguments. This will split at the first
19737  # space.
19738  complete="$PROPER_COMPILER_CC"
19739  path="${complete%% *}"
19740  tmp="$complete EOL"
19741  arguments="${tmp#* }"
19742
19743  # Input might be given as Windows format, start by converting to
19744  # unix format.
19745  new_path=`$CYGPATH -u "$path"`
19746
19747  # Now try to locate executable using which
19748  new_path=`$WHICH "$new_path" 2> /dev/null`
19749  # bat and cmd files are not always considered executable in cygwin causing which
19750  # to not find them
19751  if test "x$new_path" = x \
19752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19754    new_path=`$CYGPATH -u "$path"`
19755  fi
19756  if test "x$new_path" = x; then
19757    # Oops. Which didn't find the executable.
19758    # The splitting of arguments from the executable at a space might have been incorrect,
19759    # since paths with space are more likely in Windows. Give it another try with the whole
19760    # argument.
19761    path="$complete"
19762    arguments="EOL"
19763    new_path=`$CYGPATH -u "$path"`
19764    new_path=`$WHICH "$new_path" 2> /dev/null`
19765    # bat and cmd files are not always considered executable in cygwin causing which
19766    # to not find them
19767    if test "x$new_path" = x \
19768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19770      new_path=`$CYGPATH -u "$path"`
19771    fi
19772    if test "x$new_path" = x; then
19773      # It's still not found. Now this is an unrecoverable error.
19774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19775$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19776      has_space=`$ECHO "$complete" | $GREP " "`
19777      if test "x$has_space" != x; then
19778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19780      fi
19781      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19782    fi
19783  fi
19784
19785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19788  # "foo.exe" is OK but "foo" is an error.
19789  #
19790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19791  # It is also a way to make sure we got the proper file name for the real test later on.
19792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19793  if test "x$test_shortpath" = x; then
19794    # Short path failed, file does not exist as specified.
19795    # Try adding .exe or .cmd
19796    if test -f "${new_path}.exe"; then
19797      input_to_shortpath="${new_path}.exe"
19798    elif test -f "${new_path}.cmd"; then
19799      input_to_shortpath="${new_path}.cmd"
19800    else
19801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19802$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19805      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19806    fi
19807  else
19808    input_to_shortpath="$new_path"
19809  fi
19810
19811  # Call helper function which possibly converts this using DOS-style short mode.
19812  # If so, the updated path is stored in $new_path.
19813  new_path="$input_to_shortpath"
19814
19815  input_path="$input_to_shortpath"
19816  # Check if we need to convert this using DOS-style short mode. If the path
19817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19818  # take no chances and rewrite it.
19819  # Note: m4 eats our [], so we need to use [ and ] instead.
19820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19821  if test "x$has_forbidden_chars" != x; then
19822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19826      # Going to short mode and back again did indeed matter. Since short mode is
19827      # case insensitive, let's make it lowercase to improve readability.
19828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19829      # Now convert it back to Unix-stile (cygpath)
19830      input_path=`$CYGPATH -u "$shortmode_path"`
19831      new_path="$input_path"
19832    fi
19833  fi
19834
19835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19836  if test "x$test_cygdrive_prefix" = x; then
19837    # As a simple fix, exclude /usr/bin since it's not a real path.
19838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19840      # a path prefixed by /cygdrive for fixpath to work.
19841      new_path="$CYGWIN_ROOT_PATH$input_path"
19842    fi
19843  fi
19844
19845  # remove trailing .exe if any
19846  new_path="${new_path/%.exe/}"
19847
19848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19849
19850  # First separate the path from the arguments. This will split at the first
19851  # space.
19852  complete="$PROPER_COMPILER_CC"
19853  path="${complete%% *}"
19854  tmp="$complete EOL"
19855  arguments="${tmp#* }"
19856
19857  # Input might be given as Windows format, start by converting to
19858  # unix format.
19859  new_path="$path"
19860
19861  windows_path="$new_path"
19862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19863    unix_path=`$CYGPATH -u "$windows_path"`
19864    new_path="$unix_path"
19865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19867    new_path="$unix_path"
19868  fi
19869
19870
19871  # Now try to locate executable using which
19872  new_path=`$WHICH "$new_path" 2> /dev/null`
19873
19874  if test "x$new_path" = x; then
19875    # Oops. Which didn't find the executable.
19876    # The splitting of arguments from the executable at a space might have been incorrect,
19877    # since paths with space are more likely in Windows. Give it another try with the whole
19878    # argument.
19879    path="$complete"
19880    arguments="EOL"
19881    new_path="$path"
19882
19883  windows_path="$new_path"
19884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19885    unix_path=`$CYGPATH -u "$windows_path"`
19886    new_path="$unix_path"
19887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19889    new_path="$unix_path"
19890  fi
19891
19892
19893    new_path=`$WHICH "$new_path" 2> /dev/null`
19894
19895    if test "x$new_path" = x; then
19896      # It's still not found. Now this is an unrecoverable error.
19897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19898$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19899      has_space=`$ECHO "$complete" | $GREP " "`
19900      if test "x$has_space" != x; then
19901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19903      fi
19904      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19905    fi
19906  fi
19907
19908  # Now new_path has a complete unix path to the binary
19909  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19910    # Keep paths in /bin as-is, but remove trailing .exe if any
19911    new_path="${new_path/%.exe/}"
19912    # Do not save /bin paths to all_fixpath_prefixes!
19913  else
19914    # Not in mixed or Windows style, start by that.
19915    new_path=`cmd //c echo $new_path`
19916
19917  input_path="$new_path"
19918  # Check if we need to convert this using DOS-style short mode. If the path
19919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19920  # take no chances and rewrite it.
19921  # Note: m4 eats our [], so we need to use [ and ] instead.
19922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19923  if test "x$has_forbidden_chars" != x; then
19924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19926  fi
19927
19928    # Output is in $new_path
19929
19930  windows_path="$new_path"
19931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19932    unix_path=`$CYGPATH -u "$windows_path"`
19933    new_path="$unix_path"
19934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19936    new_path="$unix_path"
19937  fi
19938
19939    # remove trailing .exe if any
19940    new_path="${new_path/%.exe/}"
19941
19942    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19943    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19944  fi
19945
19946  else
19947    # We're on a posix platform. Hooray! :)
19948    # First separate the path from the arguments. This will split at the first
19949    # space.
19950    complete="$PROPER_COMPILER_CC"
19951    path="${complete%% *}"
19952    tmp="$complete EOL"
19953    arguments="${tmp#* }"
19954
19955    # Cannot rely on the command "which" here since it doesn't always work.
19956    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19957    if test -z "$is_absolute_path"; then
19958      # Path to executable is not absolute. Find it.
19959      IFS_save="$IFS"
19960      IFS=:
19961      for p in $PATH; do
19962        if test -f "$p/$path" && test -x "$p/$path"; then
19963          new_path="$p/$path"
19964          break
19965        fi
19966      done
19967      IFS="$IFS_save"
19968    else
19969      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19970$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19971      new_path="$path"
19972    fi
19973
19974    if test "x$new_path" = x; then
19975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19976$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19977      has_space=`$ECHO "$complete" | $GREP " "`
19978      if test "x$has_space" != x; then
19979        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19981      fi
19982      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19983    fi
19984  fi
19985
19986  # Now join together the path and the arguments once again
19987  if test "x$arguments" != xEOL; then
19988    new_complete="$new_path ${arguments% *}"
19989  else
19990    new_complete="$new_path"
19991  fi
19992
19993  if test "x$complete" != "x$new_complete"; then
19994    PROPER_COMPILER_CC="$new_complete"
19995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19996$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19997  fi
19998
19999    PATH="$RETRY_COMPILER_SAVED_PATH"
20000
20001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20002$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20003
20004  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20005    # Follow a chain of symbolic links. Use readlink
20006    # where it exists, else fall back to horribly
20007    # complicated shell code.
20008    if test "x$READLINK_TESTED" != yes; then
20009      # On MacOSX there is a readlink tool with a different
20010      # purpose than the GNU readlink tool. Check the found readlink.
20011      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20012      if test "x$ISGNU" = x; then
20013        # A readlink that we do not know how to use.
20014        # Are there other non-GNU readlinks out there?
20015        READLINK_TESTED=yes
20016        READLINK=
20017      fi
20018    fi
20019
20020    if test "x$READLINK" != x; then
20021      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20022    else
20023      # Save the current directory for restoring afterwards
20024      STARTDIR=$PWD
20025      COUNTER=0
20026      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20027      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20028      cd $sym_link_dir
20029      # Use -P flag to resolve symlinks in directories.
20030      cd `$THEPWDCMD -P`
20031      sym_link_dir=`$THEPWDCMD -P`
20032      # Resolve file symlinks
20033      while test $COUNTER -lt 20; do
20034        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20035        if test "x$ISLINK" == x; then
20036          # This is not a symbolic link! We are done!
20037          break
20038        fi
20039        # Again resolve directory symlinks since the target of the just found
20040        # link could be in a different directory
20041        cd `$DIRNAME $ISLINK`
20042        sym_link_dir=`$THEPWDCMD -P`
20043        sym_link_file=`$BASENAME $ISLINK`
20044        let COUNTER=COUNTER+1
20045      done
20046      cd $STARTDIR
20047      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20048    fi
20049  fi
20050
20051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20052$as_echo "$PROPER_COMPILER_CC" >&6; }
20053    CC="$PROPER_COMPILER_CC"
20054  else
20055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20056$as_echo "no, keeping CC" >&6; }
20057  fi
20058
20059
20060  COMPILER=$CC
20061  COMPILER_NAME=$COMPILER_NAME
20062
20063  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20064    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20065    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20066    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20067    if test $? -ne 0; then
20068      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20069
20070      { $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
20071$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20072      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20073$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20074      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20075    else
20076      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20077      COMPILER_VENDOR="Sun Studio"
20078    fi
20079  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20080    # First line typically looks something like:
20081    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20082    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20083    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20084    COMPILER_VENDOR="Microsoft CL.EXE"
20085    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20086    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20087      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20088        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20089      fi
20090    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20091      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20092        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20093      fi
20094    fi
20095  else
20096    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20097    # Check that this is likely to be GCC.
20098    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20099    if test $? -ne 0; then
20100      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20101$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20102      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20103$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20104      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20105    fi
20106
20107    # First line typically looks something like:
20108    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20109    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20110    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20111  fi
20112  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20113  CC_VERSION="$COMPILER_VERSION"
20114  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20115  CC_VENDOR="$COMPILER_VENDOR"
20116
20117  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20118$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20119
20120
20121  # Now that we have resolved CC ourself, let autoconf have its go at it
20122  ac_ext=c
20123ac_cpp='$CPP $CPPFLAGS'
20124ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20125ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20126ac_compiler_gnu=$ac_cv_c_compiler_gnu
20127if test -n "$ac_tool_prefix"; then
20128  for ac_prog in $CC
20129  do
20130    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20131set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20133$as_echo_n "checking for $ac_word... " >&6; }
20134if ${ac_cv_prog_CC+:} false; then :
20135  $as_echo_n "(cached) " >&6
20136else
20137  if test -n "$CC"; then
20138  ac_cv_prog_CC="$CC" # Let the user override the test.
20139else
20140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20141for as_dir in $PATH
20142do
20143  IFS=$as_save_IFS
20144  test -z "$as_dir" && as_dir=.
20145    for ac_exec_ext in '' $ac_executable_extensions; do
20146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20147    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20149    break 2
20150  fi
20151done
20152  done
20153IFS=$as_save_IFS
20154
20155fi
20156fi
20157CC=$ac_cv_prog_CC
20158if test -n "$CC"; then
20159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20160$as_echo "$CC" >&6; }
20161else
20162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20163$as_echo "no" >&6; }
20164fi
20165
20166
20167    test -n "$CC" && break
20168  done
20169fi
20170if test -z "$CC"; then
20171  ac_ct_CC=$CC
20172  for ac_prog in $CC
20173do
20174  # Extract the first word of "$ac_prog", so it can be a program name with args.
20175set dummy $ac_prog; ac_word=$2
20176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20177$as_echo_n "checking for $ac_word... " >&6; }
20178if ${ac_cv_prog_ac_ct_CC+:} false; then :
20179  $as_echo_n "(cached) " >&6
20180else
20181  if test -n "$ac_ct_CC"; then
20182  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20183else
20184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20185for as_dir in $PATH
20186do
20187  IFS=$as_save_IFS
20188  test -z "$as_dir" && as_dir=.
20189    for ac_exec_ext in '' $ac_executable_extensions; do
20190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20191    ac_cv_prog_ac_ct_CC="$ac_prog"
20192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20193    break 2
20194  fi
20195done
20196  done
20197IFS=$as_save_IFS
20198
20199fi
20200fi
20201ac_ct_CC=$ac_cv_prog_ac_ct_CC
20202if test -n "$ac_ct_CC"; then
20203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20204$as_echo "$ac_ct_CC" >&6; }
20205else
20206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20207$as_echo "no" >&6; }
20208fi
20209
20210
20211  test -n "$ac_ct_CC" && break
20212done
20213
20214  if test "x$ac_ct_CC" = x; then
20215    CC=""
20216  else
20217    case $cross_compiling:$ac_tool_warned in
20218yes:)
20219{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20220$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20221ac_tool_warned=yes ;;
20222esac
20223    CC=$ac_ct_CC
20224  fi
20225fi
20226
20227
20228test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20230as_fn_error $? "no acceptable C compiler found in \$PATH
20231See \`config.log' for more details" "$LINENO" 5; }
20232
20233# Provide some information about the compiler.
20234$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20235set X $ac_compile
20236ac_compiler=$2
20237for ac_option in --version -v -V -qversion; do
20238  { { ac_try="$ac_compiler $ac_option >&5"
20239case "(($ac_try" in
20240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20241  *) ac_try_echo=$ac_try;;
20242esac
20243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20244$as_echo "$ac_try_echo"; } >&5
20245  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20246  ac_status=$?
20247  if test -s conftest.err; then
20248    sed '10a\
20249... rest of stderr output deleted ...
20250         10q' conftest.err >conftest.er1
20251    cat conftest.er1 >&5
20252  fi
20253  rm -f conftest.er1 conftest.err
20254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20255  test $ac_status = 0; }
20256done
20257
20258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20259/* end confdefs.h.  */
20260
20261int
20262main ()
20263{
20264
20265  ;
20266  return 0;
20267}
20268_ACEOF
20269ac_clean_files_save=$ac_clean_files
20270ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20271# Try to create an executable without -o first, disregard a.out.
20272# It will help us diagnose broken compilers, and finding out an intuition
20273# of exeext.
20274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20275$as_echo_n "checking whether the C compiler works... " >&6; }
20276ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20277
20278# The possible output files:
20279ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20280
20281ac_rmfiles=
20282for ac_file in $ac_files
20283do
20284  case $ac_file in
20285    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20286    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20287  esac
20288done
20289rm -f $ac_rmfiles
20290
20291if { { ac_try="$ac_link_default"
20292case "(($ac_try" in
20293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20294  *) ac_try_echo=$ac_try;;
20295esac
20296eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20297$as_echo "$ac_try_echo"; } >&5
20298  (eval "$ac_link_default") 2>&5
20299  ac_status=$?
20300  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20301  test $ac_status = 0; }; then :
20302  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20303# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20304# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20305# so that the user can short-circuit this test for compilers unknown to
20306# Autoconf.
20307for ac_file in $ac_files ''
20308do
20309  test -f "$ac_file" || continue
20310  case $ac_file in
20311    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20312	;;
20313    [ab].out )
20314	# We found the default executable, but exeext='' is most
20315	# certainly right.
20316	break;;
20317    *.* )
20318	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20319	then :; else
20320	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20321	fi
20322	# We set ac_cv_exeext here because the later test for it is not
20323	# safe: cross compilers may not add the suffix if given an `-o'
20324	# argument, so we may need to know it at that point already.
20325	# Even if this section looks crufty: it has the advantage of
20326	# actually working.
20327	break;;
20328    * )
20329	break;;
20330  esac
20331done
20332test "$ac_cv_exeext" = no && ac_cv_exeext=
20333
20334else
20335  ac_file=''
20336fi
20337if test -z "$ac_file"; then :
20338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20339$as_echo "no" >&6; }
20340$as_echo "$as_me: failed program was:" >&5
20341sed 's/^/| /' conftest.$ac_ext >&5
20342
20343{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20345as_fn_error 77 "C compiler cannot create executables
20346See \`config.log' for more details" "$LINENO" 5; }
20347else
20348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20349$as_echo "yes" >&6; }
20350fi
20351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20352$as_echo_n "checking for C compiler default output file name... " >&6; }
20353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20354$as_echo "$ac_file" >&6; }
20355ac_exeext=$ac_cv_exeext
20356
20357rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20358ac_clean_files=$ac_clean_files_save
20359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20360$as_echo_n "checking for suffix of executables... " >&6; }
20361if { { ac_try="$ac_link"
20362case "(($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_link") 2>&5
20369  ac_status=$?
20370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20371  test $ac_status = 0; }; then :
20372  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20373# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20374# work properly (i.e., refer to `conftest.exe'), while it won't with
20375# `rm'.
20376for ac_file in conftest.exe conftest conftest.*; do
20377  test -f "$ac_file" || continue
20378  case $ac_file in
20379    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20380    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20381	  break;;
20382    * ) break;;
20383  esac
20384done
20385else
20386  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20388as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20389See \`config.log' for more details" "$LINENO" 5; }
20390fi
20391rm -f conftest conftest$ac_cv_exeext
20392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20393$as_echo "$ac_cv_exeext" >&6; }
20394
20395rm -f conftest.$ac_ext
20396EXEEXT=$ac_cv_exeext
20397ac_exeext=$EXEEXT
20398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20399/* end confdefs.h.  */
20400#include <stdio.h>
20401int
20402main ()
20403{
20404FILE *f = fopen ("conftest.out", "w");
20405 return ferror (f) || fclose (f) != 0;
20406
20407  ;
20408  return 0;
20409}
20410_ACEOF
20411ac_clean_files="$ac_clean_files conftest.out"
20412# Check that the compiler produces executables we can run.  If not, either
20413# the compiler is broken, or we cross compile.
20414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20415$as_echo_n "checking whether we are cross compiling... " >&6; }
20416if test "$cross_compiling" != yes; then
20417  { { ac_try="$ac_link"
20418case "(($ac_try" in
20419  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20420  *) ac_try_echo=$ac_try;;
20421esac
20422eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20423$as_echo "$ac_try_echo"; } >&5
20424  (eval "$ac_link") 2>&5
20425  ac_status=$?
20426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20427  test $ac_status = 0; }
20428  if { ac_try='./conftest$ac_cv_exeext'
20429  { { case "(($ac_try" in
20430  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20431  *) ac_try_echo=$ac_try;;
20432esac
20433eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20434$as_echo "$ac_try_echo"; } >&5
20435  (eval "$ac_try") 2>&5
20436  ac_status=$?
20437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20438  test $ac_status = 0; }; }; then
20439    cross_compiling=no
20440  else
20441    if test "$cross_compiling" = maybe; then
20442	cross_compiling=yes
20443    else
20444	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20445$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20446as_fn_error $? "cannot run C compiled programs.
20447If you meant to cross compile, use \`--host'.
20448See \`config.log' for more details" "$LINENO" 5; }
20449    fi
20450  fi
20451fi
20452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20453$as_echo "$cross_compiling" >&6; }
20454
20455rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20456ac_clean_files=$ac_clean_files_save
20457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20458$as_echo_n "checking for suffix of object files... " >&6; }
20459if ${ac_cv_objext+:} false; then :
20460  $as_echo_n "(cached) " >&6
20461else
20462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20463/* end confdefs.h.  */
20464
20465int
20466main ()
20467{
20468
20469  ;
20470  return 0;
20471}
20472_ACEOF
20473rm -f conftest.o conftest.obj
20474if { { ac_try="$ac_compile"
20475case "(($ac_try" in
20476  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20477  *) ac_try_echo=$ac_try;;
20478esac
20479eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20480$as_echo "$ac_try_echo"; } >&5
20481  (eval "$ac_compile") 2>&5
20482  ac_status=$?
20483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20484  test $ac_status = 0; }; then :
20485  for ac_file in conftest.o conftest.obj conftest.*; do
20486  test -f "$ac_file" || continue;
20487  case $ac_file in
20488    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20489    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20490       break;;
20491  esac
20492done
20493else
20494  $as_echo "$as_me: failed program was:" >&5
20495sed 's/^/| /' conftest.$ac_ext >&5
20496
20497{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20499as_fn_error $? "cannot compute suffix of object files: cannot compile
20500See \`config.log' for more details" "$LINENO" 5; }
20501fi
20502rm -f conftest.$ac_cv_objext conftest.$ac_ext
20503fi
20504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20505$as_echo "$ac_cv_objext" >&6; }
20506OBJEXT=$ac_cv_objext
20507ac_objext=$OBJEXT
20508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20509$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20510if ${ac_cv_c_compiler_gnu+:} false; then :
20511  $as_echo_n "(cached) " >&6
20512else
20513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20514/* end confdefs.h.  */
20515
20516int
20517main ()
20518{
20519#ifndef __GNUC__
20520       choke me
20521#endif
20522
20523  ;
20524  return 0;
20525}
20526_ACEOF
20527if ac_fn_c_try_compile "$LINENO"; then :
20528  ac_compiler_gnu=yes
20529else
20530  ac_compiler_gnu=no
20531fi
20532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20533ac_cv_c_compiler_gnu=$ac_compiler_gnu
20534
20535fi
20536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20537$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20538if test $ac_compiler_gnu = yes; then
20539  GCC=yes
20540else
20541  GCC=
20542fi
20543ac_test_CFLAGS=${CFLAGS+set}
20544ac_save_CFLAGS=$CFLAGS
20545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20546$as_echo_n "checking whether $CC accepts -g... " >&6; }
20547if ${ac_cv_prog_cc_g+:} false; then :
20548  $as_echo_n "(cached) " >&6
20549else
20550  ac_save_c_werror_flag=$ac_c_werror_flag
20551   ac_c_werror_flag=yes
20552   ac_cv_prog_cc_g=no
20553   CFLAGS="-g"
20554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20555/* end confdefs.h.  */
20556
20557int
20558main ()
20559{
20560
20561  ;
20562  return 0;
20563}
20564_ACEOF
20565if ac_fn_c_try_compile "$LINENO"; then :
20566  ac_cv_prog_cc_g=yes
20567else
20568  CFLAGS=""
20569      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20570/* end confdefs.h.  */
20571
20572int
20573main ()
20574{
20575
20576  ;
20577  return 0;
20578}
20579_ACEOF
20580if ac_fn_c_try_compile "$LINENO"; then :
20581
20582else
20583  ac_c_werror_flag=$ac_save_c_werror_flag
20584	 CFLAGS="-g"
20585	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20586/* end confdefs.h.  */
20587
20588int
20589main ()
20590{
20591
20592  ;
20593  return 0;
20594}
20595_ACEOF
20596if ac_fn_c_try_compile "$LINENO"; then :
20597  ac_cv_prog_cc_g=yes
20598fi
20599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20600fi
20601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20602fi
20603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20604   ac_c_werror_flag=$ac_save_c_werror_flag
20605fi
20606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20607$as_echo "$ac_cv_prog_cc_g" >&6; }
20608if test "$ac_test_CFLAGS" = set; then
20609  CFLAGS=$ac_save_CFLAGS
20610elif test $ac_cv_prog_cc_g = yes; then
20611  if test "$GCC" = yes; then
20612    CFLAGS="-g -O2"
20613  else
20614    CFLAGS="-g"
20615  fi
20616else
20617  if test "$GCC" = yes; then
20618    CFLAGS="-O2"
20619  else
20620    CFLAGS=
20621  fi
20622fi
20623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20624$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20625if ${ac_cv_prog_cc_c89+:} false; then :
20626  $as_echo_n "(cached) " >&6
20627else
20628  ac_cv_prog_cc_c89=no
20629ac_save_CC=$CC
20630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20631/* end confdefs.h.  */
20632#include <stdarg.h>
20633#include <stdio.h>
20634struct stat;
20635/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20636struct buf { int x; };
20637FILE * (*rcsopen) (struct buf *, struct stat *, int);
20638static char *e (p, i)
20639     char **p;
20640     int i;
20641{
20642  return p[i];
20643}
20644static char *f (char * (*g) (char **, int), char **p, ...)
20645{
20646  char *s;
20647  va_list v;
20648  va_start (v,p);
20649  s = g (p, va_arg (v,int));
20650  va_end (v);
20651  return s;
20652}
20653
20654/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20655   function prototypes and stuff, but not '\xHH' hex character constants.
20656   These don't provoke an error unfortunately, instead are silently treated
20657   as 'x'.  The following induces an error, until -std is added to get
20658   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20659   array size at least.  It's necessary to write '\x00'==0 to get something
20660   that's true only with -std.  */
20661int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20662
20663/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20664   inside strings and character constants.  */
20665#define FOO(x) 'x'
20666int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20667
20668int test (int i, double x);
20669struct s1 {int (*f) (int a);};
20670struct s2 {int (*f) (double a);};
20671int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20672int argc;
20673char **argv;
20674int
20675main ()
20676{
20677return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20678  ;
20679  return 0;
20680}
20681_ACEOF
20682for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20683	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20684do
20685  CC="$ac_save_CC $ac_arg"
20686  if ac_fn_c_try_compile "$LINENO"; then :
20687  ac_cv_prog_cc_c89=$ac_arg
20688fi
20689rm -f core conftest.err conftest.$ac_objext
20690  test "x$ac_cv_prog_cc_c89" != "xno" && break
20691done
20692rm -f conftest.$ac_ext
20693CC=$ac_save_CC
20694
20695fi
20696# AC_CACHE_VAL
20697case "x$ac_cv_prog_cc_c89" in
20698  x)
20699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20700$as_echo "none needed" >&6; } ;;
20701  xno)
20702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20703$as_echo "unsupported" >&6; } ;;
20704  *)
20705    CC="$CC $ac_cv_prog_cc_c89"
20706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20707$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20708esac
20709if test "x$ac_cv_prog_cc_c89" != xno; then :
20710
20711fi
20712
20713ac_ext=cpp
20714ac_cpp='$CXXCPP $CPPFLAGS'
20715ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20716ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20717ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20718
20719
20720  ### Locate C++ compiler (CXX)
20721
20722  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20723    COMPILER_CHECK_LIST="cl"
20724  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20725    COMPILER_CHECK_LIST="CC g++"
20726  else
20727    COMPILER_CHECK_LIST="g++ CC"
20728  fi
20729
20730
20731  COMPILER_NAME=C++
20732  SEARCH_LIST="$COMPILER_CHECK_LIST"
20733
20734  if test "x$CXX" != x; then
20735    # User has supplied compiler name already, always let that override.
20736    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
20737$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
20738    if test "x`basename $CXX`" = "x$CXX"; then
20739      # A command without a complete path is provided, search $PATH.
20740
20741      for ac_prog in $CXX
20742do
20743  # Extract the first word of "$ac_prog", so it can be a program name with args.
20744set dummy $ac_prog; ac_word=$2
20745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20746$as_echo_n "checking for $ac_word... " >&6; }
20747if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20748  $as_echo_n "(cached) " >&6
20749else
20750  case $POTENTIAL_CXX in
20751  [\\/]* | ?:[\\/]*)
20752  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20753  ;;
20754  *)
20755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20756for as_dir in $PATH
20757do
20758  IFS=$as_save_IFS
20759  test -z "$as_dir" && as_dir=.
20760    for ac_exec_ext in '' $ac_executable_extensions; do
20761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20762    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20764    break 2
20765  fi
20766done
20767  done
20768IFS=$as_save_IFS
20769
20770  ;;
20771esac
20772fi
20773POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20774if test -n "$POTENTIAL_CXX"; then
20775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20776$as_echo "$POTENTIAL_CXX" >&6; }
20777else
20778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20779$as_echo "no" >&6; }
20780fi
20781
20782
20783  test -n "$POTENTIAL_CXX" && break
20784done
20785
20786      if test "x$POTENTIAL_CXX" != x; then
20787        CXX=$POTENTIAL_CXX
20788      else
20789        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
20790      fi
20791    else
20792      # Otherwise it might already be a complete path
20793      if test ! -x "$CXX"; then
20794        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
20795      fi
20796    fi
20797  else
20798    # No user supplied value. Locate compiler ourselves
20799    CXX=
20800    # If TOOLS_DIR is set, check for all compiler names in there first
20801    # before checking the rest of the PATH.
20802    if test -n "$TOOLS_DIR"; then
20803      PATH_save="$PATH"
20804      PATH="$TOOLS_DIR"
20805      for ac_prog in $SEARCH_LIST
20806do
20807  # Extract the first word of "$ac_prog", so it can be a program name with args.
20808set dummy $ac_prog; ac_word=$2
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20810$as_echo_n "checking for $ac_word... " >&6; }
20811if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20812  $as_echo_n "(cached) " >&6
20813else
20814  case $TOOLS_DIR_CXX in
20815  [\\/]* | ?:[\\/]*)
20816  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20817  ;;
20818  *)
20819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20820for as_dir in $PATH
20821do
20822  IFS=$as_save_IFS
20823  test -z "$as_dir" && as_dir=.
20824    for ac_exec_ext in '' $ac_executable_extensions; do
20825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20826    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20828    break 2
20829  fi
20830done
20831  done
20832IFS=$as_save_IFS
20833
20834  ;;
20835esac
20836fi
20837TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20838if test -n "$TOOLS_DIR_CXX"; then
20839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20840$as_echo "$TOOLS_DIR_CXX" >&6; }
20841else
20842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20843$as_echo "no" >&6; }
20844fi
20845
20846
20847  test -n "$TOOLS_DIR_CXX" && break
20848done
20849
20850      CXX=$TOOLS_DIR_CXX
20851      PATH="$PATH_save"
20852    fi
20853
20854    # AC_PATH_PROGS can't be run multiple times with the same variable,
20855    # so create a new name for this run.
20856    if test "x$CXX" = x; then
20857      for ac_prog in $SEARCH_LIST
20858do
20859  # Extract the first word of "$ac_prog", so it can be a program name with args.
20860set dummy $ac_prog; ac_word=$2
20861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20862$as_echo_n "checking for $ac_word... " >&6; }
20863if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20864  $as_echo_n "(cached) " >&6
20865else
20866  case $POTENTIAL_CXX in
20867  [\\/]* | ?:[\\/]*)
20868  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20869  ;;
20870  *)
20871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20872for as_dir in $PATH
20873do
20874  IFS=$as_save_IFS
20875  test -z "$as_dir" && as_dir=.
20876    for ac_exec_ext in '' $ac_executable_extensions; do
20877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20878    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20880    break 2
20881  fi
20882done
20883  done
20884IFS=$as_save_IFS
20885
20886  ;;
20887esac
20888fi
20889POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20890if test -n "$POTENTIAL_CXX"; then
20891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20892$as_echo "$POTENTIAL_CXX" >&6; }
20893else
20894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20895$as_echo "no" >&6; }
20896fi
20897
20898
20899  test -n "$POTENTIAL_CXX" && break
20900done
20901
20902      CXX=$POTENTIAL_CXX
20903    fi
20904
20905    if test "x$CXX" = x; then
20906
20907  # Print a helpful message on how to acquire the necessary build dependency.
20908  # devkit is the help tag: freetype, cups, pulse, alsa etc
20909  MISSING_DEPENDENCY=devkit
20910
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    cygwin_help $MISSING_DEPENDENCY
20913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20914    msys_help $MISSING_DEPENDENCY
20915  else
20916    PKGHANDLER_COMMAND=
20917
20918    case $PKGHANDLER in
20919      apt-get)
20920        apt_help     $MISSING_DEPENDENCY ;;
20921      yum)
20922        yum_help     $MISSING_DEPENDENCY ;;
20923      port)
20924        port_help    $MISSING_DEPENDENCY ;;
20925      pkgutil)
20926        pkgutil_help $MISSING_DEPENDENCY ;;
20927      pkgadd)
20928        pkgadd_help  $MISSING_DEPENDENCY ;;
20929      * )
20930        break ;;
20931    esac
20932
20933    if test "x$PKGHANDLER_COMMAND" != x; then
20934      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20935    fi
20936  fi
20937
20938      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20939    fi
20940  fi
20941
20942  # Now we have a compiler binary in CXX. Make sure it's okay.
20943
20944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20945
20946  # First separate the path from the arguments. This will split at the first
20947  # space.
20948  complete="$CXX"
20949  path="${complete%% *}"
20950  tmp="$complete EOL"
20951  arguments="${tmp#* }"
20952
20953  # Input might be given as Windows format, start by converting to
20954  # unix format.
20955  new_path=`$CYGPATH -u "$path"`
20956
20957  # Now try to locate executable using which
20958  new_path=`$WHICH "$new_path" 2> /dev/null`
20959  # bat and cmd files are not always considered executable in cygwin causing which
20960  # to not find them
20961  if test "x$new_path" = x \
20962      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20963      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20964    new_path=`$CYGPATH -u "$path"`
20965  fi
20966  if test "x$new_path" = x; then
20967    # Oops. Which didn't find the executable.
20968    # The splitting of arguments from the executable at a space might have been incorrect,
20969    # since paths with space are more likely in Windows. Give it another try with the whole
20970    # argument.
20971    path="$complete"
20972    arguments="EOL"
20973    new_path=`$CYGPATH -u "$path"`
20974    new_path=`$WHICH "$new_path" 2> /dev/null`
20975    # bat and cmd files are not always considered executable in cygwin causing which
20976    # to not find them
20977    if test "x$new_path" = x \
20978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20980      new_path=`$CYGPATH -u "$path"`
20981    fi
20982    if test "x$new_path" = x; then
20983      # It's still not found. Now this is an unrecoverable error.
20984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20985$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20986      has_space=`$ECHO "$complete" | $GREP " "`
20987      if test "x$has_space" != x; then
20988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20990      fi
20991      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20992    fi
20993  fi
20994
20995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20998  # "foo.exe" is OK but "foo" is an error.
20999  #
21000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21001  # It is also a way to make sure we got the proper file name for the real test later on.
21002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21003  if test "x$test_shortpath" = x; then
21004    # Short path failed, file does not exist as specified.
21005    # Try adding .exe or .cmd
21006    if test -f "${new_path}.exe"; then
21007      input_to_shortpath="${new_path}.exe"
21008    elif test -f "${new_path}.cmd"; then
21009      input_to_shortpath="${new_path}.cmd"
21010    else
21011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21012$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21015      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21016    fi
21017  else
21018    input_to_shortpath="$new_path"
21019  fi
21020
21021  # Call helper function which possibly converts this using DOS-style short mode.
21022  # If so, the updated path is stored in $new_path.
21023  new_path="$input_to_shortpath"
21024
21025  input_path="$input_to_shortpath"
21026  # Check if we need to convert this using DOS-style short mode. If the path
21027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21028  # take no chances and rewrite it.
21029  # Note: m4 eats our [], so we need to use [ and ] instead.
21030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21031  if test "x$has_forbidden_chars" != x; then
21032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21036      # Going to short mode and back again did indeed matter. Since short mode is
21037      # case insensitive, let's make it lowercase to improve readability.
21038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21039      # Now convert it back to Unix-stile (cygpath)
21040      input_path=`$CYGPATH -u "$shortmode_path"`
21041      new_path="$input_path"
21042    fi
21043  fi
21044
21045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21046  if test "x$test_cygdrive_prefix" = x; then
21047    # As a simple fix, exclude /usr/bin since it's not a real path.
21048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21050      # a path prefixed by /cygdrive for fixpath to work.
21051      new_path="$CYGWIN_ROOT_PATH$input_path"
21052    fi
21053  fi
21054
21055  # remove trailing .exe if any
21056  new_path="${new_path/%.exe/}"
21057
21058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21059
21060  # First separate the path from the arguments. This will split at the first
21061  # space.
21062  complete="$CXX"
21063  path="${complete%% *}"
21064  tmp="$complete EOL"
21065  arguments="${tmp#* }"
21066
21067  # Input might be given as Windows format, start by converting to
21068  # unix format.
21069  new_path="$path"
21070
21071  windows_path="$new_path"
21072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21073    unix_path=`$CYGPATH -u "$windows_path"`
21074    new_path="$unix_path"
21075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21077    new_path="$unix_path"
21078  fi
21079
21080
21081  # Now try to locate executable using which
21082  new_path=`$WHICH "$new_path" 2> /dev/null`
21083
21084  if test "x$new_path" = x; then
21085    # Oops. Which didn't find the executable.
21086    # The splitting of arguments from the executable at a space might have been incorrect,
21087    # since paths with space are more likely in Windows. Give it another try with the whole
21088    # argument.
21089    path="$complete"
21090    arguments="EOL"
21091    new_path="$path"
21092
21093  windows_path="$new_path"
21094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21095    unix_path=`$CYGPATH -u "$windows_path"`
21096    new_path="$unix_path"
21097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21099    new_path="$unix_path"
21100  fi
21101
21102
21103    new_path=`$WHICH "$new_path" 2> /dev/null`
21104
21105    if test "x$new_path" = x; then
21106      # It's still not found. Now this is an unrecoverable error.
21107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21108$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21109      has_space=`$ECHO "$complete" | $GREP " "`
21110      if test "x$has_space" != x; then
21111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21113      fi
21114      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21115    fi
21116  fi
21117
21118  # Now new_path has a complete unix path to the binary
21119  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21120    # Keep paths in /bin as-is, but remove trailing .exe if any
21121    new_path="${new_path/%.exe/}"
21122    # Do not save /bin paths to all_fixpath_prefixes!
21123  else
21124    # Not in mixed or Windows style, start by that.
21125    new_path=`cmd //c echo $new_path`
21126
21127  input_path="$new_path"
21128  # Check if we need to convert this using DOS-style short mode. If the path
21129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21130  # take no chances and rewrite it.
21131  # Note: m4 eats our [], so we need to use [ and ] instead.
21132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21133  if test "x$has_forbidden_chars" != x; then
21134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21136  fi
21137
21138    # Output is in $new_path
21139
21140  windows_path="$new_path"
21141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21142    unix_path=`$CYGPATH -u "$windows_path"`
21143    new_path="$unix_path"
21144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21146    new_path="$unix_path"
21147  fi
21148
21149    # remove trailing .exe if any
21150    new_path="${new_path/%.exe/}"
21151
21152    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21153    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21154  fi
21155
21156  else
21157    # We're on a posix platform. Hooray! :)
21158    # First separate the path from the arguments. This will split at the first
21159    # space.
21160    complete="$CXX"
21161    path="${complete%% *}"
21162    tmp="$complete EOL"
21163    arguments="${tmp#* }"
21164
21165    # Cannot rely on the command "which" here since it doesn't always work.
21166    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21167    if test -z "$is_absolute_path"; then
21168      # Path to executable is not absolute. Find it.
21169      IFS_save="$IFS"
21170      IFS=:
21171      for p in $PATH; do
21172        if test -f "$p/$path" && test -x "$p/$path"; then
21173          new_path="$p/$path"
21174          break
21175        fi
21176      done
21177      IFS="$IFS_save"
21178    else
21179      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21180$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21181      new_path="$path"
21182    fi
21183
21184    if test "x$new_path" = x; then
21185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21186$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21187      has_space=`$ECHO "$complete" | $GREP " "`
21188      if test "x$has_space" != x; then
21189        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21190$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21191      fi
21192      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21193    fi
21194  fi
21195
21196  # Now join together the path and the arguments once again
21197  if test "x$arguments" != xEOL; then
21198    new_complete="$new_path ${arguments% *}"
21199  else
21200    new_complete="$new_path"
21201  fi
21202
21203  if test "x$complete" != "x$new_complete"; then
21204    CXX="$new_complete"
21205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21206$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21207  fi
21208
21209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21210$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21211  TEST_COMPILER="$CXX"
21212
21213  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21214    # Follow a chain of symbolic links. Use readlink
21215    # where it exists, else fall back to horribly
21216    # complicated shell code.
21217    if test "x$READLINK_TESTED" != yes; then
21218      # On MacOSX there is a readlink tool with a different
21219      # purpose than the GNU readlink tool. Check the found readlink.
21220      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21221      if test "x$ISGNU" = x; then
21222        # A readlink that we do not know how to use.
21223        # Are there other non-GNU readlinks out there?
21224        READLINK_TESTED=yes
21225        READLINK=
21226      fi
21227    fi
21228
21229    if test "x$READLINK" != x; then
21230      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21231    else
21232      # Save the current directory for restoring afterwards
21233      STARTDIR=$PWD
21234      COUNTER=0
21235      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21236      sym_link_file=`$BASENAME $TEST_COMPILER`
21237      cd $sym_link_dir
21238      # Use -P flag to resolve symlinks in directories.
21239      cd `$THEPWDCMD -P`
21240      sym_link_dir=`$THEPWDCMD -P`
21241      # Resolve file symlinks
21242      while test $COUNTER -lt 20; do
21243        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21244        if test "x$ISLINK" == x; then
21245          # This is not a symbolic link! We are done!
21246          break
21247        fi
21248        # Again resolve directory symlinks since the target of the just found
21249        # link could be in a different directory
21250        cd `$DIRNAME $ISLINK`
21251        sym_link_dir=`$THEPWDCMD -P`
21252        sym_link_file=`$BASENAME $ISLINK`
21253        let COUNTER=COUNTER+1
21254      done
21255      cd $STARTDIR
21256      TEST_COMPILER=$sym_link_dir/$sym_link_file
21257    fi
21258  fi
21259
21260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21261$as_echo "$TEST_COMPILER" >&6; }
21262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21263$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21264
21265  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21266  if test "x$COMPILER_BASENAME" = "xccache"; then
21267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21268$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21269    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21270    # We want to control ccache invocation ourselves, so ignore this cc and try
21271    # searching again.
21272
21273    # Remove the path to the fake ccache cc from the PATH
21274    RETRY_COMPILER_SAVED_PATH="$PATH"
21275    COMPILER_DIRNAME=`$DIRNAME $CXX`
21276    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21277
21278    # Try again looking for our compiler
21279    if test -n "$ac_tool_prefix"; then
21280  for ac_prog in $COMPILER_CHECK_LIST
21281  do
21282    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21283set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21285$as_echo_n "checking for $ac_word... " >&6; }
21286if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21287  $as_echo_n "(cached) " >&6
21288else
21289  if test -n "$PROPER_COMPILER_CXX"; then
21290  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21291else
21292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21293for as_dir in $PATH
21294do
21295  IFS=$as_save_IFS
21296  test -z "$as_dir" && as_dir=.
21297    for ac_exec_ext in '' $ac_executable_extensions; do
21298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21299    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21301    break 2
21302  fi
21303done
21304  done
21305IFS=$as_save_IFS
21306
21307fi
21308fi
21309PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21310if test -n "$PROPER_COMPILER_CXX"; then
21311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21312$as_echo "$PROPER_COMPILER_CXX" >&6; }
21313else
21314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21315$as_echo "no" >&6; }
21316fi
21317
21318
21319    test -n "$PROPER_COMPILER_CXX" && break
21320  done
21321fi
21322if test -z "$PROPER_COMPILER_CXX"; then
21323  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21324  for ac_prog in $COMPILER_CHECK_LIST
21325do
21326  # Extract the first word of "$ac_prog", so it can be a program name with args.
21327set dummy $ac_prog; ac_word=$2
21328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21329$as_echo_n "checking for $ac_word... " >&6; }
21330if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21331  $as_echo_n "(cached) " >&6
21332else
21333  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21334  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21335else
21336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21337for as_dir in $PATH
21338do
21339  IFS=$as_save_IFS
21340  test -z "$as_dir" && as_dir=.
21341    for ac_exec_ext in '' $ac_executable_extensions; do
21342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21343    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21345    break 2
21346  fi
21347done
21348  done
21349IFS=$as_save_IFS
21350
21351fi
21352fi
21353ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21354if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21356$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21357else
21358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21359$as_echo "no" >&6; }
21360fi
21361
21362
21363  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21364done
21365
21366  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21367    PROPER_COMPILER_CXX=""
21368  else
21369    case $cross_compiling:$ac_tool_warned in
21370yes:)
21371{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21372$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21373ac_tool_warned=yes ;;
21374esac
21375    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21376  fi
21377fi
21378
21379
21380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21381
21382  # First separate the path from the arguments. This will split at the first
21383  # space.
21384  complete="$PROPER_COMPILER_CXX"
21385  path="${complete%% *}"
21386  tmp="$complete EOL"
21387  arguments="${tmp#* }"
21388
21389  # Input might be given as Windows format, start by converting to
21390  # unix format.
21391  new_path=`$CYGPATH -u "$path"`
21392
21393  # Now try to locate executable using which
21394  new_path=`$WHICH "$new_path" 2> /dev/null`
21395  # bat and cmd files are not always considered executable in cygwin causing which
21396  # to not find them
21397  if test "x$new_path" = x \
21398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21400    new_path=`$CYGPATH -u "$path"`
21401  fi
21402  if test "x$new_path" = x; then
21403    # Oops. Which didn't find the executable.
21404    # The splitting of arguments from the executable at a space might have been incorrect,
21405    # since paths with space are more likely in Windows. Give it another try with the whole
21406    # argument.
21407    path="$complete"
21408    arguments="EOL"
21409    new_path=`$CYGPATH -u "$path"`
21410    new_path=`$WHICH "$new_path" 2> /dev/null`
21411    # bat and cmd files are not always considered executable in cygwin causing which
21412    # to not find them
21413    if test "x$new_path" = x \
21414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21416      new_path=`$CYGPATH -u "$path"`
21417    fi
21418    if test "x$new_path" = x; then
21419      # It's still not found. Now this is an unrecoverable error.
21420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21421$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21422      has_space=`$ECHO "$complete" | $GREP " "`
21423      if test "x$has_space" != x; then
21424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21426      fi
21427      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21428    fi
21429  fi
21430
21431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21434  # "foo.exe" is OK but "foo" is an error.
21435  #
21436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21437  # It is also a way to make sure we got the proper file name for the real test later on.
21438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21439  if test "x$test_shortpath" = x; then
21440    # Short path failed, file does not exist as specified.
21441    # Try adding .exe or .cmd
21442    if test -f "${new_path}.exe"; then
21443      input_to_shortpath="${new_path}.exe"
21444    elif test -f "${new_path}.cmd"; then
21445      input_to_shortpath="${new_path}.cmd"
21446    else
21447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21448$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21451      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21452    fi
21453  else
21454    input_to_shortpath="$new_path"
21455  fi
21456
21457  # Call helper function which possibly converts this using DOS-style short mode.
21458  # If so, the updated path is stored in $new_path.
21459  new_path="$input_to_shortpath"
21460
21461  input_path="$input_to_shortpath"
21462  # Check if we need to convert this using DOS-style short mode. If the path
21463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21464  # take no chances and rewrite it.
21465  # Note: m4 eats our [], so we need to use [ and ] instead.
21466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21467  if test "x$has_forbidden_chars" != x; then
21468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21472      # Going to short mode and back again did indeed matter. Since short mode is
21473      # case insensitive, let's make it lowercase to improve readability.
21474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21475      # Now convert it back to Unix-stile (cygpath)
21476      input_path=`$CYGPATH -u "$shortmode_path"`
21477      new_path="$input_path"
21478    fi
21479  fi
21480
21481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21482  if test "x$test_cygdrive_prefix" = x; then
21483    # As a simple fix, exclude /usr/bin since it's not a real path.
21484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21486      # a path prefixed by /cygdrive for fixpath to work.
21487      new_path="$CYGWIN_ROOT_PATH$input_path"
21488    fi
21489  fi
21490
21491  # remove trailing .exe if any
21492  new_path="${new_path/%.exe/}"
21493
21494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21495
21496  # First separate the path from the arguments. This will split at the first
21497  # space.
21498  complete="$PROPER_COMPILER_CXX"
21499  path="${complete%% *}"
21500  tmp="$complete EOL"
21501  arguments="${tmp#* }"
21502
21503  # Input might be given as Windows format, start by converting to
21504  # unix format.
21505  new_path="$path"
21506
21507  windows_path="$new_path"
21508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21509    unix_path=`$CYGPATH -u "$windows_path"`
21510    new_path="$unix_path"
21511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21513    new_path="$unix_path"
21514  fi
21515
21516
21517  # Now try to locate executable using which
21518  new_path=`$WHICH "$new_path" 2> /dev/null`
21519
21520  if test "x$new_path" = x; then
21521    # Oops. Which didn't find the executable.
21522    # The splitting of arguments from the executable at a space might have been incorrect,
21523    # since paths with space are more likely in Windows. Give it another try with the whole
21524    # argument.
21525    path="$complete"
21526    arguments="EOL"
21527    new_path="$path"
21528
21529  windows_path="$new_path"
21530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21531    unix_path=`$CYGPATH -u "$windows_path"`
21532    new_path="$unix_path"
21533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21535    new_path="$unix_path"
21536  fi
21537
21538
21539    new_path=`$WHICH "$new_path" 2> /dev/null`
21540
21541    if test "x$new_path" = x; then
21542      # It's still not found. Now this is an unrecoverable error.
21543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21544$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21545      has_space=`$ECHO "$complete" | $GREP " "`
21546      if test "x$has_space" != x; then
21547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21549      fi
21550      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21551    fi
21552  fi
21553
21554  # Now new_path has a complete unix path to the binary
21555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21556    # Keep paths in /bin as-is, but remove trailing .exe if any
21557    new_path="${new_path/%.exe/}"
21558    # Do not save /bin paths to all_fixpath_prefixes!
21559  else
21560    # Not in mixed or Windows style, start by that.
21561    new_path=`cmd //c echo $new_path`
21562
21563  input_path="$new_path"
21564  # Check if we need to convert this using DOS-style short mode. If the path
21565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21566  # take no chances and rewrite it.
21567  # Note: m4 eats our [], so we need to use [ and ] instead.
21568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21569  if test "x$has_forbidden_chars" != x; then
21570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21572  fi
21573
21574    # Output is in $new_path
21575
21576  windows_path="$new_path"
21577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21578    unix_path=`$CYGPATH -u "$windows_path"`
21579    new_path="$unix_path"
21580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21582    new_path="$unix_path"
21583  fi
21584
21585    # remove trailing .exe if any
21586    new_path="${new_path/%.exe/}"
21587
21588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21590  fi
21591
21592  else
21593    # We're on a posix platform. Hooray! :)
21594    # First separate the path from the arguments. This will split at the first
21595    # space.
21596    complete="$PROPER_COMPILER_CXX"
21597    path="${complete%% *}"
21598    tmp="$complete EOL"
21599    arguments="${tmp#* }"
21600
21601    # Cannot rely on the command "which" here since it doesn't always work.
21602    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21603    if test -z "$is_absolute_path"; then
21604      # Path to executable is not absolute. Find it.
21605      IFS_save="$IFS"
21606      IFS=:
21607      for p in $PATH; do
21608        if test -f "$p/$path" && test -x "$p/$path"; then
21609          new_path="$p/$path"
21610          break
21611        fi
21612      done
21613      IFS="$IFS_save"
21614    else
21615      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21616$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21617      new_path="$path"
21618    fi
21619
21620    if test "x$new_path" = x; then
21621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21622$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21623      has_space=`$ECHO "$complete" | $GREP " "`
21624      if test "x$has_space" != x; then
21625        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21626$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21627      fi
21628      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21629    fi
21630  fi
21631
21632  # Now join together the path and the arguments once again
21633  if test "x$arguments" != xEOL; then
21634    new_complete="$new_path ${arguments% *}"
21635  else
21636    new_complete="$new_path"
21637  fi
21638
21639  if test "x$complete" != "x$new_complete"; then
21640    PROPER_COMPILER_CXX="$new_complete"
21641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21642$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21643  fi
21644
21645    PATH="$RETRY_COMPILER_SAVED_PATH"
21646
21647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21648$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21649
21650  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21651    # Follow a chain of symbolic links. Use readlink
21652    # where it exists, else fall back to horribly
21653    # complicated shell code.
21654    if test "x$READLINK_TESTED" != yes; then
21655      # On MacOSX there is a readlink tool with a different
21656      # purpose than the GNU readlink tool. Check the found readlink.
21657      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21658      if test "x$ISGNU" = x; then
21659        # A readlink that we do not know how to use.
21660        # Are there other non-GNU readlinks out there?
21661        READLINK_TESTED=yes
21662        READLINK=
21663      fi
21664    fi
21665
21666    if test "x$READLINK" != x; then
21667      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21668    else
21669      # Save the current directory for restoring afterwards
21670      STARTDIR=$PWD
21671      COUNTER=0
21672      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21673      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21674      cd $sym_link_dir
21675      # Use -P flag to resolve symlinks in directories.
21676      cd `$THEPWDCMD -P`
21677      sym_link_dir=`$THEPWDCMD -P`
21678      # Resolve file symlinks
21679      while test $COUNTER -lt 20; do
21680        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21681        if test "x$ISLINK" == x; then
21682          # This is not a symbolic link! We are done!
21683          break
21684        fi
21685        # Again resolve directory symlinks since the target of the just found
21686        # link could be in a different directory
21687        cd `$DIRNAME $ISLINK`
21688        sym_link_dir=`$THEPWDCMD -P`
21689        sym_link_file=`$BASENAME $ISLINK`
21690        let COUNTER=COUNTER+1
21691      done
21692      cd $STARTDIR
21693      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21694    fi
21695  fi
21696
21697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21698$as_echo "$PROPER_COMPILER_CXX" >&6; }
21699    CXX="$PROPER_COMPILER_CXX"
21700  else
21701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21702$as_echo "no, keeping CXX" >&6; }
21703  fi
21704
21705
21706  COMPILER=$CXX
21707  COMPILER_NAME=$COMPILER_NAME
21708
21709  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21710    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21711    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21712    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21713    if test $? -ne 0; then
21714      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21715
21716      { $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
21717$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21718      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21719$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21720      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21721    else
21722      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21723      COMPILER_VENDOR="Sun Studio"
21724    fi
21725  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21726    # First line typically looks something like:
21727    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21728    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21729    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21730    COMPILER_VENDOR="Microsoft CL.EXE"
21731    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21732    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21733      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21734        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21735      fi
21736    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21737      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21738        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21739      fi
21740    fi
21741  else
21742    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21743    # Check that this is likely to be GCC.
21744    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21745    if test $? -ne 0; then
21746      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21747$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21748      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21749$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21750      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21751    fi
21752
21753    # First line typically looks something like:
21754    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21755    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21756    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21757  fi
21758  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21759  CXX_VERSION="$COMPILER_VERSION"
21760  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21761  CXX_VENDOR="$COMPILER_VENDOR"
21762
21763  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21764$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21765
21766
21767  # Now that we have resolved CXX ourself, let autoconf have its go at it
21768  ac_ext=cpp
21769ac_cpp='$CXXCPP $CPPFLAGS'
21770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21773if test -z "$CXX"; then
21774  if test -n "$CCC"; then
21775    CXX=$CCC
21776  else
21777    if test -n "$ac_tool_prefix"; then
21778  for ac_prog in $CXX
21779  do
21780    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21783$as_echo_n "checking for $ac_word... " >&6; }
21784if ${ac_cv_prog_CXX+:} false; then :
21785  $as_echo_n "(cached) " >&6
21786else
21787  if test -n "$CXX"; then
21788  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21789else
21790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21791for as_dir in $PATH
21792do
21793  IFS=$as_save_IFS
21794  test -z "$as_dir" && as_dir=.
21795    for ac_exec_ext in '' $ac_executable_extensions; do
21796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21797    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21799    break 2
21800  fi
21801done
21802  done
21803IFS=$as_save_IFS
21804
21805fi
21806fi
21807CXX=$ac_cv_prog_CXX
21808if test -n "$CXX"; then
21809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21810$as_echo "$CXX" >&6; }
21811else
21812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21813$as_echo "no" >&6; }
21814fi
21815
21816
21817    test -n "$CXX" && break
21818  done
21819fi
21820if test -z "$CXX"; then
21821  ac_ct_CXX=$CXX
21822  for ac_prog in $CXX
21823do
21824  # Extract the first word of "$ac_prog", so it can be a program name with args.
21825set dummy $ac_prog; ac_word=$2
21826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21827$as_echo_n "checking for $ac_word... " >&6; }
21828if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21829  $as_echo_n "(cached) " >&6
21830else
21831  if test -n "$ac_ct_CXX"; then
21832  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21833else
21834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21835for as_dir in $PATH
21836do
21837  IFS=$as_save_IFS
21838  test -z "$as_dir" && as_dir=.
21839    for ac_exec_ext in '' $ac_executable_extensions; do
21840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21841    ac_cv_prog_ac_ct_CXX="$ac_prog"
21842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21843    break 2
21844  fi
21845done
21846  done
21847IFS=$as_save_IFS
21848
21849fi
21850fi
21851ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21852if test -n "$ac_ct_CXX"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21854$as_echo "$ac_ct_CXX" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861  test -n "$ac_ct_CXX" && break
21862done
21863
21864  if test "x$ac_ct_CXX" = x; then
21865    CXX="g++"
21866  else
21867    case $cross_compiling:$ac_tool_warned in
21868yes:)
21869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21871ac_tool_warned=yes ;;
21872esac
21873    CXX=$ac_ct_CXX
21874  fi
21875fi
21876
21877  fi
21878fi
21879# Provide some information about the compiler.
21880$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21881set X $ac_compile
21882ac_compiler=$2
21883for ac_option in --version -v -V -qversion; do
21884  { { ac_try="$ac_compiler $ac_option >&5"
21885case "(($ac_try" in
21886  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21887  *) ac_try_echo=$ac_try;;
21888esac
21889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21890$as_echo "$ac_try_echo"; } >&5
21891  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21892  ac_status=$?
21893  if test -s conftest.err; then
21894    sed '10a\
21895... rest of stderr output deleted ...
21896         10q' conftest.err >conftest.er1
21897    cat conftest.er1 >&5
21898  fi
21899  rm -f conftest.er1 conftest.err
21900  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21901  test $ac_status = 0; }
21902done
21903
21904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21905$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21906if ${ac_cv_cxx_compiler_gnu+:} false; then :
21907  $as_echo_n "(cached) " >&6
21908else
21909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21910/* end confdefs.h.  */
21911
21912int
21913main ()
21914{
21915#ifndef __GNUC__
21916       choke me
21917#endif
21918
21919  ;
21920  return 0;
21921}
21922_ACEOF
21923if ac_fn_cxx_try_compile "$LINENO"; then :
21924  ac_compiler_gnu=yes
21925else
21926  ac_compiler_gnu=no
21927fi
21928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21929ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21930
21931fi
21932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21933$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21934if test $ac_compiler_gnu = yes; then
21935  GXX=yes
21936else
21937  GXX=
21938fi
21939ac_test_CXXFLAGS=${CXXFLAGS+set}
21940ac_save_CXXFLAGS=$CXXFLAGS
21941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21942$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21943if ${ac_cv_prog_cxx_g+:} false; then :
21944  $as_echo_n "(cached) " >&6
21945else
21946  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21947   ac_cxx_werror_flag=yes
21948   ac_cv_prog_cxx_g=no
21949   CXXFLAGS="-g"
21950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21951/* end confdefs.h.  */
21952
21953int
21954main ()
21955{
21956
21957  ;
21958  return 0;
21959}
21960_ACEOF
21961if ac_fn_cxx_try_compile "$LINENO"; then :
21962  ac_cv_prog_cxx_g=yes
21963else
21964  CXXFLAGS=""
21965      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21966/* end confdefs.h.  */
21967
21968int
21969main ()
21970{
21971
21972  ;
21973  return 0;
21974}
21975_ACEOF
21976if ac_fn_cxx_try_compile "$LINENO"; then :
21977
21978else
21979  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21980	 CXXFLAGS="-g"
21981	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21982/* end confdefs.h.  */
21983
21984int
21985main ()
21986{
21987
21988  ;
21989  return 0;
21990}
21991_ACEOF
21992if ac_fn_cxx_try_compile "$LINENO"; then :
21993  ac_cv_prog_cxx_g=yes
21994fi
21995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21996fi
21997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21998fi
21999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22000   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22001fi
22002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22003$as_echo "$ac_cv_prog_cxx_g" >&6; }
22004if test "$ac_test_CXXFLAGS" = set; then
22005  CXXFLAGS=$ac_save_CXXFLAGS
22006elif test $ac_cv_prog_cxx_g = yes; then
22007  if test "$GXX" = yes; then
22008    CXXFLAGS="-g -O2"
22009  else
22010    CXXFLAGS="-g"
22011  fi
22012else
22013  if test "$GXX" = yes; then
22014    CXXFLAGS="-O2"
22015  else
22016    CXXFLAGS=
22017  fi
22018fi
22019ac_ext=cpp
22020ac_cpp='$CXXCPP $CPPFLAGS'
22021ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22022ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22023ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22024
22025
22026  ### Locate other tools
22027
22028  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22029    ac_ext=m
22030ac_cpp='$OBJCPP $CPPFLAGS'
22031ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22032ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22033ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22034if test -n "$ac_tool_prefix"; then
22035  for ac_prog in gcc objcc objc cc CC
22036  do
22037    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22040$as_echo_n "checking for $ac_word... " >&6; }
22041if ${ac_cv_prog_OBJC+:} false; then :
22042  $as_echo_n "(cached) " >&6
22043else
22044  if test -n "$OBJC"; then
22045  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22046else
22047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22048for as_dir in $PATH
22049do
22050  IFS=$as_save_IFS
22051  test -z "$as_dir" && as_dir=.
22052    for ac_exec_ext in '' $ac_executable_extensions; do
22053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22054    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22056    break 2
22057  fi
22058done
22059  done
22060IFS=$as_save_IFS
22061
22062fi
22063fi
22064OBJC=$ac_cv_prog_OBJC
22065if test -n "$OBJC"; then
22066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22067$as_echo "$OBJC" >&6; }
22068else
22069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22070$as_echo "no" >&6; }
22071fi
22072
22073
22074    test -n "$OBJC" && break
22075  done
22076fi
22077if test -z "$OBJC"; then
22078  ac_ct_OBJC=$OBJC
22079  for ac_prog in gcc objcc objc cc CC
22080do
22081  # Extract the first word of "$ac_prog", so it can be a program name with args.
22082set dummy $ac_prog; ac_word=$2
22083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22084$as_echo_n "checking for $ac_word... " >&6; }
22085if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22086  $as_echo_n "(cached) " >&6
22087else
22088  if test -n "$ac_ct_OBJC"; then
22089  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22090else
22091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22092for as_dir in $PATH
22093do
22094  IFS=$as_save_IFS
22095  test -z "$as_dir" && as_dir=.
22096    for ac_exec_ext in '' $ac_executable_extensions; do
22097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22098    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22100    break 2
22101  fi
22102done
22103  done
22104IFS=$as_save_IFS
22105
22106fi
22107fi
22108ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22109if test -n "$ac_ct_OBJC"; then
22110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22111$as_echo "$ac_ct_OBJC" >&6; }
22112else
22113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22114$as_echo "no" >&6; }
22115fi
22116
22117
22118  test -n "$ac_ct_OBJC" && break
22119done
22120
22121  if test "x$ac_ct_OBJC" = x; then
22122    OBJC="gcc"
22123  else
22124    case $cross_compiling:$ac_tool_warned in
22125yes:)
22126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22128ac_tool_warned=yes ;;
22129esac
22130    OBJC=$ac_ct_OBJC
22131  fi
22132fi
22133
22134# Provide some information about the compiler.
22135$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22136set X $ac_compile
22137ac_compiler=$2
22138for ac_option in --version -v -V -qversion; do
22139  { { ac_try="$ac_compiler $ac_option >&5"
22140case "(($ac_try" in
22141  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22142  *) ac_try_echo=$ac_try;;
22143esac
22144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22145$as_echo "$ac_try_echo"; } >&5
22146  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22147  ac_status=$?
22148  if test -s conftest.err; then
22149    sed '10a\
22150... rest of stderr output deleted ...
22151         10q' conftest.err >conftest.er1
22152    cat conftest.er1 >&5
22153  fi
22154  rm -f conftest.er1 conftest.err
22155  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22156  test $ac_status = 0; }
22157done
22158
22159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22160$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22161if ${ac_cv_objc_compiler_gnu+:} false; then :
22162  $as_echo_n "(cached) " >&6
22163else
22164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22165/* end confdefs.h.  */
22166
22167int
22168main ()
22169{
22170#ifndef __GNUC__
22171       choke me
22172#endif
22173
22174  ;
22175  return 0;
22176}
22177_ACEOF
22178if ac_fn_objc_try_compile "$LINENO"; then :
22179  ac_compiler_gnu=yes
22180else
22181  ac_compiler_gnu=no
22182fi
22183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22184ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22185
22186fi
22187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22188$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22189if test $ac_compiler_gnu = yes; then
22190  GOBJC=yes
22191else
22192  GOBJC=
22193fi
22194ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22195ac_save_OBJCFLAGS=$OBJCFLAGS
22196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22197$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22198if ${ac_cv_prog_objc_g+:} false; then :
22199  $as_echo_n "(cached) " >&6
22200else
22201  ac_save_objc_werror_flag=$ac_objc_werror_flag
22202   ac_objc_werror_flag=yes
22203   ac_cv_prog_objc_g=no
22204   OBJCFLAGS="-g"
22205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22206/* end confdefs.h.  */
22207
22208int
22209main ()
22210{
22211
22212  ;
22213  return 0;
22214}
22215_ACEOF
22216if ac_fn_objc_try_compile "$LINENO"; then :
22217  ac_cv_prog_objc_g=yes
22218else
22219  OBJCFLAGS=""
22220      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22221/* end confdefs.h.  */
22222
22223int
22224main ()
22225{
22226
22227  ;
22228  return 0;
22229}
22230_ACEOF
22231if ac_fn_objc_try_compile "$LINENO"; then :
22232
22233else
22234  ac_objc_werror_flag=$ac_save_objc_werror_flag
22235	 OBJCFLAGS="-g"
22236	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22237/* end confdefs.h.  */
22238
22239int
22240main ()
22241{
22242
22243  ;
22244  return 0;
22245}
22246_ACEOF
22247if ac_fn_objc_try_compile "$LINENO"; then :
22248  ac_cv_prog_objc_g=yes
22249fi
22250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22251fi
22252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22253fi
22254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22255   ac_objc_werror_flag=$ac_save_objc_werror_flag
22256fi
22257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22258$as_echo "$ac_cv_prog_objc_g" >&6; }
22259if test "$ac_test_OBJCFLAGS" = set; then
22260  OBJCFLAGS=$ac_save_OBJCFLAGS
22261elif test $ac_cv_prog_objc_g = yes; then
22262  if test "$GOBJC" = yes; then
22263    OBJCFLAGS="-g -O2"
22264  else
22265    OBJCFLAGS="-g"
22266  fi
22267else
22268  if test "$GOBJC" = yes; then
22269    OBJCFLAGS="-O2"
22270  else
22271    OBJCFLAGS=
22272  fi
22273fi
22274ac_ext=cpp
22275ac_cpp='$CXXCPP $CPPFLAGS'
22276ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22277ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22278ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22279
22280
22281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22282
22283  # First separate the path from the arguments. This will split at the first
22284  # space.
22285  complete="$OBJC"
22286  path="${complete%% *}"
22287  tmp="$complete EOL"
22288  arguments="${tmp#* }"
22289
22290  # Input might be given as Windows format, start by converting to
22291  # unix format.
22292  new_path=`$CYGPATH -u "$path"`
22293
22294  # Now try to locate executable using which
22295  new_path=`$WHICH "$new_path" 2> /dev/null`
22296  # bat and cmd files are not always considered executable in cygwin causing which
22297  # to not find them
22298  if test "x$new_path" = x \
22299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22301    new_path=`$CYGPATH -u "$path"`
22302  fi
22303  if test "x$new_path" = x; then
22304    # Oops. Which didn't find the executable.
22305    # The splitting of arguments from the executable at a space might have been incorrect,
22306    # since paths with space are more likely in Windows. Give it another try with the whole
22307    # argument.
22308    path="$complete"
22309    arguments="EOL"
22310    new_path=`$CYGPATH -u "$path"`
22311    new_path=`$WHICH "$new_path" 2> /dev/null`
22312    # bat and cmd files are not always considered executable in cygwin causing which
22313    # to not find them
22314    if test "x$new_path" = x \
22315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22317      new_path=`$CYGPATH -u "$path"`
22318    fi
22319    if test "x$new_path" = x; then
22320      # It's still not found. Now this is an unrecoverable error.
22321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22322$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22323      has_space=`$ECHO "$complete" | $GREP " "`
22324      if test "x$has_space" != x; then
22325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22327      fi
22328      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22329    fi
22330  fi
22331
22332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22335  # "foo.exe" is OK but "foo" is an error.
22336  #
22337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22338  # It is also a way to make sure we got the proper file name for the real test later on.
22339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22340  if test "x$test_shortpath" = x; then
22341    # Short path failed, file does not exist as specified.
22342    # Try adding .exe or .cmd
22343    if test -f "${new_path}.exe"; then
22344      input_to_shortpath="${new_path}.exe"
22345    elif test -f "${new_path}.cmd"; then
22346      input_to_shortpath="${new_path}.cmd"
22347    else
22348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22349$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22352      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22353    fi
22354  else
22355    input_to_shortpath="$new_path"
22356  fi
22357
22358  # Call helper function which possibly converts this using DOS-style short mode.
22359  # If so, the updated path is stored in $new_path.
22360  new_path="$input_to_shortpath"
22361
22362  input_path="$input_to_shortpath"
22363  # Check if we need to convert this using DOS-style short mode. If the path
22364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22365  # take no chances and rewrite it.
22366  # Note: m4 eats our [], so we need to use [ and ] instead.
22367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22368  if test "x$has_forbidden_chars" != x; then
22369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22373      # Going to short mode and back again did indeed matter. Since short mode is
22374      # case insensitive, let's make it lowercase to improve readability.
22375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22376      # Now convert it back to Unix-stile (cygpath)
22377      input_path=`$CYGPATH -u "$shortmode_path"`
22378      new_path="$input_path"
22379    fi
22380  fi
22381
22382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22383  if test "x$test_cygdrive_prefix" = x; then
22384    # As a simple fix, exclude /usr/bin since it's not a real path.
22385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22387      # a path prefixed by /cygdrive for fixpath to work.
22388      new_path="$CYGWIN_ROOT_PATH$input_path"
22389    fi
22390  fi
22391
22392  # remove trailing .exe if any
22393  new_path="${new_path/%.exe/}"
22394
22395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22396
22397  # First separate the path from the arguments. This will split at the first
22398  # space.
22399  complete="$OBJC"
22400  path="${complete%% *}"
22401  tmp="$complete EOL"
22402  arguments="${tmp#* }"
22403
22404  # Input might be given as Windows format, start by converting to
22405  # unix format.
22406  new_path="$path"
22407
22408  windows_path="$new_path"
22409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22410    unix_path=`$CYGPATH -u "$windows_path"`
22411    new_path="$unix_path"
22412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22414    new_path="$unix_path"
22415  fi
22416
22417
22418  # Now try to locate executable using which
22419  new_path=`$WHICH "$new_path" 2> /dev/null`
22420
22421  if test "x$new_path" = x; then
22422    # Oops. Which didn't find the executable.
22423    # The splitting of arguments from the executable at a space might have been incorrect,
22424    # since paths with space are more likely in Windows. Give it another try with the whole
22425    # argument.
22426    path="$complete"
22427    arguments="EOL"
22428    new_path="$path"
22429
22430  windows_path="$new_path"
22431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22432    unix_path=`$CYGPATH -u "$windows_path"`
22433    new_path="$unix_path"
22434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22436    new_path="$unix_path"
22437  fi
22438
22439
22440    new_path=`$WHICH "$new_path" 2> /dev/null`
22441
22442    if test "x$new_path" = x; then
22443      # It's still not found. Now this is an unrecoverable error.
22444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22445$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22446      has_space=`$ECHO "$complete" | $GREP " "`
22447      if test "x$has_space" != x; then
22448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22450      fi
22451      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22452    fi
22453  fi
22454
22455  # Now new_path has a complete unix path to the binary
22456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22457    # Keep paths in /bin as-is, but remove trailing .exe if any
22458    new_path="${new_path/%.exe/}"
22459    # Do not save /bin paths to all_fixpath_prefixes!
22460  else
22461    # Not in mixed or Windows style, start by that.
22462    new_path=`cmd //c echo $new_path`
22463
22464  input_path="$new_path"
22465  # Check if we need to convert this using DOS-style short mode. If the path
22466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22467  # take no chances and rewrite it.
22468  # Note: m4 eats our [], so we need to use [ and ] instead.
22469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22470  if test "x$has_forbidden_chars" != x; then
22471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22473  fi
22474
22475    # Output is in $new_path
22476
22477  windows_path="$new_path"
22478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22479    unix_path=`$CYGPATH -u "$windows_path"`
22480    new_path="$unix_path"
22481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22483    new_path="$unix_path"
22484  fi
22485
22486    # remove trailing .exe if any
22487    new_path="${new_path/%.exe/}"
22488
22489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22491  fi
22492
22493  else
22494    # We're on a posix platform. Hooray! :)
22495    # First separate the path from the arguments. This will split at the first
22496    # space.
22497    complete="$OBJC"
22498    path="${complete%% *}"
22499    tmp="$complete EOL"
22500    arguments="${tmp#* }"
22501
22502    # Cannot rely on the command "which" here since it doesn't always work.
22503    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22504    if test -z "$is_absolute_path"; then
22505      # Path to executable is not absolute. Find it.
22506      IFS_save="$IFS"
22507      IFS=:
22508      for p in $PATH; do
22509        if test -f "$p/$path" && test -x "$p/$path"; then
22510          new_path="$p/$path"
22511          break
22512        fi
22513      done
22514      IFS="$IFS_save"
22515    else
22516      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22517$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22518      new_path="$path"
22519    fi
22520
22521    if test "x$new_path" = x; then
22522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22523$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22524      has_space=`$ECHO "$complete" | $GREP " "`
22525      if test "x$has_space" != x; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22528      fi
22529      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22530    fi
22531  fi
22532
22533  # Now join together the path and the arguments once again
22534  if test "x$arguments" != xEOL; then
22535    new_complete="$new_path ${arguments% *}"
22536  else
22537    new_complete="$new_path"
22538  fi
22539
22540  if test "x$complete" != "x$new_complete"; then
22541    OBJC="$new_complete"
22542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22543$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22544  fi
22545
22546  else
22547    OBJC=
22548  fi
22549
22550  # Restore the flags to the user specified values.
22551  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22552  CFLAGS="$ORG_CFLAGS"
22553  CXXFLAGS="$ORG_CXXFLAGS"
22554  OBJCFLAGS="$ORG_OBJCFLAGS"
22555
22556  LD="$CC"
22557  LDEXE="$CC"
22558  LDCXX="$CXX"
22559  LDEXECXX="$CXX"
22560
22561  # LDEXE is the linker to use, when creating executables.
22562
22563  # Linking C++ libraries.
22564
22565  # Linking C++ executables.
22566
22567
22568  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22569    if test -n "$ac_tool_prefix"; then
22570  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22571set dummy ${ac_tool_prefix}ar; ac_word=$2
22572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22573$as_echo_n "checking for $ac_word... " >&6; }
22574if ${ac_cv_prog_AR+:} false; then :
22575  $as_echo_n "(cached) " >&6
22576else
22577  if test -n "$AR"; then
22578  ac_cv_prog_AR="$AR" # Let the user override the test.
22579else
22580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22581for as_dir in $PATH
22582do
22583  IFS=$as_save_IFS
22584  test -z "$as_dir" && as_dir=.
22585    for ac_exec_ext in '' $ac_executable_extensions; do
22586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22587    ac_cv_prog_AR="${ac_tool_prefix}ar"
22588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22589    break 2
22590  fi
22591done
22592  done
22593IFS=$as_save_IFS
22594
22595fi
22596fi
22597AR=$ac_cv_prog_AR
22598if test -n "$AR"; then
22599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22600$as_echo "$AR" >&6; }
22601else
22602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22603$as_echo "no" >&6; }
22604fi
22605
22606
22607fi
22608if test -z "$ac_cv_prog_AR"; then
22609  ac_ct_AR=$AR
22610  # Extract the first word of "ar", so it can be a program name with args.
22611set dummy ar; ac_word=$2
22612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22613$as_echo_n "checking for $ac_word... " >&6; }
22614if ${ac_cv_prog_ac_ct_AR+:} false; then :
22615  $as_echo_n "(cached) " >&6
22616else
22617  if test -n "$ac_ct_AR"; then
22618  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22619else
22620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22621for as_dir in $PATH
22622do
22623  IFS=$as_save_IFS
22624  test -z "$as_dir" && as_dir=.
22625    for ac_exec_ext in '' $ac_executable_extensions; do
22626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22627    ac_cv_prog_ac_ct_AR="ar"
22628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22629    break 2
22630  fi
22631done
22632  done
22633IFS=$as_save_IFS
22634
22635fi
22636fi
22637ac_ct_AR=$ac_cv_prog_ac_ct_AR
22638if test -n "$ac_ct_AR"; then
22639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22640$as_echo "$ac_ct_AR" >&6; }
22641else
22642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22643$as_echo "no" >&6; }
22644fi
22645
22646  if test "x$ac_ct_AR" = x; then
22647    AR=""
22648  else
22649    case $cross_compiling:$ac_tool_warned in
22650yes:)
22651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22653ac_tool_warned=yes ;;
22654esac
22655    AR=$ac_ct_AR
22656  fi
22657else
22658  AR="$ac_cv_prog_AR"
22659fi
22660
22661
22662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22663
22664  # First separate the path from the arguments. This will split at the first
22665  # space.
22666  complete="$AR"
22667  path="${complete%% *}"
22668  tmp="$complete EOL"
22669  arguments="${tmp#* }"
22670
22671  # Input might be given as Windows format, start by converting to
22672  # unix format.
22673  new_path=`$CYGPATH -u "$path"`
22674
22675  # Now try to locate executable using which
22676  new_path=`$WHICH "$new_path" 2> /dev/null`
22677  # bat and cmd files are not always considered executable in cygwin causing which
22678  # to not find them
22679  if test "x$new_path" = x \
22680      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22681      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22682    new_path=`$CYGPATH -u "$path"`
22683  fi
22684  if test "x$new_path" = x; then
22685    # Oops. Which didn't find the executable.
22686    # The splitting of arguments from the executable at a space might have been incorrect,
22687    # since paths with space are more likely in Windows. Give it another try with the whole
22688    # argument.
22689    path="$complete"
22690    arguments="EOL"
22691    new_path=`$CYGPATH -u "$path"`
22692    new_path=`$WHICH "$new_path" 2> /dev/null`
22693    # bat and cmd files are not always considered executable in cygwin causing which
22694    # to not find them
22695    if test "x$new_path" = x \
22696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22698      new_path=`$CYGPATH -u "$path"`
22699    fi
22700    if test "x$new_path" = x; then
22701      # It's still not found. Now this is an unrecoverable error.
22702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22703$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22704      has_space=`$ECHO "$complete" | $GREP " "`
22705      if test "x$has_space" != x; then
22706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22708      fi
22709      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22710    fi
22711  fi
22712
22713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22716  # "foo.exe" is OK but "foo" is an error.
22717  #
22718  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22719  # It is also a way to make sure we got the proper file name for the real test later on.
22720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22721  if test "x$test_shortpath" = x; then
22722    # Short path failed, file does not exist as specified.
22723    # Try adding .exe or .cmd
22724    if test -f "${new_path}.exe"; then
22725      input_to_shortpath="${new_path}.exe"
22726    elif test -f "${new_path}.cmd"; then
22727      input_to_shortpath="${new_path}.cmd"
22728    else
22729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22730$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22731      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22732$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22733      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22734    fi
22735  else
22736    input_to_shortpath="$new_path"
22737  fi
22738
22739  # Call helper function which possibly converts this using DOS-style short mode.
22740  # If so, the updated path is stored in $new_path.
22741  new_path="$input_to_shortpath"
22742
22743  input_path="$input_to_shortpath"
22744  # Check if we need to convert this using DOS-style short mode. If the path
22745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22746  # take no chances and rewrite it.
22747  # Note: m4 eats our [], so we need to use [ and ] instead.
22748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22749  if test "x$has_forbidden_chars" != x; then
22750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22754      # Going to short mode and back again did indeed matter. Since short mode is
22755      # case insensitive, let's make it lowercase to improve readability.
22756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22757      # Now convert it back to Unix-stile (cygpath)
22758      input_path=`$CYGPATH -u "$shortmode_path"`
22759      new_path="$input_path"
22760    fi
22761  fi
22762
22763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22764  if test "x$test_cygdrive_prefix" = x; then
22765    # As a simple fix, exclude /usr/bin since it's not a real path.
22766    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22768      # a path prefixed by /cygdrive for fixpath to work.
22769      new_path="$CYGWIN_ROOT_PATH$input_path"
22770    fi
22771  fi
22772
22773  # remove trailing .exe if any
22774  new_path="${new_path/%.exe/}"
22775
22776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22777
22778  # First separate the path from the arguments. This will split at the first
22779  # space.
22780  complete="$AR"
22781  path="${complete%% *}"
22782  tmp="$complete EOL"
22783  arguments="${tmp#* }"
22784
22785  # Input might be given as Windows format, start by converting to
22786  # unix format.
22787  new_path="$path"
22788
22789  windows_path="$new_path"
22790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22791    unix_path=`$CYGPATH -u "$windows_path"`
22792    new_path="$unix_path"
22793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22795    new_path="$unix_path"
22796  fi
22797
22798
22799  # Now try to locate executable using which
22800  new_path=`$WHICH "$new_path" 2> /dev/null`
22801
22802  if test "x$new_path" = x; then
22803    # Oops. Which didn't find the executable.
22804    # The splitting of arguments from the executable at a space might have been incorrect,
22805    # since paths with space are more likely in Windows. Give it another try with the whole
22806    # argument.
22807    path="$complete"
22808    arguments="EOL"
22809    new_path="$path"
22810
22811  windows_path="$new_path"
22812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22813    unix_path=`$CYGPATH -u "$windows_path"`
22814    new_path="$unix_path"
22815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22817    new_path="$unix_path"
22818  fi
22819
22820
22821    new_path=`$WHICH "$new_path" 2> /dev/null`
22822
22823    if test "x$new_path" = x; then
22824      # It's still not found. Now this is an unrecoverable error.
22825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22826$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22827      has_space=`$ECHO "$complete" | $GREP " "`
22828      if test "x$has_space" != x; then
22829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22831      fi
22832      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22833    fi
22834  fi
22835
22836  # Now new_path has a complete unix path to the binary
22837  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22838    # Keep paths in /bin as-is, but remove trailing .exe if any
22839    new_path="${new_path/%.exe/}"
22840    # Do not save /bin paths to all_fixpath_prefixes!
22841  else
22842    # Not in mixed or Windows style, start by that.
22843    new_path=`cmd //c echo $new_path`
22844
22845  input_path="$new_path"
22846  # Check if we need to convert this using DOS-style short mode. If the path
22847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22848  # take no chances and rewrite it.
22849  # Note: m4 eats our [], so we need to use [ and ] instead.
22850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22851  if test "x$has_forbidden_chars" != x; then
22852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22854  fi
22855
22856    # Output is in $new_path
22857
22858  windows_path="$new_path"
22859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22860    unix_path=`$CYGPATH -u "$windows_path"`
22861    new_path="$unix_path"
22862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22864    new_path="$unix_path"
22865  fi
22866
22867    # remove trailing .exe if any
22868    new_path="${new_path/%.exe/}"
22869
22870    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22871    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22872  fi
22873
22874  else
22875    # We're on a posix platform. Hooray! :)
22876    # First separate the path from the arguments. This will split at the first
22877    # space.
22878    complete="$AR"
22879    path="${complete%% *}"
22880    tmp="$complete EOL"
22881    arguments="${tmp#* }"
22882
22883    # Cannot rely on the command "which" here since it doesn't always work.
22884    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22885    if test -z "$is_absolute_path"; then
22886      # Path to executable is not absolute. Find it.
22887      IFS_save="$IFS"
22888      IFS=:
22889      for p in $PATH; do
22890        if test -f "$p/$path" && test -x "$p/$path"; then
22891          new_path="$p/$path"
22892          break
22893        fi
22894      done
22895      IFS="$IFS_save"
22896    else
22897      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22898$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22899      new_path="$path"
22900    fi
22901
22902    if test "x$new_path" = x; then
22903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22904$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22905      has_space=`$ECHO "$complete" | $GREP " "`
22906      if test "x$has_space" != x; then
22907        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22909      fi
22910      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22911    fi
22912  fi
22913
22914  # Now join together the path and the arguments once again
22915  if test "x$arguments" != xEOL; then
22916    new_complete="$new_path ${arguments% *}"
22917  else
22918    new_complete="$new_path"
22919  fi
22920
22921  if test "x$complete" != "x$new_complete"; then
22922    AR="$new_complete"
22923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22924$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22925  fi
22926
22927  fi
22928  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22929    ARFLAGS="-r"
22930  else
22931    ARFLAGS=""
22932  fi
22933
22934
22935  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22936  HOTSPOT_CXX="$CXX"
22937  HOTSPOT_LD="$LD"
22938
22939
22940
22941  COMPILER_NAME=gcc
22942  COMPILER_TYPE=CC
22943  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22944
22945    # For now, assume that we are always compiling using cl.exe.
22946    CC_OUT_OPTION=-Fo
22947    EXE_OUT_OPTION=-out:
22948    LD_OUT_OPTION=-out:
22949    AR_OUT_OPTION=-out:
22950    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22951    # program for something completely different.
22952    # Extract the first word of "link", so it can be a program name with args.
22953set dummy link; ac_word=$2
22954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22955$as_echo_n "checking for $ac_word... " >&6; }
22956if ${ac_cv_prog_WINLD+:} false; then :
22957  $as_echo_n "(cached) " >&6
22958else
22959  if test -n "$WINLD"; then
22960  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22961else
22962  ac_prog_rejected=no
22963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22964for as_dir in $PATH
22965do
22966  IFS=$as_save_IFS
22967  test -z "$as_dir" && as_dir=.
22968    for ac_exec_ext in '' $ac_executable_extensions; do
22969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22970    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22971       ac_prog_rejected=yes
22972       continue
22973     fi
22974    ac_cv_prog_WINLD="link"
22975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22976    break 2
22977  fi
22978done
22979  done
22980IFS=$as_save_IFS
22981
22982if test $ac_prog_rejected = yes; then
22983  # We found a bogon in the path, so make sure we never use it.
22984  set dummy $ac_cv_prog_WINLD
22985  shift
22986  if test $# != 0; then
22987    # We chose a different compiler from the bogus one.
22988    # However, it has the same basename, so the bogon will be chosen
22989    # first if we set WINLD to just the basename; use the full file name.
22990    shift
22991    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22992  fi
22993fi
22994fi
22995fi
22996WINLD=$ac_cv_prog_WINLD
22997if test -n "$WINLD"; then
22998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22999$as_echo "$WINLD" >&6; }
23000else
23001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23002$as_echo "no" >&6; }
23003fi
23004
23005
23006    # Since we must ignore the first found link, WINLD will contain
23007    # the full path to the link.exe program.
23008
23009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23010
23011  # First separate the path from the arguments. This will split at the first
23012  # space.
23013  complete="$WINLD"
23014  path="${complete%% *}"
23015  tmp="$complete EOL"
23016  arguments="${tmp#* }"
23017
23018  # Input might be given as Windows format, start by converting to
23019  # unix format.
23020  new_path=`$CYGPATH -u "$path"`
23021
23022  # Now try to locate executable using which
23023  new_path=`$WHICH "$new_path" 2> /dev/null`
23024  # bat and cmd files are not always considered executable in cygwin causing which
23025  # to not find them
23026  if test "x$new_path" = x \
23027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23029    new_path=`$CYGPATH -u "$path"`
23030  fi
23031  if test "x$new_path" = x; then
23032    # Oops. Which didn't find the executable.
23033    # The splitting of arguments from the executable at a space might have been incorrect,
23034    # since paths with space are more likely in Windows. Give it another try with the whole
23035    # argument.
23036    path="$complete"
23037    arguments="EOL"
23038    new_path=`$CYGPATH -u "$path"`
23039    new_path=`$WHICH "$new_path" 2> /dev/null`
23040    # bat and cmd files are not always considered executable in cygwin causing which
23041    # to not find them
23042    if test "x$new_path" = x \
23043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23045      new_path=`$CYGPATH -u "$path"`
23046    fi
23047    if test "x$new_path" = x; then
23048      # It's still not found. Now this is an unrecoverable error.
23049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23050$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23051      has_space=`$ECHO "$complete" | $GREP " "`
23052      if test "x$has_space" != x; then
23053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23055      fi
23056      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23057    fi
23058  fi
23059
23060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23063  # "foo.exe" is OK but "foo" is an error.
23064  #
23065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23066  # It is also a way to make sure we got the proper file name for the real test later on.
23067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23068  if test "x$test_shortpath" = x; then
23069    # Short path failed, file does not exist as specified.
23070    # Try adding .exe or .cmd
23071    if test -f "${new_path}.exe"; then
23072      input_to_shortpath="${new_path}.exe"
23073    elif test -f "${new_path}.cmd"; then
23074      input_to_shortpath="${new_path}.cmd"
23075    else
23076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23077$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23080      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23081    fi
23082  else
23083    input_to_shortpath="$new_path"
23084  fi
23085
23086  # Call helper function which possibly converts this using DOS-style short mode.
23087  # If so, the updated path is stored in $new_path.
23088  new_path="$input_to_shortpath"
23089
23090  input_path="$input_to_shortpath"
23091  # Check if we need to convert this using DOS-style short mode. If the path
23092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23093  # take no chances and rewrite it.
23094  # Note: m4 eats our [], so we need to use [ and ] instead.
23095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23096  if test "x$has_forbidden_chars" != x; then
23097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23101      # Going to short mode and back again did indeed matter. Since short mode is
23102      # case insensitive, let's make it lowercase to improve readability.
23103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23104      # Now convert it back to Unix-stile (cygpath)
23105      input_path=`$CYGPATH -u "$shortmode_path"`
23106      new_path="$input_path"
23107    fi
23108  fi
23109
23110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23111  if test "x$test_cygdrive_prefix" = x; then
23112    # As a simple fix, exclude /usr/bin since it's not a real path.
23113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23115      # a path prefixed by /cygdrive for fixpath to work.
23116      new_path="$CYGWIN_ROOT_PATH$input_path"
23117    fi
23118  fi
23119
23120  # remove trailing .exe if any
23121  new_path="${new_path/%.exe/}"
23122
23123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23124
23125  # First separate the path from the arguments. This will split at the first
23126  # space.
23127  complete="$WINLD"
23128  path="${complete%% *}"
23129  tmp="$complete EOL"
23130  arguments="${tmp#* }"
23131
23132  # Input might be given as Windows format, start by converting to
23133  # unix format.
23134  new_path="$path"
23135
23136  windows_path="$new_path"
23137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23138    unix_path=`$CYGPATH -u "$windows_path"`
23139    new_path="$unix_path"
23140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23142    new_path="$unix_path"
23143  fi
23144
23145
23146  # Now try to locate executable using which
23147  new_path=`$WHICH "$new_path" 2> /dev/null`
23148
23149  if test "x$new_path" = x; then
23150    # Oops. Which didn't find the executable.
23151    # The splitting of arguments from the executable at a space might have been incorrect,
23152    # since paths with space are more likely in Windows. Give it another try with the whole
23153    # argument.
23154    path="$complete"
23155    arguments="EOL"
23156    new_path="$path"
23157
23158  windows_path="$new_path"
23159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23160    unix_path=`$CYGPATH -u "$windows_path"`
23161    new_path="$unix_path"
23162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23164    new_path="$unix_path"
23165  fi
23166
23167
23168    new_path=`$WHICH "$new_path" 2> /dev/null`
23169
23170    if test "x$new_path" = x; then
23171      # It's still not found. Now this is an unrecoverable error.
23172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23173$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23174      has_space=`$ECHO "$complete" | $GREP " "`
23175      if test "x$has_space" != x; then
23176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23178      fi
23179      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23180    fi
23181  fi
23182
23183  # Now new_path has a complete unix path to the binary
23184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23185    # Keep paths in /bin as-is, but remove trailing .exe if any
23186    new_path="${new_path/%.exe/}"
23187    # Do not save /bin paths to all_fixpath_prefixes!
23188  else
23189    # Not in mixed or Windows style, start by that.
23190    new_path=`cmd //c echo $new_path`
23191
23192  input_path="$new_path"
23193  # Check if we need to convert this using DOS-style short mode. If the path
23194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23195  # take no chances and rewrite it.
23196  # Note: m4 eats our [], so we need to use [ and ] instead.
23197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23198  if test "x$has_forbidden_chars" != x; then
23199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23201  fi
23202
23203    # Output is in $new_path
23204
23205  windows_path="$new_path"
23206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23207    unix_path=`$CYGPATH -u "$windows_path"`
23208    new_path="$unix_path"
23209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23211    new_path="$unix_path"
23212  fi
23213
23214    # remove trailing .exe if any
23215    new_path="${new_path/%.exe/}"
23216
23217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23219  fi
23220
23221  else
23222    # We're on a posix platform. Hooray! :)
23223    # First separate the path from the arguments. This will split at the first
23224    # space.
23225    complete="$WINLD"
23226    path="${complete%% *}"
23227    tmp="$complete EOL"
23228    arguments="${tmp#* }"
23229
23230    # Cannot rely on the command "which" here since it doesn't always work.
23231    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23232    if test -z "$is_absolute_path"; then
23233      # Path to executable is not absolute. Find it.
23234      IFS_save="$IFS"
23235      IFS=:
23236      for p in $PATH; do
23237        if test -f "$p/$path" && test -x "$p/$path"; then
23238          new_path="$p/$path"
23239          break
23240        fi
23241      done
23242      IFS="$IFS_save"
23243    else
23244      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23245$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23246      new_path="$path"
23247    fi
23248
23249    if test "x$new_path" = x; then
23250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23251$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23252      has_space=`$ECHO "$complete" | $GREP " "`
23253      if test "x$has_space" != x; then
23254        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23256      fi
23257      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23258    fi
23259  fi
23260
23261  # Now join together the path and the arguments once again
23262  if test "x$arguments" != xEOL; then
23263    new_complete="$new_path ${arguments% *}"
23264  else
23265    new_complete="$new_path"
23266  fi
23267
23268  if test "x$complete" != "x$new_complete"; then
23269    WINLD="$new_complete"
23270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23271$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23272  fi
23273
23274    printf "Windows linker was found at $WINLD\n"
23275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23276$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23277    "$WINLD" --version > /dev/null
23278    if test $? -eq 0 ; then
23279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23280$as_echo "no" >&6; }
23281      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23282    else
23283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23284$as_echo "yes" >&6; }
23285    fi
23286    LD="$WINLD"
23287    LDEXE="$WINLD"
23288    LDCXX="$WINLD"
23289    LDEXECXX="$WINLD"
23290
23291    # Extract the first word of "mt", so it can be a program name with args.
23292set dummy mt; ac_word=$2
23293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23294$as_echo_n "checking for $ac_word... " >&6; }
23295if ${ac_cv_prog_MT+:} false; then :
23296  $as_echo_n "(cached) " >&6
23297else
23298  if test -n "$MT"; then
23299  ac_cv_prog_MT="$MT" # Let the user override the test.
23300else
23301  ac_prog_rejected=no
23302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23303for as_dir in $PATH
23304do
23305  IFS=$as_save_IFS
23306  test -z "$as_dir" && as_dir=.
23307    for ac_exec_ext in '' $ac_executable_extensions; do
23308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23309    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23310       ac_prog_rejected=yes
23311       continue
23312     fi
23313    ac_cv_prog_MT="mt"
23314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23315    break 2
23316  fi
23317done
23318  done
23319IFS=$as_save_IFS
23320
23321if test $ac_prog_rejected = yes; then
23322  # We found a bogon in the path, so make sure we never use it.
23323  set dummy $ac_cv_prog_MT
23324  shift
23325  if test $# != 0; then
23326    # We chose a different compiler from the bogus one.
23327    # However, it has the same basename, so the bogon will be chosen
23328    # first if we set MT to just the basename; use the full file name.
23329    shift
23330    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23331  fi
23332fi
23333fi
23334fi
23335MT=$ac_cv_prog_MT
23336if test -n "$MT"; then
23337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23338$as_echo "$MT" >&6; }
23339else
23340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23341$as_echo "no" >&6; }
23342fi
23343
23344
23345
23346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23347
23348  # First separate the path from the arguments. This will split at the first
23349  # space.
23350  complete="$MT"
23351  path="${complete%% *}"
23352  tmp="$complete EOL"
23353  arguments="${tmp#* }"
23354
23355  # Input might be given as Windows format, start by converting to
23356  # unix format.
23357  new_path=`$CYGPATH -u "$path"`
23358
23359  # Now try to locate executable using which
23360  new_path=`$WHICH "$new_path" 2> /dev/null`
23361  # bat and cmd files are not always considered executable in cygwin causing which
23362  # to not find them
23363  if test "x$new_path" = x \
23364      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23365      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23366    new_path=`$CYGPATH -u "$path"`
23367  fi
23368  if test "x$new_path" = x; then
23369    # Oops. Which didn't find the executable.
23370    # The splitting of arguments from the executable at a space might have been incorrect,
23371    # since paths with space are more likely in Windows. Give it another try with the whole
23372    # argument.
23373    path="$complete"
23374    arguments="EOL"
23375    new_path=`$CYGPATH -u "$path"`
23376    new_path=`$WHICH "$new_path" 2> /dev/null`
23377    # bat and cmd files are not always considered executable in cygwin causing which
23378    # to not find them
23379    if test "x$new_path" = x \
23380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23382      new_path=`$CYGPATH -u "$path"`
23383    fi
23384    if test "x$new_path" = x; then
23385      # It's still not found. Now this is an unrecoverable error.
23386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23387$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23388      has_space=`$ECHO "$complete" | $GREP " "`
23389      if test "x$has_space" != x; then
23390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23392      fi
23393      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23394    fi
23395  fi
23396
23397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23400  # "foo.exe" is OK but "foo" is an error.
23401  #
23402  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23403  # It is also a way to make sure we got the proper file name for the real test later on.
23404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23405  if test "x$test_shortpath" = x; then
23406    # Short path failed, file does not exist as specified.
23407    # Try adding .exe or .cmd
23408    if test -f "${new_path}.exe"; then
23409      input_to_shortpath="${new_path}.exe"
23410    elif test -f "${new_path}.cmd"; then
23411      input_to_shortpath="${new_path}.cmd"
23412    else
23413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23414$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23415      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23416$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23417      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23418    fi
23419  else
23420    input_to_shortpath="$new_path"
23421  fi
23422
23423  # Call helper function which possibly converts this using DOS-style short mode.
23424  # If so, the updated path is stored in $new_path.
23425  new_path="$input_to_shortpath"
23426
23427  input_path="$input_to_shortpath"
23428  # Check if we need to convert this using DOS-style short mode. If the path
23429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23430  # take no chances and rewrite it.
23431  # Note: m4 eats our [], so we need to use [ and ] instead.
23432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23433  if test "x$has_forbidden_chars" != x; then
23434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23438      # Going to short mode and back again did indeed matter. Since short mode is
23439      # case insensitive, let's make it lowercase to improve readability.
23440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23441      # Now convert it back to Unix-stile (cygpath)
23442      input_path=`$CYGPATH -u "$shortmode_path"`
23443      new_path="$input_path"
23444    fi
23445  fi
23446
23447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23448  if test "x$test_cygdrive_prefix" = x; then
23449    # As a simple fix, exclude /usr/bin since it's not a real path.
23450    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23452      # a path prefixed by /cygdrive for fixpath to work.
23453      new_path="$CYGWIN_ROOT_PATH$input_path"
23454    fi
23455  fi
23456
23457  # remove trailing .exe if any
23458  new_path="${new_path/%.exe/}"
23459
23460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23461
23462  # First separate the path from the arguments. This will split at the first
23463  # space.
23464  complete="$MT"
23465  path="${complete%% *}"
23466  tmp="$complete EOL"
23467  arguments="${tmp#* }"
23468
23469  # Input might be given as Windows format, start by converting to
23470  # unix format.
23471  new_path="$path"
23472
23473  windows_path="$new_path"
23474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23475    unix_path=`$CYGPATH -u "$windows_path"`
23476    new_path="$unix_path"
23477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23479    new_path="$unix_path"
23480  fi
23481
23482
23483  # Now try to locate executable using which
23484  new_path=`$WHICH "$new_path" 2> /dev/null`
23485
23486  if test "x$new_path" = x; then
23487    # Oops. Which didn't find the executable.
23488    # The splitting of arguments from the executable at a space might have been incorrect,
23489    # since paths with space are more likely in Windows. Give it another try with the whole
23490    # argument.
23491    path="$complete"
23492    arguments="EOL"
23493    new_path="$path"
23494
23495  windows_path="$new_path"
23496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23497    unix_path=`$CYGPATH -u "$windows_path"`
23498    new_path="$unix_path"
23499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23501    new_path="$unix_path"
23502  fi
23503
23504
23505    new_path=`$WHICH "$new_path" 2> /dev/null`
23506
23507    if test "x$new_path" = x; then
23508      # It's still not found. Now this is an unrecoverable error.
23509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23510$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23511      has_space=`$ECHO "$complete" | $GREP " "`
23512      if test "x$has_space" != x; then
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23515      fi
23516      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23517    fi
23518  fi
23519
23520  # Now new_path has a complete unix path to the binary
23521  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23522    # Keep paths in /bin as-is, but remove trailing .exe if any
23523    new_path="${new_path/%.exe/}"
23524    # Do not save /bin paths to all_fixpath_prefixes!
23525  else
23526    # Not in mixed or Windows style, start by that.
23527    new_path=`cmd //c echo $new_path`
23528
23529  input_path="$new_path"
23530  # Check if we need to convert this using DOS-style short mode. If the path
23531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23532  # take no chances and rewrite it.
23533  # Note: m4 eats our [], so we need to use [ and ] instead.
23534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23535  if test "x$has_forbidden_chars" != x; then
23536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23538  fi
23539
23540    # Output is in $new_path
23541
23542  windows_path="$new_path"
23543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23544    unix_path=`$CYGPATH -u "$windows_path"`
23545    new_path="$unix_path"
23546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23548    new_path="$unix_path"
23549  fi
23550
23551    # remove trailing .exe if any
23552    new_path="${new_path/%.exe/}"
23553
23554    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23555    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23556  fi
23557
23558  else
23559    # We're on a posix platform. Hooray! :)
23560    # First separate the path from the arguments. This will split at the first
23561    # space.
23562    complete="$MT"
23563    path="${complete%% *}"
23564    tmp="$complete EOL"
23565    arguments="${tmp#* }"
23566
23567    # Cannot rely on the command "which" here since it doesn't always work.
23568    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23569    if test -z "$is_absolute_path"; then
23570      # Path to executable is not absolute. Find it.
23571      IFS_save="$IFS"
23572      IFS=:
23573      for p in $PATH; do
23574        if test -f "$p/$path" && test -x "$p/$path"; then
23575          new_path="$p/$path"
23576          break
23577        fi
23578      done
23579      IFS="$IFS_save"
23580    else
23581      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23582$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23583      new_path="$path"
23584    fi
23585
23586    if test "x$new_path" = x; then
23587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23588$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23589      has_space=`$ECHO "$complete" | $GREP " "`
23590      if test "x$has_space" != x; then
23591        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23592$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23593      fi
23594      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23595    fi
23596  fi
23597
23598  # Now join together the path and the arguments once again
23599  if test "x$arguments" != xEOL; then
23600    new_complete="$new_path ${arguments% *}"
23601  else
23602    new_complete="$new_path"
23603  fi
23604
23605  if test "x$complete" != "x$new_complete"; then
23606    MT="$new_complete"
23607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23608$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23609  fi
23610
23611    # The resource compiler
23612    # Extract the first word of "rc", so it can be a program name with args.
23613set dummy rc; ac_word=$2
23614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23615$as_echo_n "checking for $ac_word... " >&6; }
23616if ${ac_cv_prog_RC+:} false; then :
23617  $as_echo_n "(cached) " >&6
23618else
23619  if test -n "$RC"; then
23620  ac_cv_prog_RC="$RC" # Let the user override the test.
23621else
23622  ac_prog_rejected=no
23623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23624for as_dir in $PATH
23625do
23626  IFS=$as_save_IFS
23627  test -z "$as_dir" && as_dir=.
23628    for ac_exec_ext in '' $ac_executable_extensions; do
23629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23630    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23631       ac_prog_rejected=yes
23632       continue
23633     fi
23634    ac_cv_prog_RC="rc"
23635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23636    break 2
23637  fi
23638done
23639  done
23640IFS=$as_save_IFS
23641
23642if test $ac_prog_rejected = yes; then
23643  # We found a bogon in the path, so make sure we never use it.
23644  set dummy $ac_cv_prog_RC
23645  shift
23646  if test $# != 0; then
23647    # We chose a different compiler from the bogus one.
23648    # However, it has the same basename, so the bogon will be chosen
23649    # first if we set RC to just the basename; use the full file name.
23650    shift
23651    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23652  fi
23653fi
23654fi
23655fi
23656RC=$ac_cv_prog_RC
23657if test -n "$RC"; then
23658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23659$as_echo "$RC" >&6; }
23660else
23661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23662$as_echo "no" >&6; }
23663fi
23664
23665
23666
23667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23668
23669  # First separate the path from the arguments. This will split at the first
23670  # space.
23671  complete="$RC"
23672  path="${complete%% *}"
23673  tmp="$complete EOL"
23674  arguments="${tmp#* }"
23675
23676  # Input might be given as Windows format, start by converting to
23677  # unix format.
23678  new_path=`$CYGPATH -u "$path"`
23679
23680  # Now try to locate executable using which
23681  new_path=`$WHICH "$new_path" 2> /dev/null`
23682  # bat and cmd files are not always considered executable in cygwin causing which
23683  # to not find them
23684  if test "x$new_path" = x \
23685      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23686      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23687    new_path=`$CYGPATH -u "$path"`
23688  fi
23689  if test "x$new_path" = x; then
23690    # Oops. Which didn't find the executable.
23691    # The splitting of arguments from the executable at a space might have been incorrect,
23692    # since paths with space are more likely in Windows. Give it another try with the whole
23693    # argument.
23694    path="$complete"
23695    arguments="EOL"
23696    new_path=`$CYGPATH -u "$path"`
23697    new_path=`$WHICH "$new_path" 2> /dev/null`
23698    # bat and cmd files are not always considered executable in cygwin causing which
23699    # to not find them
23700    if test "x$new_path" = x \
23701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23703      new_path=`$CYGPATH -u "$path"`
23704    fi
23705    if test "x$new_path" = x; then
23706      # It's still not found. Now this is an unrecoverable error.
23707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23708$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23709      has_space=`$ECHO "$complete" | $GREP " "`
23710      if test "x$has_space" != x; then
23711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23713      fi
23714      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23715    fi
23716  fi
23717
23718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23721  # "foo.exe" is OK but "foo" is an error.
23722  #
23723  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23724  # It is also a way to make sure we got the proper file name for the real test later on.
23725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23726  if test "x$test_shortpath" = x; then
23727    # Short path failed, file does not exist as specified.
23728    # Try adding .exe or .cmd
23729    if test -f "${new_path}.exe"; then
23730      input_to_shortpath="${new_path}.exe"
23731    elif test -f "${new_path}.cmd"; then
23732      input_to_shortpath="${new_path}.cmd"
23733    else
23734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23735$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23738      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23739    fi
23740  else
23741    input_to_shortpath="$new_path"
23742  fi
23743
23744  # Call helper function which possibly converts this using DOS-style short mode.
23745  # If so, the updated path is stored in $new_path.
23746  new_path="$input_to_shortpath"
23747
23748  input_path="$input_to_shortpath"
23749  # Check if we need to convert this using DOS-style short mode. If the path
23750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23751  # take no chances and rewrite it.
23752  # Note: m4 eats our [], so we need to use [ and ] instead.
23753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23754  if test "x$has_forbidden_chars" != x; then
23755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23759      # Going to short mode and back again did indeed matter. Since short mode is
23760      # case insensitive, let's make it lowercase to improve readability.
23761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23762      # Now convert it back to Unix-stile (cygpath)
23763      input_path=`$CYGPATH -u "$shortmode_path"`
23764      new_path="$input_path"
23765    fi
23766  fi
23767
23768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23769  if test "x$test_cygdrive_prefix" = x; then
23770    # As a simple fix, exclude /usr/bin since it's not a real path.
23771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23773      # a path prefixed by /cygdrive for fixpath to work.
23774      new_path="$CYGWIN_ROOT_PATH$input_path"
23775    fi
23776  fi
23777
23778  # remove trailing .exe if any
23779  new_path="${new_path/%.exe/}"
23780
23781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23782
23783  # First separate the path from the arguments. This will split at the first
23784  # space.
23785  complete="$RC"
23786  path="${complete%% *}"
23787  tmp="$complete EOL"
23788  arguments="${tmp#* }"
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  new_path="$path"
23793
23794  windows_path="$new_path"
23795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23796    unix_path=`$CYGPATH -u "$windows_path"`
23797    new_path="$unix_path"
23798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23800    new_path="$unix_path"
23801  fi
23802
23803
23804  # Now try to locate executable using which
23805  new_path=`$WHICH "$new_path" 2> /dev/null`
23806
23807  if test "x$new_path" = x; then
23808    # Oops. Which didn't find the executable.
23809    # The splitting of arguments from the executable at a space might have been incorrect,
23810    # since paths with space are more likely in Windows. Give it another try with the whole
23811    # argument.
23812    path="$complete"
23813    arguments="EOL"
23814    new_path="$path"
23815
23816  windows_path="$new_path"
23817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23818    unix_path=`$CYGPATH -u "$windows_path"`
23819    new_path="$unix_path"
23820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23822    new_path="$unix_path"
23823  fi
23824
23825
23826    new_path=`$WHICH "$new_path" 2> /dev/null`
23827
23828    if test "x$new_path" = x; then
23829      # It's still not found. Now this is an unrecoverable error.
23830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23831$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23832      has_space=`$ECHO "$complete" | $GREP " "`
23833      if test "x$has_space" != x; then
23834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23836      fi
23837      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23838    fi
23839  fi
23840
23841  # Now new_path has a complete unix path to the binary
23842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23843    # Keep paths in /bin as-is, but remove trailing .exe if any
23844    new_path="${new_path/%.exe/}"
23845    # Do not save /bin paths to all_fixpath_prefixes!
23846  else
23847    # Not in mixed or Windows style, start by that.
23848    new_path=`cmd //c echo $new_path`
23849
23850  input_path="$new_path"
23851  # Check if we need to convert this using DOS-style short mode. If the path
23852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23853  # take no chances and rewrite it.
23854  # Note: m4 eats our [], so we need to use [ and ] instead.
23855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23856  if test "x$has_forbidden_chars" != x; then
23857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23859  fi
23860
23861    # Output is in $new_path
23862
23863  windows_path="$new_path"
23864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23865    unix_path=`$CYGPATH -u "$windows_path"`
23866    new_path="$unix_path"
23867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23869    new_path="$unix_path"
23870  fi
23871
23872    # remove trailing .exe if any
23873    new_path="${new_path/%.exe/}"
23874
23875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23877  fi
23878
23879  else
23880    # We're on a posix platform. Hooray! :)
23881    # First separate the path from the arguments. This will split at the first
23882    # space.
23883    complete="$RC"
23884    path="${complete%% *}"
23885    tmp="$complete EOL"
23886    arguments="${tmp#* }"
23887
23888    # Cannot rely on the command "which" here since it doesn't always work.
23889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23890    if test -z "$is_absolute_path"; then
23891      # Path to executable is not absolute. Find it.
23892      IFS_save="$IFS"
23893      IFS=:
23894      for p in $PATH; do
23895        if test -f "$p/$path" && test -x "$p/$path"; then
23896          new_path="$p/$path"
23897          break
23898        fi
23899      done
23900      IFS="$IFS_save"
23901    else
23902      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23903$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23904      new_path="$path"
23905    fi
23906
23907    if test "x$new_path" = x; then
23908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23909$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23910      has_space=`$ECHO "$complete" | $GREP " "`
23911      if test "x$has_space" != x; then
23912        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23914      fi
23915      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23916    fi
23917  fi
23918
23919  # Now join together the path and the arguments once again
23920  if test "x$arguments" != xEOL; then
23921    new_complete="$new_path ${arguments% *}"
23922  else
23923    new_complete="$new_path"
23924  fi
23925
23926  if test "x$complete" != "x$new_complete"; then
23927    RC="$new_complete"
23928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23929$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23930  fi
23931
23932
23933    # For hotspot, we need these in Windows mixed path,
23934    # so rewrite them all. Need added .exe suffix.
23935    HOTSPOT_CXX="$CXX.exe"
23936    HOTSPOT_LD="$LD.exe"
23937    HOTSPOT_MT="$MT.exe"
23938    HOTSPOT_RC="$RC.exe"
23939
23940  unix_path="$HOTSPOT_CXX"
23941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23942    windows_path=`$CYGPATH -m "$unix_path"`
23943    HOTSPOT_CXX="$windows_path"
23944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23945    windows_path=`cmd //c echo $unix_path`
23946    HOTSPOT_CXX="$windows_path"
23947  fi
23948
23949
23950  unix_path="$HOTSPOT_LD"
23951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23952    windows_path=`$CYGPATH -m "$unix_path"`
23953    HOTSPOT_LD="$windows_path"
23954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23955    windows_path=`cmd //c echo $unix_path`
23956    HOTSPOT_LD="$windows_path"
23957  fi
23958
23959
23960  unix_path="$HOTSPOT_MT"
23961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23962    windows_path=`$CYGPATH -m "$unix_path"`
23963    HOTSPOT_MT="$windows_path"
23964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23965    windows_path=`cmd //c echo $unix_path`
23966    HOTSPOT_MT="$windows_path"
23967  fi
23968
23969
23970  unix_path="$HOTSPOT_RC"
23971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23972    windows_path=`$CYGPATH -m "$unix_path"`
23973    HOTSPOT_RC="$windows_path"
23974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23975    windows_path=`cmd //c echo $unix_path`
23976    HOTSPOT_RC="$windows_path"
23977  fi
23978
23979
23980
23981
23982    RC_FLAGS="-nologo -l 0x409 -r"
23983    if test "x$VARIANT" = xOPT; then :
23984
23985    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23986
23987fi
23988
23989  # The version variables used to create RC_FLAGS may be overridden
23990  # in a custom configure script, or possibly the command line.
23991  # Let those variables be expanded at make time in spec.gmk.
23992  # The \$ are escaped to the shell, and the $(...) variables
23993  # are evaluated by make.
23994  RC_FLAGS="$RC_FLAGS \
23995      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23996      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23997      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23998      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23999      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24000      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24001      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
24002
24003  # lib.exe is used to create static libraries.
24004  # Extract the first word of "lib", so it can be a program name with args.
24005set dummy lib; ac_word=$2
24006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24007$as_echo_n "checking for $ac_word... " >&6; }
24008if ${ac_cv_prog_WINAR+:} false; then :
24009  $as_echo_n "(cached) " >&6
24010else
24011  if test -n "$WINAR"; then
24012  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24013else
24014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24015for as_dir in $PATH
24016do
24017  IFS=$as_save_IFS
24018  test -z "$as_dir" && as_dir=.
24019    for ac_exec_ext in '' $ac_executable_extensions; do
24020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24021    ac_cv_prog_WINAR="lib"
24022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24023    break 2
24024  fi
24025done
24026  done
24027IFS=$as_save_IFS
24028
24029fi
24030fi
24031WINAR=$ac_cv_prog_WINAR
24032if test -n "$WINAR"; then
24033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24034$as_echo "$WINAR" >&6; }
24035else
24036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24037$as_echo "no" >&6; }
24038fi
24039
24040
24041
24042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24043
24044  # First separate the path from the arguments. This will split at the first
24045  # space.
24046  complete="$WINAR"
24047  path="${complete%% *}"
24048  tmp="$complete EOL"
24049  arguments="${tmp#* }"
24050
24051  # Input might be given as Windows format, start by converting to
24052  # unix format.
24053  new_path=`$CYGPATH -u "$path"`
24054
24055  # Now try to locate executable using which
24056  new_path=`$WHICH "$new_path" 2> /dev/null`
24057  # bat and cmd files are not always considered executable in cygwin causing which
24058  # to not find them
24059  if test "x$new_path" = x \
24060      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24061      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24062    new_path=`$CYGPATH -u "$path"`
24063  fi
24064  if test "x$new_path" = x; then
24065    # Oops. Which didn't find the executable.
24066    # The splitting of arguments from the executable at a space might have been incorrect,
24067    # since paths with space are more likely in Windows. Give it another try with the whole
24068    # argument.
24069    path="$complete"
24070    arguments="EOL"
24071    new_path=`$CYGPATH -u "$path"`
24072    new_path=`$WHICH "$new_path" 2> /dev/null`
24073    # bat and cmd files are not always considered executable in cygwin causing which
24074    # to not find them
24075    if test "x$new_path" = x \
24076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24078      new_path=`$CYGPATH -u "$path"`
24079    fi
24080    if test "x$new_path" = x; then
24081      # It's still not found. Now this is an unrecoverable error.
24082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24083$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24084      has_space=`$ECHO "$complete" | $GREP " "`
24085      if test "x$has_space" != x; then
24086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24088      fi
24089      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24090    fi
24091  fi
24092
24093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24096  # "foo.exe" is OK but "foo" is an error.
24097  #
24098  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24099  # It is also a way to make sure we got the proper file name for the real test later on.
24100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24101  if test "x$test_shortpath" = x; then
24102    # Short path failed, file does not exist as specified.
24103    # Try adding .exe or .cmd
24104    if test -f "${new_path}.exe"; then
24105      input_to_shortpath="${new_path}.exe"
24106    elif test -f "${new_path}.cmd"; then
24107      input_to_shortpath="${new_path}.cmd"
24108    else
24109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24110$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24111      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24112$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24113      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24114    fi
24115  else
24116    input_to_shortpath="$new_path"
24117  fi
24118
24119  # Call helper function which possibly converts this using DOS-style short mode.
24120  # If so, the updated path is stored in $new_path.
24121  new_path="$input_to_shortpath"
24122
24123  input_path="$input_to_shortpath"
24124  # Check if we need to convert this using DOS-style short mode. If the path
24125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24126  # take no chances and rewrite it.
24127  # Note: m4 eats our [], so we need to use [ and ] instead.
24128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24129  if test "x$has_forbidden_chars" != x; then
24130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24134      # Going to short mode and back again did indeed matter. Since short mode is
24135      # case insensitive, let's make it lowercase to improve readability.
24136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24137      # Now convert it back to Unix-stile (cygpath)
24138      input_path=`$CYGPATH -u "$shortmode_path"`
24139      new_path="$input_path"
24140    fi
24141  fi
24142
24143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24144  if test "x$test_cygdrive_prefix" = x; then
24145    # As a simple fix, exclude /usr/bin since it's not a real path.
24146    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24148      # a path prefixed by /cygdrive for fixpath to work.
24149      new_path="$CYGWIN_ROOT_PATH$input_path"
24150    fi
24151  fi
24152
24153  # remove trailing .exe if any
24154  new_path="${new_path/%.exe/}"
24155
24156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24157
24158  # First separate the path from the arguments. This will split at the first
24159  # space.
24160  complete="$WINAR"
24161  path="${complete%% *}"
24162  tmp="$complete EOL"
24163  arguments="${tmp#* }"
24164
24165  # Input might be given as Windows format, start by converting to
24166  # unix format.
24167  new_path="$path"
24168
24169  windows_path="$new_path"
24170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24171    unix_path=`$CYGPATH -u "$windows_path"`
24172    new_path="$unix_path"
24173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24175    new_path="$unix_path"
24176  fi
24177
24178
24179  # Now try to locate executable using which
24180  new_path=`$WHICH "$new_path" 2> /dev/null`
24181
24182  if test "x$new_path" = x; then
24183    # Oops. Which didn't find the executable.
24184    # The splitting of arguments from the executable at a space might have been incorrect,
24185    # since paths with space are more likely in Windows. Give it another try with the whole
24186    # argument.
24187    path="$complete"
24188    arguments="EOL"
24189    new_path="$path"
24190
24191  windows_path="$new_path"
24192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24193    unix_path=`$CYGPATH -u "$windows_path"`
24194    new_path="$unix_path"
24195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24197    new_path="$unix_path"
24198  fi
24199
24200
24201    new_path=`$WHICH "$new_path" 2> /dev/null`
24202
24203    if test "x$new_path" = x; then
24204      # It's still not found. Now this is an unrecoverable error.
24205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24206$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24207      has_space=`$ECHO "$complete" | $GREP " "`
24208      if test "x$has_space" != x; then
24209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24211      fi
24212      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24213    fi
24214  fi
24215
24216  # Now new_path has a complete unix path to the binary
24217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24218    # Keep paths in /bin as-is, but remove trailing .exe if any
24219    new_path="${new_path/%.exe/}"
24220    # Do not save /bin paths to all_fixpath_prefixes!
24221  else
24222    # Not in mixed or Windows style, start by that.
24223    new_path=`cmd //c echo $new_path`
24224
24225  input_path="$new_path"
24226  # Check if we need to convert this using DOS-style short mode. If the path
24227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24228  # take no chances and rewrite it.
24229  # Note: m4 eats our [], so we need to use [ and ] instead.
24230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24231  if test "x$has_forbidden_chars" != x; then
24232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24234  fi
24235
24236    # Output is in $new_path
24237
24238  windows_path="$new_path"
24239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24240    unix_path=`$CYGPATH -u "$windows_path"`
24241    new_path="$unix_path"
24242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24244    new_path="$unix_path"
24245  fi
24246
24247    # remove trailing .exe if any
24248    new_path="${new_path/%.exe/}"
24249
24250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24252  fi
24253
24254  else
24255    # We're on a posix platform. Hooray! :)
24256    # First separate the path from the arguments. This will split at the first
24257    # space.
24258    complete="$WINAR"
24259    path="${complete%% *}"
24260    tmp="$complete EOL"
24261    arguments="${tmp#* }"
24262
24263    # Cannot rely on the command "which" here since it doesn't always work.
24264    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24265    if test -z "$is_absolute_path"; then
24266      # Path to executable is not absolute. Find it.
24267      IFS_save="$IFS"
24268      IFS=:
24269      for p in $PATH; do
24270        if test -f "$p/$path" && test -x "$p/$path"; then
24271          new_path="$p/$path"
24272          break
24273        fi
24274      done
24275      IFS="$IFS_save"
24276    else
24277      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24278$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24279      new_path="$path"
24280    fi
24281
24282    if test "x$new_path" = x; then
24283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24284$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24285      has_space=`$ECHO "$complete" | $GREP " "`
24286      if test "x$has_space" != x; then
24287        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24289      fi
24290      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24291    fi
24292  fi
24293
24294  # Now join together the path and the arguments once again
24295  if test "x$arguments" != xEOL; then
24296    new_complete="$new_path ${arguments% *}"
24297  else
24298    new_complete="$new_path"
24299  fi
24300
24301  if test "x$complete" != "x$new_complete"; then
24302    WINAR="$new_complete"
24303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24304$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24305  fi
24306
24307  AR="$WINAR"
24308  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24309
24310  # Extract the first word of "dumpbin", so it can be a program name with args.
24311set dummy dumpbin; ac_word=$2
24312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24313$as_echo_n "checking for $ac_word... " >&6; }
24314if ${ac_cv_prog_DUMPBIN+:} false; then :
24315  $as_echo_n "(cached) " >&6
24316else
24317  if test -n "$DUMPBIN"; then
24318  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24319else
24320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24321for as_dir in $PATH
24322do
24323  IFS=$as_save_IFS
24324  test -z "$as_dir" && as_dir=.
24325    for ac_exec_ext in '' $ac_executable_extensions; do
24326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24327    ac_cv_prog_DUMPBIN="dumpbin"
24328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24329    break 2
24330  fi
24331done
24332  done
24333IFS=$as_save_IFS
24334
24335fi
24336fi
24337DUMPBIN=$ac_cv_prog_DUMPBIN
24338if test -n "$DUMPBIN"; then
24339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24340$as_echo "$DUMPBIN" >&6; }
24341else
24342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24343$as_echo "no" >&6; }
24344fi
24345
24346
24347
24348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24349
24350  # First separate the path from the arguments. This will split at the first
24351  # space.
24352  complete="$DUMPBIN"
24353  path="${complete%% *}"
24354  tmp="$complete EOL"
24355  arguments="${tmp#* }"
24356
24357  # Input might be given as Windows format, start by converting to
24358  # unix format.
24359  new_path=`$CYGPATH -u "$path"`
24360
24361  # Now try to locate executable using which
24362  new_path=`$WHICH "$new_path" 2> /dev/null`
24363  # bat and cmd files are not always considered executable in cygwin causing which
24364  # to not find them
24365  if test "x$new_path" = x \
24366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24368    new_path=`$CYGPATH -u "$path"`
24369  fi
24370  if test "x$new_path" = x; then
24371    # Oops. Which didn't find the executable.
24372    # The splitting of arguments from the executable at a space might have been incorrect,
24373    # since paths with space are more likely in Windows. Give it another try with the whole
24374    # argument.
24375    path="$complete"
24376    arguments="EOL"
24377    new_path=`$CYGPATH -u "$path"`
24378    new_path=`$WHICH "$new_path" 2> /dev/null`
24379    # bat and cmd files are not always considered executable in cygwin causing which
24380    # to not find them
24381    if test "x$new_path" = x \
24382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24384      new_path=`$CYGPATH -u "$path"`
24385    fi
24386    if test "x$new_path" = x; then
24387      # It's still not found. Now this is an unrecoverable error.
24388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24389$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24390      has_space=`$ECHO "$complete" | $GREP " "`
24391      if test "x$has_space" != x; then
24392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24394      fi
24395      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24396    fi
24397  fi
24398
24399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24402  # "foo.exe" is OK but "foo" is an error.
24403  #
24404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24405  # It is also a way to make sure we got the proper file name for the real test later on.
24406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24407  if test "x$test_shortpath" = x; then
24408    # Short path failed, file does not exist as specified.
24409    # Try adding .exe or .cmd
24410    if test -f "${new_path}.exe"; then
24411      input_to_shortpath="${new_path}.exe"
24412    elif test -f "${new_path}.cmd"; then
24413      input_to_shortpath="${new_path}.cmd"
24414    else
24415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24416$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24419      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24420    fi
24421  else
24422    input_to_shortpath="$new_path"
24423  fi
24424
24425  # Call helper function which possibly converts this using DOS-style short mode.
24426  # If so, the updated path is stored in $new_path.
24427  new_path="$input_to_shortpath"
24428
24429  input_path="$input_to_shortpath"
24430  # Check if we need to convert this using DOS-style short mode. If the path
24431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24432  # take no chances and rewrite it.
24433  # Note: m4 eats our [], so we need to use [ and ] instead.
24434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24435  if test "x$has_forbidden_chars" != x; then
24436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24440      # Going to short mode and back again did indeed matter. Since short mode is
24441      # case insensitive, let's make it lowercase to improve readability.
24442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24443      # Now convert it back to Unix-stile (cygpath)
24444      input_path=`$CYGPATH -u "$shortmode_path"`
24445      new_path="$input_path"
24446    fi
24447  fi
24448
24449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24450  if test "x$test_cygdrive_prefix" = x; then
24451    # As a simple fix, exclude /usr/bin since it's not a real path.
24452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24454      # a path prefixed by /cygdrive for fixpath to work.
24455      new_path="$CYGWIN_ROOT_PATH$input_path"
24456    fi
24457  fi
24458
24459  # remove trailing .exe if any
24460  new_path="${new_path/%.exe/}"
24461
24462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24463
24464  # First separate the path from the arguments. This will split at the first
24465  # space.
24466  complete="$DUMPBIN"
24467  path="${complete%% *}"
24468  tmp="$complete EOL"
24469  arguments="${tmp#* }"
24470
24471  # Input might be given as Windows format, start by converting to
24472  # unix format.
24473  new_path="$path"
24474
24475  windows_path="$new_path"
24476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24477    unix_path=`$CYGPATH -u "$windows_path"`
24478    new_path="$unix_path"
24479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24481    new_path="$unix_path"
24482  fi
24483
24484
24485  # Now try to locate executable using which
24486  new_path=`$WHICH "$new_path" 2> /dev/null`
24487
24488  if test "x$new_path" = x; then
24489    # Oops. Which didn't find the executable.
24490    # The splitting of arguments from the executable at a space might have been incorrect,
24491    # since paths with space are more likely in Windows. Give it another try with the whole
24492    # argument.
24493    path="$complete"
24494    arguments="EOL"
24495    new_path="$path"
24496
24497  windows_path="$new_path"
24498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24499    unix_path=`$CYGPATH -u "$windows_path"`
24500    new_path="$unix_path"
24501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24503    new_path="$unix_path"
24504  fi
24505
24506
24507    new_path=`$WHICH "$new_path" 2> /dev/null`
24508
24509    if test "x$new_path" = x; then
24510      # It's still not found. Now this is an unrecoverable error.
24511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24512$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24513      has_space=`$ECHO "$complete" | $GREP " "`
24514      if test "x$has_space" != x; then
24515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24517      fi
24518      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24519    fi
24520  fi
24521
24522  # Now new_path has a complete unix path to the binary
24523  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24524    # Keep paths in /bin as-is, but remove trailing .exe if any
24525    new_path="${new_path/%.exe/}"
24526    # Do not save /bin paths to all_fixpath_prefixes!
24527  else
24528    # Not in mixed or Windows style, start by that.
24529    new_path=`cmd //c echo $new_path`
24530
24531  input_path="$new_path"
24532  # Check if we need to convert this using DOS-style short mode. If the path
24533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24534  # take no chances and rewrite it.
24535  # Note: m4 eats our [], so we need to use [ and ] instead.
24536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24537  if test "x$has_forbidden_chars" != x; then
24538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24540  fi
24541
24542    # Output is in $new_path
24543
24544  windows_path="$new_path"
24545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24546    unix_path=`$CYGPATH -u "$windows_path"`
24547    new_path="$unix_path"
24548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24550    new_path="$unix_path"
24551  fi
24552
24553    # remove trailing .exe if any
24554    new_path="${new_path/%.exe/}"
24555
24556    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24557    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24558  fi
24559
24560  else
24561    # We're on a posix platform. Hooray! :)
24562    # First separate the path from the arguments. This will split at the first
24563    # space.
24564    complete="$DUMPBIN"
24565    path="${complete%% *}"
24566    tmp="$complete EOL"
24567    arguments="${tmp#* }"
24568
24569    # Cannot rely on the command "which" here since it doesn't always work.
24570    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24571    if test -z "$is_absolute_path"; then
24572      # Path to executable is not absolute. Find it.
24573      IFS_save="$IFS"
24574      IFS=:
24575      for p in $PATH; do
24576        if test -f "$p/$path" && test -x "$p/$path"; then
24577          new_path="$p/$path"
24578          break
24579        fi
24580      done
24581      IFS="$IFS_save"
24582    else
24583      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24584$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24585      new_path="$path"
24586    fi
24587
24588    if test "x$new_path" = x; then
24589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24590$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24591      has_space=`$ECHO "$complete" | $GREP " "`
24592      if test "x$has_space" != x; then
24593        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24595      fi
24596      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24597    fi
24598  fi
24599
24600  # Now join together the path and the arguments once again
24601  if test "x$arguments" != xEOL; then
24602    new_complete="$new_path ${arguments% *}"
24603  else
24604    new_complete="$new_path"
24605  fi
24606
24607  if test "x$complete" != "x$new_complete"; then
24608    DUMPBIN="$new_complete"
24609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24610$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24611  fi
24612
24613
24614      COMPILER_TYPE=CL
24615      CCXXFLAGS="$CCXXFLAGS -nologo"
24616
24617fi
24618
24619
24620
24621  ac_ext=c
24622ac_cpp='$CPP $CPPFLAGS'
24623ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24624ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24625ac_compiler_gnu=$ac_cv_c_compiler_gnu
24626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24627$as_echo_n "checking how to run the C preprocessor... " >&6; }
24628# On Suns, sometimes $CPP names a directory.
24629if test -n "$CPP" && test -d "$CPP"; then
24630  CPP=
24631fi
24632if test -z "$CPP"; then
24633  if ${ac_cv_prog_CPP+:} false; then :
24634  $as_echo_n "(cached) " >&6
24635else
24636      # Double quotes because CPP needs to be expanded
24637    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24638    do
24639      ac_preproc_ok=false
24640for ac_c_preproc_warn_flag in '' yes
24641do
24642  # Use a header file that comes with gcc, so configuring glibc
24643  # with a fresh cross-compiler works.
24644  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24645  # <limits.h> exists even on freestanding compilers.
24646  # On the NeXT, cc -E runs the code through the compiler's parser,
24647  # not just through cpp. "Syntax error" is here to catch this case.
24648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24649/* end confdefs.h.  */
24650#ifdef __STDC__
24651# include <limits.h>
24652#else
24653# include <assert.h>
24654#endif
24655		     Syntax error
24656_ACEOF
24657if ac_fn_c_try_cpp "$LINENO"; then :
24658
24659else
24660  # Broken: fails on valid input.
24661continue
24662fi
24663rm -f conftest.err conftest.i conftest.$ac_ext
24664
24665  # OK, works on sane cases.  Now check whether nonexistent headers
24666  # can be detected and how.
24667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24668/* end confdefs.h.  */
24669#include <ac_nonexistent.h>
24670_ACEOF
24671if ac_fn_c_try_cpp "$LINENO"; then :
24672  # Broken: success on invalid input.
24673continue
24674else
24675  # Passes both tests.
24676ac_preproc_ok=:
24677break
24678fi
24679rm -f conftest.err conftest.i conftest.$ac_ext
24680
24681done
24682# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24683rm -f conftest.i conftest.err conftest.$ac_ext
24684if $ac_preproc_ok; then :
24685  break
24686fi
24687
24688    done
24689    ac_cv_prog_CPP=$CPP
24690
24691fi
24692  CPP=$ac_cv_prog_CPP
24693else
24694  ac_cv_prog_CPP=$CPP
24695fi
24696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24697$as_echo "$CPP" >&6; }
24698ac_preproc_ok=false
24699for ac_c_preproc_warn_flag in '' yes
24700do
24701  # Use a header file that comes with gcc, so configuring glibc
24702  # with a fresh cross-compiler works.
24703  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24704  # <limits.h> exists even on freestanding compilers.
24705  # On the NeXT, cc -E runs the code through the compiler's parser,
24706  # not just through cpp. "Syntax error" is here to catch this case.
24707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24708/* end confdefs.h.  */
24709#ifdef __STDC__
24710# include <limits.h>
24711#else
24712# include <assert.h>
24713#endif
24714		     Syntax error
24715_ACEOF
24716if ac_fn_c_try_cpp "$LINENO"; then :
24717
24718else
24719  # Broken: fails on valid input.
24720continue
24721fi
24722rm -f conftest.err conftest.i conftest.$ac_ext
24723
24724  # OK, works on sane cases.  Now check whether nonexistent headers
24725  # can be detected and how.
24726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24727/* end confdefs.h.  */
24728#include <ac_nonexistent.h>
24729_ACEOF
24730if ac_fn_c_try_cpp "$LINENO"; then :
24731  # Broken: success on invalid input.
24732continue
24733else
24734  # Passes both tests.
24735ac_preproc_ok=:
24736break
24737fi
24738rm -f conftest.err conftest.i conftest.$ac_ext
24739
24740done
24741# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24742rm -f conftest.i conftest.err conftest.$ac_ext
24743if $ac_preproc_ok; then :
24744
24745else
24746  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24748as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24749See \`config.log' for more details" "$LINENO" 5; }
24750fi
24751
24752ac_ext=cpp
24753ac_cpp='$CXXCPP $CPPFLAGS'
24754ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24755ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24756ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24757
24758
24759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24760
24761  # First separate the path from the arguments. This will split at the first
24762  # space.
24763  complete="$CPP"
24764  path="${complete%% *}"
24765  tmp="$complete EOL"
24766  arguments="${tmp#* }"
24767
24768  # Input might be given as Windows format, start by converting to
24769  # unix format.
24770  new_path=`$CYGPATH -u "$path"`
24771
24772  # Now try to locate executable using which
24773  new_path=`$WHICH "$new_path" 2> /dev/null`
24774  # bat and cmd files are not always considered executable in cygwin causing which
24775  # to not find them
24776  if test "x$new_path" = x \
24777      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24778      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24779    new_path=`$CYGPATH -u "$path"`
24780  fi
24781  if test "x$new_path" = x; then
24782    # Oops. Which didn't find the executable.
24783    # The splitting of arguments from the executable at a space might have been incorrect,
24784    # since paths with space are more likely in Windows. Give it another try with the whole
24785    # argument.
24786    path="$complete"
24787    arguments="EOL"
24788    new_path=`$CYGPATH -u "$path"`
24789    new_path=`$WHICH "$new_path" 2> /dev/null`
24790    # bat and cmd files are not always considered executable in cygwin causing which
24791    # to not find them
24792    if test "x$new_path" = x \
24793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24795      new_path=`$CYGPATH -u "$path"`
24796    fi
24797    if test "x$new_path" = x; then
24798      # It's still not found. Now this is an unrecoverable error.
24799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24800$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24801      has_space=`$ECHO "$complete" | $GREP " "`
24802      if test "x$has_space" != x; then
24803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24805      fi
24806      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24807    fi
24808  fi
24809
24810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24813  # "foo.exe" is OK but "foo" is an error.
24814  #
24815  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24816  # It is also a way to make sure we got the proper file name for the real test later on.
24817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24818  if test "x$test_shortpath" = x; then
24819    # Short path failed, file does not exist as specified.
24820    # Try adding .exe or .cmd
24821    if test -f "${new_path}.exe"; then
24822      input_to_shortpath="${new_path}.exe"
24823    elif test -f "${new_path}.cmd"; then
24824      input_to_shortpath="${new_path}.cmd"
24825    else
24826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24827$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24830      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24831    fi
24832  else
24833    input_to_shortpath="$new_path"
24834  fi
24835
24836  # Call helper function which possibly converts this using DOS-style short mode.
24837  # If so, the updated path is stored in $new_path.
24838  new_path="$input_to_shortpath"
24839
24840  input_path="$input_to_shortpath"
24841  # Check if we need to convert this using DOS-style short mode. If the path
24842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24843  # take no chances and rewrite it.
24844  # Note: m4 eats our [], so we need to use [ and ] instead.
24845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24846  if test "x$has_forbidden_chars" != x; then
24847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24851      # Going to short mode and back again did indeed matter. Since short mode is
24852      # case insensitive, let's make it lowercase to improve readability.
24853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24854      # Now convert it back to Unix-stile (cygpath)
24855      input_path=`$CYGPATH -u "$shortmode_path"`
24856      new_path="$input_path"
24857    fi
24858  fi
24859
24860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24861  if test "x$test_cygdrive_prefix" = x; then
24862    # As a simple fix, exclude /usr/bin since it's not a real path.
24863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24865      # a path prefixed by /cygdrive for fixpath to work.
24866      new_path="$CYGWIN_ROOT_PATH$input_path"
24867    fi
24868  fi
24869
24870  # remove trailing .exe if any
24871  new_path="${new_path/%.exe/}"
24872
24873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24874
24875  # First separate the path from the arguments. This will split at the first
24876  # space.
24877  complete="$CPP"
24878  path="${complete%% *}"
24879  tmp="$complete EOL"
24880  arguments="${tmp#* }"
24881
24882  # Input might be given as Windows format, start by converting to
24883  # unix format.
24884  new_path="$path"
24885
24886  windows_path="$new_path"
24887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24888    unix_path=`$CYGPATH -u "$windows_path"`
24889    new_path="$unix_path"
24890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24892    new_path="$unix_path"
24893  fi
24894
24895
24896  # Now try to locate executable using which
24897  new_path=`$WHICH "$new_path" 2> /dev/null`
24898
24899  if test "x$new_path" = x; then
24900    # Oops. Which didn't find the executable.
24901    # The splitting of arguments from the executable at a space might have been incorrect,
24902    # since paths with space are more likely in Windows. Give it another try with the whole
24903    # argument.
24904    path="$complete"
24905    arguments="EOL"
24906    new_path="$path"
24907
24908  windows_path="$new_path"
24909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24910    unix_path=`$CYGPATH -u "$windows_path"`
24911    new_path="$unix_path"
24912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24914    new_path="$unix_path"
24915  fi
24916
24917
24918    new_path=`$WHICH "$new_path" 2> /dev/null`
24919
24920    if test "x$new_path" = x; then
24921      # It's still not found. Now this is an unrecoverable error.
24922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24923$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24924      has_space=`$ECHO "$complete" | $GREP " "`
24925      if test "x$has_space" != x; then
24926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24928      fi
24929      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24930    fi
24931  fi
24932
24933  # Now new_path has a complete unix path to the binary
24934  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24935    # Keep paths in /bin as-is, but remove trailing .exe if any
24936    new_path="${new_path/%.exe/}"
24937    # Do not save /bin paths to all_fixpath_prefixes!
24938  else
24939    # Not in mixed or Windows style, start by that.
24940    new_path=`cmd //c echo $new_path`
24941
24942  input_path="$new_path"
24943  # Check if we need to convert this using DOS-style short mode. If the path
24944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24945  # take no chances and rewrite it.
24946  # Note: m4 eats our [], so we need to use [ and ] instead.
24947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24948  if test "x$has_forbidden_chars" != x; then
24949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24951  fi
24952
24953    # Output is in $new_path
24954
24955  windows_path="$new_path"
24956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24957    unix_path=`$CYGPATH -u "$windows_path"`
24958    new_path="$unix_path"
24959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24961    new_path="$unix_path"
24962  fi
24963
24964    # remove trailing .exe if any
24965    new_path="${new_path/%.exe/}"
24966
24967    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24968    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24969  fi
24970
24971  else
24972    # We're on a posix platform. Hooray! :)
24973    # First separate the path from the arguments. This will split at the first
24974    # space.
24975    complete="$CPP"
24976    path="${complete%% *}"
24977    tmp="$complete EOL"
24978    arguments="${tmp#* }"
24979
24980    # Cannot rely on the command "which" here since it doesn't always work.
24981    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24982    if test -z "$is_absolute_path"; then
24983      # Path to executable is not absolute. Find it.
24984      IFS_save="$IFS"
24985      IFS=:
24986      for p in $PATH; do
24987        if test -f "$p/$path" && test -x "$p/$path"; then
24988          new_path="$p/$path"
24989          break
24990        fi
24991      done
24992      IFS="$IFS_save"
24993    else
24994      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24995$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24996      new_path="$path"
24997    fi
24998
24999    if test "x$new_path" = x; then
25000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25001$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25002      has_space=`$ECHO "$complete" | $GREP " "`
25003      if test "x$has_space" != x; then
25004        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25006      fi
25007      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25008    fi
25009  fi
25010
25011  # Now join together the path and the arguments once again
25012  if test "x$arguments" != xEOL; then
25013    new_complete="$new_path ${arguments% *}"
25014  else
25015    new_complete="$new_path"
25016  fi
25017
25018  if test "x$complete" != "x$new_complete"; then
25019    CPP="$new_complete"
25020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25021$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25022  fi
25023
25024
25025  ac_ext=cpp
25026ac_cpp='$CXXCPP $CPPFLAGS'
25027ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25028ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25029ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25031$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25032if test -z "$CXXCPP"; then
25033  if ${ac_cv_prog_CXXCPP+:} false; then :
25034  $as_echo_n "(cached) " >&6
25035else
25036      # Double quotes because CXXCPP needs to be expanded
25037    for CXXCPP in "$CXX -E" "/lib/cpp"
25038    do
25039      ac_preproc_ok=false
25040for ac_cxx_preproc_warn_flag in '' yes
25041do
25042  # Use a header file that comes with gcc, so configuring glibc
25043  # with a fresh cross-compiler works.
25044  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25045  # <limits.h> exists even on freestanding compilers.
25046  # On the NeXT, cc -E runs the code through the compiler's parser,
25047  # not just through cpp. "Syntax error" is here to catch this case.
25048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25049/* end confdefs.h.  */
25050#ifdef __STDC__
25051# include <limits.h>
25052#else
25053# include <assert.h>
25054#endif
25055		     Syntax error
25056_ACEOF
25057if ac_fn_cxx_try_cpp "$LINENO"; then :
25058
25059else
25060  # Broken: fails on valid input.
25061continue
25062fi
25063rm -f conftest.err conftest.i conftest.$ac_ext
25064
25065  # OK, works on sane cases.  Now check whether nonexistent headers
25066  # can be detected and how.
25067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25068/* end confdefs.h.  */
25069#include <ac_nonexistent.h>
25070_ACEOF
25071if ac_fn_cxx_try_cpp "$LINENO"; then :
25072  # Broken: success on invalid input.
25073continue
25074else
25075  # Passes both tests.
25076ac_preproc_ok=:
25077break
25078fi
25079rm -f conftest.err conftest.i conftest.$ac_ext
25080
25081done
25082# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25083rm -f conftest.i conftest.err conftest.$ac_ext
25084if $ac_preproc_ok; then :
25085  break
25086fi
25087
25088    done
25089    ac_cv_prog_CXXCPP=$CXXCPP
25090
25091fi
25092  CXXCPP=$ac_cv_prog_CXXCPP
25093else
25094  ac_cv_prog_CXXCPP=$CXXCPP
25095fi
25096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25097$as_echo "$CXXCPP" >&6; }
25098ac_preproc_ok=false
25099for ac_cxx_preproc_warn_flag in '' yes
25100do
25101  # Use a header file that comes with gcc, so configuring glibc
25102  # with a fresh cross-compiler works.
25103  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25104  # <limits.h> exists even on freestanding compilers.
25105  # On the NeXT, cc -E runs the code through the compiler's parser,
25106  # not just through cpp. "Syntax error" is here to catch this case.
25107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25108/* end confdefs.h.  */
25109#ifdef __STDC__
25110# include <limits.h>
25111#else
25112# include <assert.h>
25113#endif
25114		     Syntax error
25115_ACEOF
25116if ac_fn_cxx_try_cpp "$LINENO"; then :
25117
25118else
25119  # Broken: fails on valid input.
25120continue
25121fi
25122rm -f conftest.err conftest.i conftest.$ac_ext
25123
25124  # OK, works on sane cases.  Now check whether nonexistent headers
25125  # can be detected and how.
25126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25127/* end confdefs.h.  */
25128#include <ac_nonexistent.h>
25129_ACEOF
25130if ac_fn_cxx_try_cpp "$LINENO"; then :
25131  # Broken: success on invalid input.
25132continue
25133else
25134  # Passes both tests.
25135ac_preproc_ok=:
25136break
25137fi
25138rm -f conftest.err conftest.i conftest.$ac_ext
25139
25140done
25141# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25142rm -f conftest.i conftest.err conftest.$ac_ext
25143if $ac_preproc_ok; then :
25144
25145else
25146  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25148as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25149See \`config.log' for more details" "$LINENO" 5; }
25150fi
25151
25152ac_ext=cpp
25153ac_cpp='$CXXCPP $CPPFLAGS'
25154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25157
25158
25159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25160
25161  # First separate the path from the arguments. This will split at the first
25162  # space.
25163  complete="$CXXCPP"
25164  path="${complete%% *}"
25165  tmp="$complete EOL"
25166  arguments="${tmp#* }"
25167
25168  # Input might be given as Windows format, start by converting to
25169  # unix format.
25170  new_path=`$CYGPATH -u "$path"`
25171
25172  # Now try to locate executable using which
25173  new_path=`$WHICH "$new_path" 2> /dev/null`
25174  # bat and cmd files are not always considered executable in cygwin causing which
25175  # to not find them
25176  if test "x$new_path" = x \
25177      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25178      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25179    new_path=`$CYGPATH -u "$path"`
25180  fi
25181  if test "x$new_path" = x; then
25182    # Oops. Which didn't find the executable.
25183    # The splitting of arguments from the executable at a space might have been incorrect,
25184    # since paths with space are more likely in Windows. Give it another try with the whole
25185    # argument.
25186    path="$complete"
25187    arguments="EOL"
25188    new_path=`$CYGPATH -u "$path"`
25189    new_path=`$WHICH "$new_path" 2> /dev/null`
25190    # bat and cmd files are not always considered executable in cygwin causing which
25191    # to not find them
25192    if test "x$new_path" = x \
25193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25195      new_path=`$CYGPATH -u "$path"`
25196    fi
25197    if test "x$new_path" = x; then
25198      # It's still not found. Now this is an unrecoverable error.
25199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25200$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25201      has_space=`$ECHO "$complete" | $GREP " "`
25202      if test "x$has_space" != x; then
25203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25205      fi
25206      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25207    fi
25208  fi
25209
25210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25213  # "foo.exe" is OK but "foo" is an error.
25214  #
25215  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25216  # It is also a way to make sure we got the proper file name for the real test later on.
25217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25218  if test "x$test_shortpath" = x; then
25219    # Short path failed, file does not exist as specified.
25220    # Try adding .exe or .cmd
25221    if test -f "${new_path}.exe"; then
25222      input_to_shortpath="${new_path}.exe"
25223    elif test -f "${new_path}.cmd"; then
25224      input_to_shortpath="${new_path}.cmd"
25225    else
25226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25227$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25228      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25229$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25230      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25231    fi
25232  else
25233    input_to_shortpath="$new_path"
25234  fi
25235
25236  # Call helper function which possibly converts this using DOS-style short mode.
25237  # If so, the updated path is stored in $new_path.
25238  new_path="$input_to_shortpath"
25239
25240  input_path="$input_to_shortpath"
25241  # Check if we need to convert this using DOS-style short mode. If the path
25242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25243  # take no chances and rewrite it.
25244  # Note: m4 eats our [], so we need to use [ and ] instead.
25245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25246  if test "x$has_forbidden_chars" != x; then
25247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25251      # Going to short mode and back again did indeed matter. Since short mode is
25252      # case insensitive, let's make it lowercase to improve readability.
25253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25254      # Now convert it back to Unix-stile (cygpath)
25255      input_path=`$CYGPATH -u "$shortmode_path"`
25256      new_path="$input_path"
25257    fi
25258  fi
25259
25260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25261  if test "x$test_cygdrive_prefix" = x; then
25262    # As a simple fix, exclude /usr/bin since it's not a real path.
25263    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25265      # a path prefixed by /cygdrive for fixpath to work.
25266      new_path="$CYGWIN_ROOT_PATH$input_path"
25267    fi
25268  fi
25269
25270  # remove trailing .exe if any
25271  new_path="${new_path/%.exe/}"
25272
25273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25274
25275  # First separate the path from the arguments. This will split at the first
25276  # space.
25277  complete="$CXXCPP"
25278  path="${complete%% *}"
25279  tmp="$complete EOL"
25280  arguments="${tmp#* }"
25281
25282  # Input might be given as Windows format, start by converting to
25283  # unix format.
25284  new_path="$path"
25285
25286  windows_path="$new_path"
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288    unix_path=`$CYGPATH -u "$windows_path"`
25289    new_path="$unix_path"
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25292    new_path="$unix_path"
25293  fi
25294
25295
25296  # Now try to locate executable using which
25297  new_path=`$WHICH "$new_path" 2> /dev/null`
25298
25299  if test "x$new_path" = x; then
25300    # Oops. Which didn't find the executable.
25301    # The splitting of arguments from the executable at a space might have been incorrect,
25302    # since paths with space are more likely in Windows. Give it another try with the whole
25303    # argument.
25304    path="$complete"
25305    arguments="EOL"
25306    new_path="$path"
25307
25308  windows_path="$new_path"
25309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25310    unix_path=`$CYGPATH -u "$windows_path"`
25311    new_path="$unix_path"
25312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25314    new_path="$unix_path"
25315  fi
25316
25317
25318    new_path=`$WHICH "$new_path" 2> /dev/null`
25319
25320    if test "x$new_path" = x; then
25321      # It's still not found. Now this is an unrecoverable error.
25322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25323$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25324      has_space=`$ECHO "$complete" | $GREP " "`
25325      if test "x$has_space" != x; then
25326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25328      fi
25329      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25330    fi
25331  fi
25332
25333  # Now new_path has a complete unix path to the binary
25334  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25335    # Keep paths in /bin as-is, but remove trailing .exe if any
25336    new_path="${new_path/%.exe/}"
25337    # Do not save /bin paths to all_fixpath_prefixes!
25338  else
25339    # Not in mixed or Windows style, start by that.
25340    new_path=`cmd //c echo $new_path`
25341
25342  input_path="$new_path"
25343  # Check if we need to convert this using DOS-style short mode. If the path
25344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25345  # take no chances and rewrite it.
25346  # Note: m4 eats our [], so we need to use [ and ] instead.
25347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25348  if test "x$has_forbidden_chars" != x; then
25349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25351  fi
25352
25353    # Output is in $new_path
25354
25355  windows_path="$new_path"
25356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25357    unix_path=`$CYGPATH -u "$windows_path"`
25358    new_path="$unix_path"
25359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25361    new_path="$unix_path"
25362  fi
25363
25364    # remove trailing .exe if any
25365    new_path="${new_path/%.exe/}"
25366
25367    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25368    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25369  fi
25370
25371  else
25372    # We're on a posix platform. Hooray! :)
25373    # First separate the path from the arguments. This will split at the first
25374    # space.
25375    complete="$CXXCPP"
25376    path="${complete%% *}"
25377    tmp="$complete EOL"
25378    arguments="${tmp#* }"
25379
25380    # Cannot rely on the command "which" here since it doesn't always work.
25381    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25382    if test -z "$is_absolute_path"; then
25383      # Path to executable is not absolute. Find it.
25384      IFS_save="$IFS"
25385      IFS=:
25386      for p in $PATH; do
25387        if test -f "$p/$path" && test -x "$p/$path"; then
25388          new_path="$p/$path"
25389          break
25390        fi
25391      done
25392      IFS="$IFS_save"
25393    else
25394      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25395$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25396      new_path="$path"
25397    fi
25398
25399    if test "x$new_path" = x; then
25400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25401$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25402      has_space=`$ECHO "$complete" | $GREP " "`
25403      if test "x$has_space" != x; then
25404        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25405$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25406      fi
25407      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25408    fi
25409  fi
25410
25411  # Now join together the path and the arguments once again
25412  if test "x$arguments" != xEOL; then
25413    new_complete="$new_path ${arguments% *}"
25414  else
25415    new_complete="$new_path"
25416  fi
25417
25418  if test "x$complete" != "x$new_complete"; then
25419    CXXCPP="$new_complete"
25420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25421$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25422  fi
25423
25424
25425  if test "x$COMPILE_TYPE" != "xcross"; then
25426    # If we are not cross compiling, use the same compilers for
25427    # building the build platform executables. The cross-compilation
25428    # case needed to be done earlier, but this can only be done after
25429    # the native tools have been localized.
25430    BUILD_CC="$CC"
25431    BUILD_CXX="$CXX"
25432    BUILD_LD="$LD"
25433  fi
25434
25435  # for solaris we really need solaris tools, and not gnu equivalent
25436  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25437  #   starting to probe
25438  #
25439  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25440  #         so that it can be overriden --with-tools-dir
25441  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25442    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25443  fi
25444
25445  # Find the right assembler.
25446  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25447    # Extract the first word of "as", so it can be a program name with args.
25448set dummy as; ac_word=$2
25449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25450$as_echo_n "checking for $ac_word... " >&6; }
25451if ${ac_cv_path_AS+:} false; then :
25452  $as_echo_n "(cached) " >&6
25453else
25454  case $AS in
25455  [\\/]* | ?:[\\/]*)
25456  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25457  ;;
25458  *)
25459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25460for as_dir in $PATH
25461do
25462  IFS=$as_save_IFS
25463  test -z "$as_dir" && as_dir=.
25464    for ac_exec_ext in '' $ac_executable_extensions; do
25465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25466    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25468    break 2
25469  fi
25470done
25471  done
25472IFS=$as_save_IFS
25473
25474  ;;
25475esac
25476fi
25477AS=$ac_cv_path_AS
25478if test -n "$AS"; then
25479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25480$as_echo "$AS" >&6; }
25481else
25482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25483$as_echo "no" >&6; }
25484fi
25485
25486
25487
25488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25489
25490  # First separate the path from the arguments. This will split at the first
25491  # space.
25492  complete="$AS"
25493  path="${complete%% *}"
25494  tmp="$complete EOL"
25495  arguments="${tmp#* }"
25496
25497  # Input might be given as Windows format, start by converting to
25498  # unix format.
25499  new_path=`$CYGPATH -u "$path"`
25500
25501  # Now try to locate executable using which
25502  new_path=`$WHICH "$new_path" 2> /dev/null`
25503  # bat and cmd files are not always considered executable in cygwin causing which
25504  # to not find them
25505  if test "x$new_path" = x \
25506      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25507      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25508    new_path=`$CYGPATH -u "$path"`
25509  fi
25510  if test "x$new_path" = x; then
25511    # Oops. Which didn't find the executable.
25512    # The splitting of arguments from the executable at a space might have been incorrect,
25513    # since paths with space are more likely in Windows. Give it another try with the whole
25514    # argument.
25515    path="$complete"
25516    arguments="EOL"
25517    new_path=`$CYGPATH -u "$path"`
25518    new_path=`$WHICH "$new_path" 2> /dev/null`
25519    # bat and cmd files are not always considered executable in cygwin causing which
25520    # to not find them
25521    if test "x$new_path" = x \
25522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25524      new_path=`$CYGPATH -u "$path"`
25525    fi
25526    if test "x$new_path" = x; then
25527      # It's still not found. Now this is an unrecoverable error.
25528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25529$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25530      has_space=`$ECHO "$complete" | $GREP " "`
25531      if test "x$has_space" != x; then
25532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25534      fi
25535      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25536    fi
25537  fi
25538
25539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25542  # "foo.exe" is OK but "foo" is an error.
25543  #
25544  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25545  # It is also a way to make sure we got the proper file name for the real test later on.
25546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25547  if test "x$test_shortpath" = x; then
25548    # Short path failed, file does not exist as specified.
25549    # Try adding .exe or .cmd
25550    if test -f "${new_path}.exe"; then
25551      input_to_shortpath="${new_path}.exe"
25552    elif test -f "${new_path}.cmd"; then
25553      input_to_shortpath="${new_path}.cmd"
25554    else
25555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25556$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25557      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25558$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25559      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25560    fi
25561  else
25562    input_to_shortpath="$new_path"
25563  fi
25564
25565  # Call helper function which possibly converts this using DOS-style short mode.
25566  # If so, the updated path is stored in $new_path.
25567  new_path="$input_to_shortpath"
25568
25569  input_path="$input_to_shortpath"
25570  # Check if we need to convert this using DOS-style short mode. If the path
25571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25572  # take no chances and rewrite it.
25573  # Note: m4 eats our [], so we need to use [ and ] instead.
25574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25575  if test "x$has_forbidden_chars" != x; then
25576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25580      # Going to short mode and back again did indeed matter. Since short mode is
25581      # case insensitive, let's make it lowercase to improve readability.
25582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25583      # Now convert it back to Unix-stile (cygpath)
25584      input_path=`$CYGPATH -u "$shortmode_path"`
25585      new_path="$input_path"
25586    fi
25587  fi
25588
25589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25590  if test "x$test_cygdrive_prefix" = x; then
25591    # As a simple fix, exclude /usr/bin since it's not a real path.
25592    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25594      # a path prefixed by /cygdrive for fixpath to work.
25595      new_path="$CYGWIN_ROOT_PATH$input_path"
25596    fi
25597  fi
25598
25599  # remove trailing .exe if any
25600  new_path="${new_path/%.exe/}"
25601
25602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25603
25604  # First separate the path from the arguments. This will split at the first
25605  # space.
25606  complete="$AS"
25607  path="${complete%% *}"
25608  tmp="$complete EOL"
25609  arguments="${tmp#* }"
25610
25611  # Input might be given as Windows format, start by converting to
25612  # unix format.
25613  new_path="$path"
25614
25615  windows_path="$new_path"
25616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25617    unix_path=`$CYGPATH -u "$windows_path"`
25618    new_path="$unix_path"
25619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25621    new_path="$unix_path"
25622  fi
25623
25624
25625  # Now try to locate executable using which
25626  new_path=`$WHICH "$new_path" 2> /dev/null`
25627
25628  if test "x$new_path" = x; then
25629    # Oops. Which didn't find the executable.
25630    # The splitting of arguments from the executable at a space might have been incorrect,
25631    # since paths with space are more likely in Windows. Give it another try with the whole
25632    # argument.
25633    path="$complete"
25634    arguments="EOL"
25635    new_path="$path"
25636
25637  windows_path="$new_path"
25638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25639    unix_path=`$CYGPATH -u "$windows_path"`
25640    new_path="$unix_path"
25641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25643    new_path="$unix_path"
25644  fi
25645
25646
25647    new_path=`$WHICH "$new_path" 2> /dev/null`
25648
25649    if test "x$new_path" = x; then
25650      # It's still not found. Now this is an unrecoverable error.
25651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25652$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25653      has_space=`$ECHO "$complete" | $GREP " "`
25654      if test "x$has_space" != x; then
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25657      fi
25658      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25659    fi
25660  fi
25661
25662  # Now new_path has a complete unix path to the binary
25663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25664    # Keep paths in /bin as-is, but remove trailing .exe if any
25665    new_path="${new_path/%.exe/}"
25666    # Do not save /bin paths to all_fixpath_prefixes!
25667  else
25668    # Not in mixed or Windows style, start by that.
25669    new_path=`cmd //c echo $new_path`
25670
25671  input_path="$new_path"
25672  # Check if we need to convert this using DOS-style short mode. If the path
25673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25674  # take no chances and rewrite it.
25675  # Note: m4 eats our [], so we need to use [ and ] instead.
25676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25677  if test "x$has_forbidden_chars" != x; then
25678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25680  fi
25681
25682    # Output is in $new_path
25683
25684  windows_path="$new_path"
25685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686    unix_path=`$CYGPATH -u "$windows_path"`
25687    new_path="$unix_path"
25688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25690    new_path="$unix_path"
25691  fi
25692
25693    # remove trailing .exe if any
25694    new_path="${new_path/%.exe/}"
25695
25696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25698  fi
25699
25700  else
25701    # We're on a posix platform. Hooray! :)
25702    # First separate the path from the arguments. This will split at the first
25703    # space.
25704    complete="$AS"
25705    path="${complete%% *}"
25706    tmp="$complete EOL"
25707    arguments="${tmp#* }"
25708
25709    # Cannot rely on the command "which" here since it doesn't always work.
25710    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25711    if test -z "$is_absolute_path"; then
25712      # Path to executable is not absolute. Find it.
25713      IFS_save="$IFS"
25714      IFS=:
25715      for p in $PATH; do
25716        if test -f "$p/$path" && test -x "$p/$path"; then
25717          new_path="$p/$path"
25718          break
25719        fi
25720      done
25721      IFS="$IFS_save"
25722    else
25723      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25724$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25725      new_path="$path"
25726    fi
25727
25728    if test "x$new_path" = x; then
25729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25730$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25731      has_space=`$ECHO "$complete" | $GREP " "`
25732      if test "x$has_space" != x; then
25733        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25735      fi
25736      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25737    fi
25738  fi
25739
25740  # Now join together the path and the arguments once again
25741  if test "x$arguments" != xEOL; then
25742    new_complete="$new_path ${arguments% *}"
25743  else
25744    new_complete="$new_path"
25745  fi
25746
25747  if test "x$complete" != "x$new_complete"; then
25748    AS="$new_complete"
25749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25750$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25751  fi
25752
25753  else
25754    AS="$CC -c"
25755  fi
25756
25757
25758  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25759    # Extract the first word of "nm", so it can be a program name with args.
25760set dummy nm; ac_word=$2
25761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25762$as_echo_n "checking for $ac_word... " >&6; }
25763if ${ac_cv_path_NM+:} false; then :
25764  $as_echo_n "(cached) " >&6
25765else
25766  case $NM in
25767  [\\/]* | ?:[\\/]*)
25768  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25769  ;;
25770  *)
25771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25772for as_dir in $PATH
25773do
25774  IFS=$as_save_IFS
25775  test -z "$as_dir" && as_dir=.
25776    for ac_exec_ext in '' $ac_executable_extensions; do
25777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25778    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25780    break 2
25781  fi
25782done
25783  done
25784IFS=$as_save_IFS
25785
25786  ;;
25787esac
25788fi
25789NM=$ac_cv_path_NM
25790if test -n "$NM"; then
25791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25792$as_echo "$NM" >&6; }
25793else
25794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25795$as_echo "no" >&6; }
25796fi
25797
25798
25799
25800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25801
25802  # First separate the path from the arguments. This will split at the first
25803  # space.
25804  complete="$NM"
25805  path="${complete%% *}"
25806  tmp="$complete EOL"
25807  arguments="${tmp#* }"
25808
25809  # Input might be given as Windows format, start by converting to
25810  # unix format.
25811  new_path=`$CYGPATH -u "$path"`
25812
25813  # Now try to locate executable using which
25814  new_path=`$WHICH "$new_path" 2> /dev/null`
25815  # bat and cmd files are not always considered executable in cygwin causing which
25816  # to not find them
25817  if test "x$new_path" = x \
25818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25820    new_path=`$CYGPATH -u "$path"`
25821  fi
25822  if test "x$new_path" = x; then
25823    # Oops. Which didn't find the executable.
25824    # The splitting of arguments from the executable at a space might have been incorrect,
25825    # since paths with space are more likely in Windows. Give it another try with the whole
25826    # argument.
25827    path="$complete"
25828    arguments="EOL"
25829    new_path=`$CYGPATH -u "$path"`
25830    new_path=`$WHICH "$new_path" 2> /dev/null`
25831    # bat and cmd files are not always considered executable in cygwin causing which
25832    # to not find them
25833    if test "x$new_path" = x \
25834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25836      new_path=`$CYGPATH -u "$path"`
25837    fi
25838    if test "x$new_path" = x; then
25839      # It's still not found. Now this is an unrecoverable error.
25840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25841$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25842      has_space=`$ECHO "$complete" | $GREP " "`
25843      if test "x$has_space" != x; then
25844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25846      fi
25847      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25848    fi
25849  fi
25850
25851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25854  # "foo.exe" is OK but "foo" is an error.
25855  #
25856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25857  # It is also a way to make sure we got the proper file name for the real test later on.
25858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25859  if test "x$test_shortpath" = x; then
25860    # Short path failed, file does not exist as specified.
25861    # Try adding .exe or .cmd
25862    if test -f "${new_path}.exe"; then
25863      input_to_shortpath="${new_path}.exe"
25864    elif test -f "${new_path}.cmd"; then
25865      input_to_shortpath="${new_path}.cmd"
25866    else
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25868$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25871      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25872    fi
25873  else
25874    input_to_shortpath="$new_path"
25875  fi
25876
25877  # Call helper function which possibly converts this using DOS-style short mode.
25878  # If so, the updated path is stored in $new_path.
25879  new_path="$input_to_shortpath"
25880
25881  input_path="$input_to_shortpath"
25882  # Check if we need to convert this using DOS-style short mode. If the path
25883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25884  # take no chances and rewrite it.
25885  # Note: m4 eats our [], so we need to use [ and ] instead.
25886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25887  if test "x$has_forbidden_chars" != x; then
25888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25892      # Going to short mode and back again did indeed matter. Since short mode is
25893      # case insensitive, let's make it lowercase to improve readability.
25894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25895      # Now convert it back to Unix-stile (cygpath)
25896      input_path=`$CYGPATH -u "$shortmode_path"`
25897      new_path="$input_path"
25898    fi
25899  fi
25900
25901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25902  if test "x$test_cygdrive_prefix" = x; then
25903    # As a simple fix, exclude /usr/bin since it's not a real path.
25904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25906      # a path prefixed by /cygdrive for fixpath to work.
25907      new_path="$CYGWIN_ROOT_PATH$input_path"
25908    fi
25909  fi
25910
25911  # remove trailing .exe if any
25912  new_path="${new_path/%.exe/}"
25913
25914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25915
25916  # First separate the path from the arguments. This will split at the first
25917  # space.
25918  complete="$NM"
25919  path="${complete%% *}"
25920  tmp="$complete EOL"
25921  arguments="${tmp#* }"
25922
25923  # Input might be given as Windows format, start by converting to
25924  # unix format.
25925  new_path="$path"
25926
25927  windows_path="$new_path"
25928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25929    unix_path=`$CYGPATH -u "$windows_path"`
25930    new_path="$unix_path"
25931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25933    new_path="$unix_path"
25934  fi
25935
25936
25937  # Now try to locate executable using which
25938  new_path=`$WHICH "$new_path" 2> /dev/null`
25939
25940  if test "x$new_path" = x; then
25941    # Oops. Which didn't find the executable.
25942    # The splitting of arguments from the executable at a space might have been incorrect,
25943    # since paths with space are more likely in Windows. Give it another try with the whole
25944    # argument.
25945    path="$complete"
25946    arguments="EOL"
25947    new_path="$path"
25948
25949  windows_path="$new_path"
25950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25951    unix_path=`$CYGPATH -u "$windows_path"`
25952    new_path="$unix_path"
25953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25955    new_path="$unix_path"
25956  fi
25957
25958
25959    new_path=`$WHICH "$new_path" 2> /dev/null`
25960
25961    if test "x$new_path" = x; then
25962      # It's still not found. Now this is an unrecoverable error.
25963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25964$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25965      has_space=`$ECHO "$complete" | $GREP " "`
25966      if test "x$has_space" != x; then
25967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25969      fi
25970      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25971    fi
25972  fi
25973
25974  # Now new_path has a complete unix path to the binary
25975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25976    # Keep paths in /bin as-is, but remove trailing .exe if any
25977    new_path="${new_path/%.exe/}"
25978    # Do not save /bin paths to all_fixpath_prefixes!
25979  else
25980    # Not in mixed or Windows style, start by that.
25981    new_path=`cmd //c echo $new_path`
25982
25983  input_path="$new_path"
25984  # Check if we need to convert this using DOS-style short mode. If the path
25985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25986  # take no chances and rewrite it.
25987  # Note: m4 eats our [], so we need to use [ and ] instead.
25988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25989  if test "x$has_forbidden_chars" != x; then
25990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25992  fi
25993
25994    # Output is in $new_path
25995
25996  windows_path="$new_path"
25997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25998    unix_path=`$CYGPATH -u "$windows_path"`
25999    new_path="$unix_path"
26000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26002    new_path="$unix_path"
26003  fi
26004
26005    # remove trailing .exe if any
26006    new_path="${new_path/%.exe/}"
26007
26008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26010  fi
26011
26012  else
26013    # We're on a posix platform. Hooray! :)
26014    # First separate the path from the arguments. This will split at the first
26015    # space.
26016    complete="$NM"
26017    path="${complete%% *}"
26018    tmp="$complete EOL"
26019    arguments="${tmp#* }"
26020
26021    # Cannot rely on the command "which" here since it doesn't always work.
26022    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26023    if test -z "$is_absolute_path"; then
26024      # Path to executable is not absolute. Find it.
26025      IFS_save="$IFS"
26026      IFS=:
26027      for p in $PATH; do
26028        if test -f "$p/$path" && test -x "$p/$path"; then
26029          new_path="$p/$path"
26030          break
26031        fi
26032      done
26033      IFS="$IFS_save"
26034    else
26035      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26036$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26037      new_path="$path"
26038    fi
26039
26040    if test "x$new_path" = x; then
26041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26042$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26043      has_space=`$ECHO "$complete" | $GREP " "`
26044      if test "x$has_space" != x; then
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26047      fi
26048      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26049    fi
26050  fi
26051
26052  # Now join together the path and the arguments once again
26053  if test "x$arguments" != xEOL; then
26054    new_complete="$new_path ${arguments% *}"
26055  else
26056    new_complete="$new_path"
26057  fi
26058
26059  if test "x$complete" != "x$new_complete"; then
26060    NM="$new_complete"
26061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26062$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26063  fi
26064
26065    # Extract the first word of "gnm", so it can be a program name with args.
26066set dummy gnm; ac_word=$2
26067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26068$as_echo_n "checking for $ac_word... " >&6; }
26069if ${ac_cv_path_GNM+:} false; then :
26070  $as_echo_n "(cached) " >&6
26071else
26072  case $GNM in
26073  [\\/]* | ?:[\\/]*)
26074  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26075  ;;
26076  *)
26077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26078for as_dir in $PATH
26079do
26080  IFS=$as_save_IFS
26081  test -z "$as_dir" && as_dir=.
26082    for ac_exec_ext in '' $ac_executable_extensions; do
26083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26084    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26086    break 2
26087  fi
26088done
26089  done
26090IFS=$as_save_IFS
26091
26092  ;;
26093esac
26094fi
26095GNM=$ac_cv_path_GNM
26096if test -n "$GNM"; then
26097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26098$as_echo "$GNM" >&6; }
26099else
26100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26101$as_echo "no" >&6; }
26102fi
26103
26104
26105
26106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26107
26108  # First separate the path from the arguments. This will split at the first
26109  # space.
26110  complete="$GNM"
26111  path="${complete%% *}"
26112  tmp="$complete EOL"
26113  arguments="${tmp#* }"
26114
26115  # Input might be given as Windows format, start by converting to
26116  # unix format.
26117  new_path=`$CYGPATH -u "$path"`
26118
26119  # Now try to locate executable using which
26120  new_path=`$WHICH "$new_path" 2> /dev/null`
26121  # bat and cmd files are not always considered executable in cygwin causing which
26122  # to not find them
26123  if test "x$new_path" = x \
26124      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26125      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26126    new_path=`$CYGPATH -u "$path"`
26127  fi
26128  if test "x$new_path" = x; then
26129    # Oops. Which didn't find the executable.
26130    # The splitting of arguments from the executable at a space might have been incorrect,
26131    # since paths with space are more likely in Windows. Give it another try with the whole
26132    # argument.
26133    path="$complete"
26134    arguments="EOL"
26135    new_path=`$CYGPATH -u "$path"`
26136    new_path=`$WHICH "$new_path" 2> /dev/null`
26137    # bat and cmd files are not always considered executable in cygwin causing which
26138    # to not find them
26139    if test "x$new_path" = x \
26140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26142      new_path=`$CYGPATH -u "$path"`
26143    fi
26144    if test "x$new_path" = x; then
26145      # It's still not found. Now this is an unrecoverable error.
26146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26147$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26148      has_space=`$ECHO "$complete" | $GREP " "`
26149      if test "x$has_space" != x; then
26150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26152      fi
26153      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26154    fi
26155  fi
26156
26157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26160  # "foo.exe" is OK but "foo" is an error.
26161  #
26162  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26163  # It is also a way to make sure we got the proper file name for the real test later on.
26164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26165  if test "x$test_shortpath" = x; then
26166    # Short path failed, file does not exist as specified.
26167    # Try adding .exe or .cmd
26168    if test -f "${new_path}.exe"; then
26169      input_to_shortpath="${new_path}.exe"
26170    elif test -f "${new_path}.cmd"; then
26171      input_to_shortpath="${new_path}.cmd"
26172    else
26173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26174$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26177      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26178    fi
26179  else
26180    input_to_shortpath="$new_path"
26181  fi
26182
26183  # Call helper function which possibly converts this using DOS-style short mode.
26184  # If so, the updated path is stored in $new_path.
26185  new_path="$input_to_shortpath"
26186
26187  input_path="$input_to_shortpath"
26188  # Check if we need to convert this using DOS-style short mode. If the path
26189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26190  # take no chances and rewrite it.
26191  # Note: m4 eats our [], so we need to use [ and ] instead.
26192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26193  if test "x$has_forbidden_chars" != x; then
26194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26198      # Going to short mode and back again did indeed matter. Since short mode is
26199      # case insensitive, let's make it lowercase to improve readability.
26200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26201      # Now convert it back to Unix-stile (cygpath)
26202      input_path=`$CYGPATH -u "$shortmode_path"`
26203      new_path="$input_path"
26204    fi
26205  fi
26206
26207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26208  if test "x$test_cygdrive_prefix" = x; then
26209    # As a simple fix, exclude /usr/bin since it's not a real path.
26210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26212      # a path prefixed by /cygdrive for fixpath to work.
26213      new_path="$CYGWIN_ROOT_PATH$input_path"
26214    fi
26215  fi
26216
26217  # remove trailing .exe if any
26218  new_path="${new_path/%.exe/}"
26219
26220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26221
26222  # First separate the path from the arguments. This will split at the first
26223  # space.
26224  complete="$GNM"
26225  path="${complete%% *}"
26226  tmp="$complete EOL"
26227  arguments="${tmp#* }"
26228
26229  # Input might be given as Windows format, start by converting to
26230  # unix format.
26231  new_path="$path"
26232
26233  windows_path="$new_path"
26234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26235    unix_path=`$CYGPATH -u "$windows_path"`
26236    new_path="$unix_path"
26237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26239    new_path="$unix_path"
26240  fi
26241
26242
26243  # Now try to locate executable using which
26244  new_path=`$WHICH "$new_path" 2> /dev/null`
26245
26246  if test "x$new_path" = x; then
26247    # Oops. Which didn't find the executable.
26248    # The splitting of arguments from the executable at a space might have been incorrect,
26249    # since paths with space are more likely in Windows. Give it another try with the whole
26250    # argument.
26251    path="$complete"
26252    arguments="EOL"
26253    new_path="$path"
26254
26255  windows_path="$new_path"
26256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26257    unix_path=`$CYGPATH -u "$windows_path"`
26258    new_path="$unix_path"
26259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26261    new_path="$unix_path"
26262  fi
26263
26264
26265    new_path=`$WHICH "$new_path" 2> /dev/null`
26266
26267    if test "x$new_path" = x; then
26268      # It's still not found. Now this is an unrecoverable error.
26269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26270$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26271      has_space=`$ECHO "$complete" | $GREP " "`
26272      if test "x$has_space" != x; then
26273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26275      fi
26276      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26277    fi
26278  fi
26279
26280  # Now new_path has a complete unix path to the binary
26281  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26282    # Keep paths in /bin as-is, but remove trailing .exe if any
26283    new_path="${new_path/%.exe/}"
26284    # Do not save /bin paths to all_fixpath_prefixes!
26285  else
26286    # Not in mixed or Windows style, start by that.
26287    new_path=`cmd //c echo $new_path`
26288
26289  input_path="$new_path"
26290  # Check if we need to convert this using DOS-style short mode. If the path
26291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26292  # take no chances and rewrite it.
26293  # Note: m4 eats our [], so we need to use [ and ] instead.
26294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26295  if test "x$has_forbidden_chars" != x; then
26296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26298  fi
26299
26300    # Output is in $new_path
26301
26302  windows_path="$new_path"
26303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26304    unix_path=`$CYGPATH -u "$windows_path"`
26305    new_path="$unix_path"
26306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26308    new_path="$unix_path"
26309  fi
26310
26311    # remove trailing .exe if any
26312    new_path="${new_path/%.exe/}"
26313
26314    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26315    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26316  fi
26317
26318  else
26319    # We're on a posix platform. Hooray! :)
26320    # First separate the path from the arguments. This will split at the first
26321    # space.
26322    complete="$GNM"
26323    path="${complete%% *}"
26324    tmp="$complete EOL"
26325    arguments="${tmp#* }"
26326
26327    # Cannot rely on the command "which" here since it doesn't always work.
26328    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26329    if test -z "$is_absolute_path"; then
26330      # Path to executable is not absolute. Find it.
26331      IFS_save="$IFS"
26332      IFS=:
26333      for p in $PATH; do
26334        if test -f "$p/$path" && test -x "$p/$path"; then
26335          new_path="$p/$path"
26336          break
26337        fi
26338      done
26339      IFS="$IFS_save"
26340    else
26341      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26342$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26343      new_path="$path"
26344    fi
26345
26346    if test "x$new_path" = x; then
26347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26348$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26349      has_space=`$ECHO "$complete" | $GREP " "`
26350      if test "x$has_space" != x; then
26351        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26352$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26353      fi
26354      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26355    fi
26356  fi
26357
26358  # Now join together the path and the arguments once again
26359  if test "x$arguments" != xEOL; then
26360    new_complete="$new_path ${arguments% *}"
26361  else
26362    new_complete="$new_path"
26363  fi
26364
26365  if test "x$complete" != "x$new_complete"; then
26366    GNM="$new_complete"
26367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26368$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26369  fi
26370
26371    # Extract the first word of "strip", so it can be a program name with args.
26372set dummy strip; ac_word=$2
26373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26374$as_echo_n "checking for $ac_word... " >&6; }
26375if ${ac_cv_path_STRIP+:} false; then :
26376  $as_echo_n "(cached) " >&6
26377else
26378  case $STRIP in
26379  [\\/]* | ?:[\\/]*)
26380  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26381  ;;
26382  *)
26383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26384for as_dir in $PATH
26385do
26386  IFS=$as_save_IFS
26387  test -z "$as_dir" && as_dir=.
26388    for ac_exec_ext in '' $ac_executable_extensions; do
26389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26390    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26392    break 2
26393  fi
26394done
26395  done
26396IFS=$as_save_IFS
26397
26398  ;;
26399esac
26400fi
26401STRIP=$ac_cv_path_STRIP
26402if test -n "$STRIP"; then
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26404$as_echo "$STRIP" >&6; }
26405else
26406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26407$as_echo "no" >&6; }
26408fi
26409
26410
26411
26412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26413
26414  # First separate the path from the arguments. This will split at the first
26415  # space.
26416  complete="$STRIP"
26417  path="${complete%% *}"
26418  tmp="$complete EOL"
26419  arguments="${tmp#* }"
26420
26421  # Input might be given as Windows format, start by converting to
26422  # unix format.
26423  new_path=`$CYGPATH -u "$path"`
26424
26425  # Now try to locate executable using which
26426  new_path=`$WHICH "$new_path" 2> /dev/null`
26427  # bat and cmd files are not always considered executable in cygwin causing which
26428  # to not find them
26429  if test "x$new_path" = x \
26430      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26431      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26432    new_path=`$CYGPATH -u "$path"`
26433  fi
26434  if test "x$new_path" = x; then
26435    # Oops. Which didn't find the executable.
26436    # The splitting of arguments from the executable at a space might have been incorrect,
26437    # since paths with space are more likely in Windows. Give it another try with the whole
26438    # argument.
26439    path="$complete"
26440    arguments="EOL"
26441    new_path=`$CYGPATH -u "$path"`
26442    new_path=`$WHICH "$new_path" 2> /dev/null`
26443    # bat and cmd files are not always considered executable in cygwin causing which
26444    # to not find them
26445    if test "x$new_path" = x \
26446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26448      new_path=`$CYGPATH -u "$path"`
26449    fi
26450    if test "x$new_path" = x; then
26451      # It's still not found. Now this is an unrecoverable error.
26452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26453$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26454      has_space=`$ECHO "$complete" | $GREP " "`
26455      if test "x$has_space" != x; then
26456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26458      fi
26459      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26460    fi
26461  fi
26462
26463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26466  # "foo.exe" is OK but "foo" is an error.
26467  #
26468  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26469  # It is also a way to make sure we got the proper file name for the real test later on.
26470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26471  if test "x$test_shortpath" = x; then
26472    # Short path failed, file does not exist as specified.
26473    # Try adding .exe or .cmd
26474    if test -f "${new_path}.exe"; then
26475      input_to_shortpath="${new_path}.exe"
26476    elif test -f "${new_path}.cmd"; then
26477      input_to_shortpath="${new_path}.cmd"
26478    else
26479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26480$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26481      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26482$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26483      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26484    fi
26485  else
26486    input_to_shortpath="$new_path"
26487  fi
26488
26489  # Call helper function which possibly converts this using DOS-style short mode.
26490  # If so, the updated path is stored in $new_path.
26491  new_path="$input_to_shortpath"
26492
26493  input_path="$input_to_shortpath"
26494  # Check if we need to convert this using DOS-style short mode. If the path
26495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26496  # take no chances and rewrite it.
26497  # Note: m4 eats our [], so we need to use [ and ] instead.
26498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26499  if test "x$has_forbidden_chars" != x; then
26500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26504      # Going to short mode and back again did indeed matter. Since short mode is
26505      # case insensitive, let's make it lowercase to improve readability.
26506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26507      # Now convert it back to Unix-stile (cygpath)
26508      input_path=`$CYGPATH -u "$shortmode_path"`
26509      new_path="$input_path"
26510    fi
26511  fi
26512
26513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26514  if test "x$test_cygdrive_prefix" = x; then
26515    # As a simple fix, exclude /usr/bin since it's not a real path.
26516    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26518      # a path prefixed by /cygdrive for fixpath to work.
26519      new_path="$CYGWIN_ROOT_PATH$input_path"
26520    fi
26521  fi
26522
26523  # remove trailing .exe if any
26524  new_path="${new_path/%.exe/}"
26525
26526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26527
26528  # First separate the path from the arguments. This will split at the first
26529  # space.
26530  complete="$STRIP"
26531  path="${complete%% *}"
26532  tmp="$complete EOL"
26533  arguments="${tmp#* }"
26534
26535  # Input might be given as Windows format, start by converting to
26536  # unix format.
26537  new_path="$path"
26538
26539  windows_path="$new_path"
26540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26541    unix_path=`$CYGPATH -u "$windows_path"`
26542    new_path="$unix_path"
26543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26545    new_path="$unix_path"
26546  fi
26547
26548
26549  # Now try to locate executable using which
26550  new_path=`$WHICH "$new_path" 2> /dev/null`
26551
26552  if test "x$new_path" = x; then
26553    # Oops. Which didn't find the executable.
26554    # The splitting of arguments from the executable at a space might have been incorrect,
26555    # since paths with space are more likely in Windows. Give it another try with the whole
26556    # argument.
26557    path="$complete"
26558    arguments="EOL"
26559    new_path="$path"
26560
26561  windows_path="$new_path"
26562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26563    unix_path=`$CYGPATH -u "$windows_path"`
26564    new_path="$unix_path"
26565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26567    new_path="$unix_path"
26568  fi
26569
26570
26571    new_path=`$WHICH "$new_path" 2> /dev/null`
26572
26573    if test "x$new_path" = x; then
26574      # It's still not found. Now this is an unrecoverable error.
26575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26577      has_space=`$ECHO "$complete" | $GREP " "`
26578      if test "x$has_space" != x; then
26579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26581      fi
26582      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26583    fi
26584  fi
26585
26586  # Now new_path has a complete unix path to the binary
26587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26588    # Keep paths in /bin as-is, but remove trailing .exe if any
26589    new_path="${new_path/%.exe/}"
26590    # Do not save /bin paths to all_fixpath_prefixes!
26591  else
26592    # Not in mixed or Windows style, start by that.
26593    new_path=`cmd //c echo $new_path`
26594
26595  input_path="$new_path"
26596  # Check if we need to convert this using DOS-style short mode. If the path
26597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26598  # take no chances and rewrite it.
26599  # Note: m4 eats our [], so we need to use [ and ] instead.
26600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26601  if test "x$has_forbidden_chars" != x; then
26602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26604  fi
26605
26606    # Output is in $new_path
26607
26608  windows_path="$new_path"
26609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26610    unix_path=`$CYGPATH -u "$windows_path"`
26611    new_path="$unix_path"
26612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26614    new_path="$unix_path"
26615  fi
26616
26617    # remove trailing .exe if any
26618    new_path="${new_path/%.exe/}"
26619
26620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26622  fi
26623
26624  else
26625    # We're on a posix platform. Hooray! :)
26626    # First separate the path from the arguments. This will split at the first
26627    # space.
26628    complete="$STRIP"
26629    path="${complete%% *}"
26630    tmp="$complete EOL"
26631    arguments="${tmp#* }"
26632
26633    # Cannot rely on the command "which" here since it doesn't always work.
26634    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26635    if test -z "$is_absolute_path"; then
26636      # Path to executable is not absolute. Find it.
26637      IFS_save="$IFS"
26638      IFS=:
26639      for p in $PATH; do
26640        if test -f "$p/$path" && test -x "$p/$path"; then
26641          new_path="$p/$path"
26642          break
26643        fi
26644      done
26645      IFS="$IFS_save"
26646    else
26647      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26648$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26649      new_path="$path"
26650    fi
26651
26652    if test "x$new_path" = x; then
26653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26654$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26655      has_space=`$ECHO "$complete" | $GREP " "`
26656      if test "x$has_space" != x; then
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26658$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26659      fi
26660      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26661    fi
26662  fi
26663
26664  # Now join together the path and the arguments once again
26665  if test "x$arguments" != xEOL; then
26666    new_complete="$new_path ${arguments% *}"
26667  else
26668    new_complete="$new_path"
26669  fi
26670
26671  if test "x$complete" != "x$new_complete"; then
26672    STRIP="$new_complete"
26673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26674$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26675  fi
26676
26677    # Extract the first word of "mcs", so it can be a program name with args.
26678set dummy mcs; ac_word=$2
26679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26680$as_echo_n "checking for $ac_word... " >&6; }
26681if ${ac_cv_path_MCS+:} false; then :
26682  $as_echo_n "(cached) " >&6
26683else
26684  case $MCS in
26685  [\\/]* | ?:[\\/]*)
26686  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26687  ;;
26688  *)
26689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26690for as_dir in $PATH
26691do
26692  IFS=$as_save_IFS
26693  test -z "$as_dir" && as_dir=.
26694    for ac_exec_ext in '' $ac_executable_extensions; do
26695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26696    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26698    break 2
26699  fi
26700done
26701  done
26702IFS=$as_save_IFS
26703
26704  ;;
26705esac
26706fi
26707MCS=$ac_cv_path_MCS
26708if test -n "$MCS"; then
26709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26710$as_echo "$MCS" >&6; }
26711else
26712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26713$as_echo "no" >&6; }
26714fi
26715
26716
26717
26718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26719
26720  # First separate the path from the arguments. This will split at the first
26721  # space.
26722  complete="$MCS"
26723  path="${complete%% *}"
26724  tmp="$complete EOL"
26725  arguments="${tmp#* }"
26726
26727  # Input might be given as Windows format, start by converting to
26728  # unix format.
26729  new_path=`$CYGPATH -u "$path"`
26730
26731  # Now try to locate executable using which
26732  new_path=`$WHICH "$new_path" 2> /dev/null`
26733  # bat and cmd files are not always considered executable in cygwin causing which
26734  # to not find them
26735  if test "x$new_path" = x \
26736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26738    new_path=`$CYGPATH -u "$path"`
26739  fi
26740  if test "x$new_path" = x; then
26741    # Oops. Which didn't find the executable.
26742    # The splitting of arguments from the executable at a space might have been incorrect,
26743    # since paths with space are more likely in Windows. Give it another try with the whole
26744    # argument.
26745    path="$complete"
26746    arguments="EOL"
26747    new_path=`$CYGPATH -u "$path"`
26748    new_path=`$WHICH "$new_path" 2> /dev/null`
26749    # bat and cmd files are not always considered executable in cygwin causing which
26750    # to not find them
26751    if test "x$new_path" = x \
26752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26754      new_path=`$CYGPATH -u "$path"`
26755    fi
26756    if test "x$new_path" = x; then
26757      # It's still not found. Now this is an unrecoverable error.
26758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26759$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26760      has_space=`$ECHO "$complete" | $GREP " "`
26761      if test "x$has_space" != x; then
26762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26764      fi
26765      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26766    fi
26767  fi
26768
26769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26772  # "foo.exe" is OK but "foo" is an error.
26773  #
26774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26775  # It is also a way to make sure we got the proper file name for the real test later on.
26776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26777  if test "x$test_shortpath" = x; then
26778    # Short path failed, file does not exist as specified.
26779    # Try adding .exe or .cmd
26780    if test -f "${new_path}.exe"; then
26781      input_to_shortpath="${new_path}.exe"
26782    elif test -f "${new_path}.cmd"; then
26783      input_to_shortpath="${new_path}.cmd"
26784    else
26785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26786$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26789      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26790    fi
26791  else
26792    input_to_shortpath="$new_path"
26793  fi
26794
26795  # Call helper function which possibly converts this using DOS-style short mode.
26796  # If so, the updated path is stored in $new_path.
26797  new_path="$input_to_shortpath"
26798
26799  input_path="$input_to_shortpath"
26800  # Check if we need to convert this using DOS-style short mode. If the path
26801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26802  # take no chances and rewrite it.
26803  # Note: m4 eats our [], so we need to use [ and ] instead.
26804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26805  if test "x$has_forbidden_chars" != x; then
26806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26810      # Going to short mode and back again did indeed matter. Since short mode is
26811      # case insensitive, let's make it lowercase to improve readability.
26812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26813      # Now convert it back to Unix-stile (cygpath)
26814      input_path=`$CYGPATH -u "$shortmode_path"`
26815      new_path="$input_path"
26816    fi
26817  fi
26818
26819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26820  if test "x$test_cygdrive_prefix" = x; then
26821    # As a simple fix, exclude /usr/bin since it's not a real path.
26822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26824      # a path prefixed by /cygdrive for fixpath to work.
26825      new_path="$CYGWIN_ROOT_PATH$input_path"
26826    fi
26827  fi
26828
26829  # remove trailing .exe if any
26830  new_path="${new_path/%.exe/}"
26831
26832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26833
26834  # First separate the path from the arguments. This will split at the first
26835  # space.
26836  complete="$MCS"
26837  path="${complete%% *}"
26838  tmp="$complete EOL"
26839  arguments="${tmp#* }"
26840
26841  # Input might be given as Windows format, start by converting to
26842  # unix format.
26843  new_path="$path"
26844
26845  windows_path="$new_path"
26846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26847    unix_path=`$CYGPATH -u "$windows_path"`
26848    new_path="$unix_path"
26849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26851    new_path="$unix_path"
26852  fi
26853
26854
26855  # Now try to locate executable using which
26856  new_path=`$WHICH "$new_path" 2> /dev/null`
26857
26858  if test "x$new_path" = x; then
26859    # Oops. Which didn't find the executable.
26860    # The splitting of arguments from the executable at a space might have been incorrect,
26861    # since paths with space are more likely in Windows. Give it another try with the whole
26862    # argument.
26863    path="$complete"
26864    arguments="EOL"
26865    new_path="$path"
26866
26867  windows_path="$new_path"
26868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26869    unix_path=`$CYGPATH -u "$windows_path"`
26870    new_path="$unix_path"
26871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26873    new_path="$unix_path"
26874  fi
26875
26876
26877    new_path=`$WHICH "$new_path" 2> /dev/null`
26878
26879    if test "x$new_path" = x; then
26880      # It's still not found. Now this is an unrecoverable error.
26881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26882$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26883      has_space=`$ECHO "$complete" | $GREP " "`
26884      if test "x$has_space" != x; then
26885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26887      fi
26888      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26889    fi
26890  fi
26891
26892  # Now new_path has a complete unix path to the binary
26893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26894    # Keep paths in /bin as-is, but remove trailing .exe if any
26895    new_path="${new_path/%.exe/}"
26896    # Do not save /bin paths to all_fixpath_prefixes!
26897  else
26898    # Not in mixed or Windows style, start by that.
26899    new_path=`cmd //c echo $new_path`
26900
26901  input_path="$new_path"
26902  # Check if we need to convert this using DOS-style short mode. If the path
26903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26904  # take no chances and rewrite it.
26905  # Note: m4 eats our [], so we need to use [ and ] instead.
26906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26907  if test "x$has_forbidden_chars" != x; then
26908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26910  fi
26911
26912    # Output is in $new_path
26913
26914  windows_path="$new_path"
26915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26916    unix_path=`$CYGPATH -u "$windows_path"`
26917    new_path="$unix_path"
26918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26920    new_path="$unix_path"
26921  fi
26922
26923    # remove trailing .exe if any
26924    new_path="${new_path/%.exe/}"
26925
26926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26928  fi
26929
26930  else
26931    # We're on a posix platform. Hooray! :)
26932    # First separate the path from the arguments. This will split at the first
26933    # space.
26934    complete="$MCS"
26935    path="${complete%% *}"
26936    tmp="$complete EOL"
26937    arguments="${tmp#* }"
26938
26939    # Cannot rely on the command "which" here since it doesn't always work.
26940    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26941    if test -z "$is_absolute_path"; then
26942      # Path to executable is not absolute. Find it.
26943      IFS_save="$IFS"
26944      IFS=:
26945      for p in $PATH; do
26946        if test -f "$p/$path" && test -x "$p/$path"; then
26947          new_path="$p/$path"
26948          break
26949        fi
26950      done
26951      IFS="$IFS_save"
26952    else
26953      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26954$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26955      new_path="$path"
26956    fi
26957
26958    if test "x$new_path" = x; then
26959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26960$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26961      has_space=`$ECHO "$complete" | $GREP " "`
26962      if test "x$has_space" != x; then
26963        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26964$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26965      fi
26966      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26967    fi
26968  fi
26969
26970  # Now join together the path and the arguments once again
26971  if test "x$arguments" != xEOL; then
26972    new_complete="$new_path ${arguments% *}"
26973  else
26974    new_complete="$new_path"
26975  fi
26976
26977  if test "x$complete" != "x$new_complete"; then
26978    MCS="$new_complete"
26979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26980$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26981  fi
26982
26983  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26984    if test -n "$ac_tool_prefix"; then
26985  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26986set dummy ${ac_tool_prefix}nm; ac_word=$2
26987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26988$as_echo_n "checking for $ac_word... " >&6; }
26989if ${ac_cv_prog_NM+:} false; then :
26990  $as_echo_n "(cached) " >&6
26991else
26992  if test -n "$NM"; then
26993  ac_cv_prog_NM="$NM" # Let the user override the test.
26994else
26995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26996for as_dir in $PATH
26997do
26998  IFS=$as_save_IFS
26999  test -z "$as_dir" && as_dir=.
27000    for ac_exec_ext in '' $ac_executable_extensions; do
27001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27002    ac_cv_prog_NM="${ac_tool_prefix}nm"
27003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27004    break 2
27005  fi
27006done
27007  done
27008IFS=$as_save_IFS
27009
27010fi
27011fi
27012NM=$ac_cv_prog_NM
27013if test -n "$NM"; then
27014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27015$as_echo "$NM" >&6; }
27016else
27017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27018$as_echo "no" >&6; }
27019fi
27020
27021
27022fi
27023if test -z "$ac_cv_prog_NM"; then
27024  ac_ct_NM=$NM
27025  # Extract the first word of "nm", so it can be a program name with args.
27026set dummy nm; ac_word=$2
27027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27028$as_echo_n "checking for $ac_word... " >&6; }
27029if ${ac_cv_prog_ac_ct_NM+:} false; then :
27030  $as_echo_n "(cached) " >&6
27031else
27032  if test -n "$ac_ct_NM"; then
27033  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27034else
27035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27036for as_dir in $PATH
27037do
27038  IFS=$as_save_IFS
27039  test -z "$as_dir" && as_dir=.
27040    for ac_exec_ext in '' $ac_executable_extensions; do
27041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27042    ac_cv_prog_ac_ct_NM="nm"
27043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27044    break 2
27045  fi
27046done
27047  done
27048IFS=$as_save_IFS
27049
27050fi
27051fi
27052ac_ct_NM=$ac_cv_prog_ac_ct_NM
27053if test -n "$ac_ct_NM"; then
27054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27055$as_echo "$ac_ct_NM" >&6; }
27056else
27057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27058$as_echo "no" >&6; }
27059fi
27060
27061  if test "x$ac_ct_NM" = x; then
27062    NM=""
27063  else
27064    case $cross_compiling:$ac_tool_warned in
27065yes:)
27066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27068ac_tool_warned=yes ;;
27069esac
27070    NM=$ac_ct_NM
27071  fi
27072else
27073  NM="$ac_cv_prog_NM"
27074fi
27075
27076
27077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27078
27079  # First separate the path from the arguments. This will split at the first
27080  # space.
27081  complete="$NM"
27082  path="${complete%% *}"
27083  tmp="$complete EOL"
27084  arguments="${tmp#* }"
27085
27086  # Input might be given as Windows format, start by converting to
27087  # unix format.
27088  new_path=`$CYGPATH -u "$path"`
27089
27090  # Now try to locate executable using which
27091  new_path=`$WHICH "$new_path" 2> /dev/null`
27092  # bat and cmd files are not always considered executable in cygwin causing which
27093  # to not find them
27094  if test "x$new_path" = x \
27095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27097    new_path=`$CYGPATH -u "$path"`
27098  fi
27099  if test "x$new_path" = x; then
27100    # Oops. Which didn't find the executable.
27101    # The splitting of arguments from the executable at a space might have been incorrect,
27102    # since paths with space are more likely in Windows. Give it another try with the whole
27103    # argument.
27104    path="$complete"
27105    arguments="EOL"
27106    new_path=`$CYGPATH -u "$path"`
27107    new_path=`$WHICH "$new_path" 2> /dev/null`
27108    # bat and cmd files are not always considered executable in cygwin causing which
27109    # to not find them
27110    if test "x$new_path" = x \
27111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27113      new_path=`$CYGPATH -u "$path"`
27114    fi
27115    if test "x$new_path" = x; then
27116      # It's still not found. Now this is an unrecoverable error.
27117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27118$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27119      has_space=`$ECHO "$complete" | $GREP " "`
27120      if test "x$has_space" != x; then
27121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27123      fi
27124      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27125    fi
27126  fi
27127
27128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27131  # "foo.exe" is OK but "foo" is an error.
27132  #
27133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27134  # It is also a way to make sure we got the proper file name for the real test later on.
27135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27136  if test "x$test_shortpath" = x; then
27137    # Short path failed, file does not exist as specified.
27138    # Try adding .exe or .cmd
27139    if test -f "${new_path}.exe"; then
27140      input_to_shortpath="${new_path}.exe"
27141    elif test -f "${new_path}.cmd"; then
27142      input_to_shortpath="${new_path}.cmd"
27143    else
27144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27145$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27148      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27149    fi
27150  else
27151    input_to_shortpath="$new_path"
27152  fi
27153
27154  # Call helper function which possibly converts this using DOS-style short mode.
27155  # If so, the updated path is stored in $new_path.
27156  new_path="$input_to_shortpath"
27157
27158  input_path="$input_to_shortpath"
27159  # Check if we need to convert this using DOS-style short mode. If the path
27160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27161  # take no chances and rewrite it.
27162  # Note: m4 eats our [], so we need to use [ and ] instead.
27163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27164  if test "x$has_forbidden_chars" != x; then
27165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27169      # Going to short mode and back again did indeed matter. Since short mode is
27170      # case insensitive, let's make it lowercase to improve readability.
27171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27172      # Now convert it back to Unix-stile (cygpath)
27173      input_path=`$CYGPATH -u "$shortmode_path"`
27174      new_path="$input_path"
27175    fi
27176  fi
27177
27178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27179  if test "x$test_cygdrive_prefix" = x; then
27180    # As a simple fix, exclude /usr/bin since it's not a real path.
27181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27183      # a path prefixed by /cygdrive for fixpath to work.
27184      new_path="$CYGWIN_ROOT_PATH$input_path"
27185    fi
27186  fi
27187
27188  # remove trailing .exe if any
27189  new_path="${new_path/%.exe/}"
27190
27191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27192
27193  # First separate the path from the arguments. This will split at the first
27194  # space.
27195  complete="$NM"
27196  path="${complete%% *}"
27197  tmp="$complete EOL"
27198  arguments="${tmp#* }"
27199
27200  # Input might be given as Windows format, start by converting to
27201  # unix format.
27202  new_path="$path"
27203
27204  windows_path="$new_path"
27205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27206    unix_path=`$CYGPATH -u "$windows_path"`
27207    new_path="$unix_path"
27208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27210    new_path="$unix_path"
27211  fi
27212
27213
27214  # Now try to locate executable using which
27215  new_path=`$WHICH "$new_path" 2> /dev/null`
27216
27217  if test "x$new_path" = x; then
27218    # Oops. Which didn't find the executable.
27219    # The splitting of arguments from the executable at a space might have been incorrect,
27220    # since paths with space are more likely in Windows. Give it another try with the whole
27221    # argument.
27222    path="$complete"
27223    arguments="EOL"
27224    new_path="$path"
27225
27226  windows_path="$new_path"
27227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27228    unix_path=`$CYGPATH -u "$windows_path"`
27229    new_path="$unix_path"
27230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27232    new_path="$unix_path"
27233  fi
27234
27235
27236    new_path=`$WHICH "$new_path" 2> /dev/null`
27237
27238    if test "x$new_path" = x; then
27239      # It's still not found. Now this is an unrecoverable error.
27240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27241$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27242      has_space=`$ECHO "$complete" | $GREP " "`
27243      if test "x$has_space" != x; then
27244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27246      fi
27247      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27248    fi
27249  fi
27250
27251  # Now new_path has a complete unix path to the binary
27252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27253    # Keep paths in /bin as-is, but remove trailing .exe if any
27254    new_path="${new_path/%.exe/}"
27255    # Do not save /bin paths to all_fixpath_prefixes!
27256  else
27257    # Not in mixed or Windows style, start by that.
27258    new_path=`cmd //c echo $new_path`
27259
27260  input_path="$new_path"
27261  # Check if we need to convert this using DOS-style short mode. If the path
27262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27263  # take no chances and rewrite it.
27264  # Note: m4 eats our [], so we need to use [ and ] instead.
27265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27266  if test "x$has_forbidden_chars" != x; then
27267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27269  fi
27270
27271    # Output is in $new_path
27272
27273  windows_path="$new_path"
27274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27275    unix_path=`$CYGPATH -u "$windows_path"`
27276    new_path="$unix_path"
27277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27279    new_path="$unix_path"
27280  fi
27281
27282    # remove trailing .exe if any
27283    new_path="${new_path/%.exe/}"
27284
27285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27287  fi
27288
27289  else
27290    # We're on a posix platform. Hooray! :)
27291    # First separate the path from the arguments. This will split at the first
27292    # space.
27293    complete="$NM"
27294    path="${complete%% *}"
27295    tmp="$complete EOL"
27296    arguments="${tmp#* }"
27297
27298    # Cannot rely on the command "which" here since it doesn't always work.
27299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27300    if test -z "$is_absolute_path"; then
27301      # Path to executable is not absolute. Find it.
27302      IFS_save="$IFS"
27303      IFS=:
27304      for p in $PATH; do
27305        if test -f "$p/$path" && test -x "$p/$path"; then
27306          new_path="$p/$path"
27307          break
27308        fi
27309      done
27310      IFS="$IFS_save"
27311    else
27312      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27313$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27314      new_path="$path"
27315    fi
27316
27317    if test "x$new_path" = x; then
27318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27319$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27320      has_space=`$ECHO "$complete" | $GREP " "`
27321      if test "x$has_space" != x; then
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27324      fi
27325      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27326    fi
27327  fi
27328
27329  # Now join together the path and the arguments once again
27330  if test "x$arguments" != xEOL; then
27331    new_complete="$new_path ${arguments% *}"
27332  else
27333    new_complete="$new_path"
27334  fi
27335
27336  if test "x$complete" != "x$new_complete"; then
27337    NM="$new_complete"
27338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27339$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27340  fi
27341
27342    GNM="$NM"
27343
27344    if test -n "$ac_tool_prefix"; then
27345  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27346set dummy ${ac_tool_prefix}strip; ac_word=$2
27347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27348$as_echo_n "checking for $ac_word... " >&6; }
27349if ${ac_cv_prog_STRIP+:} false; then :
27350  $as_echo_n "(cached) " >&6
27351else
27352  if test -n "$STRIP"; then
27353  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27354else
27355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27356for as_dir in $PATH
27357do
27358  IFS=$as_save_IFS
27359  test -z "$as_dir" && as_dir=.
27360    for ac_exec_ext in '' $ac_executable_extensions; do
27361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27362    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27364    break 2
27365  fi
27366done
27367  done
27368IFS=$as_save_IFS
27369
27370fi
27371fi
27372STRIP=$ac_cv_prog_STRIP
27373if test -n "$STRIP"; then
27374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27375$as_echo "$STRIP" >&6; }
27376else
27377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27378$as_echo "no" >&6; }
27379fi
27380
27381
27382fi
27383if test -z "$ac_cv_prog_STRIP"; then
27384  ac_ct_STRIP=$STRIP
27385  # Extract the first word of "strip", so it can be a program name with args.
27386set dummy strip; ac_word=$2
27387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27388$as_echo_n "checking for $ac_word... " >&6; }
27389if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27390  $as_echo_n "(cached) " >&6
27391else
27392  if test -n "$ac_ct_STRIP"; then
27393  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27394else
27395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27396for as_dir in $PATH
27397do
27398  IFS=$as_save_IFS
27399  test -z "$as_dir" && as_dir=.
27400    for ac_exec_ext in '' $ac_executable_extensions; do
27401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27402    ac_cv_prog_ac_ct_STRIP="strip"
27403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27404    break 2
27405  fi
27406done
27407  done
27408IFS=$as_save_IFS
27409
27410fi
27411fi
27412ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27413if test -n "$ac_ct_STRIP"; then
27414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27415$as_echo "$ac_ct_STRIP" >&6; }
27416else
27417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27418$as_echo "no" >&6; }
27419fi
27420
27421  if test "x$ac_ct_STRIP" = x; then
27422    STRIP=""
27423  else
27424    case $cross_compiling:$ac_tool_warned in
27425yes:)
27426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27428ac_tool_warned=yes ;;
27429esac
27430    STRIP=$ac_ct_STRIP
27431  fi
27432else
27433  STRIP="$ac_cv_prog_STRIP"
27434fi
27435
27436
27437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27438
27439  # First separate the path from the arguments. This will split at the first
27440  # space.
27441  complete="$STRIP"
27442  path="${complete%% *}"
27443  tmp="$complete EOL"
27444  arguments="${tmp#* }"
27445
27446  # Input might be given as Windows format, start by converting to
27447  # unix format.
27448  new_path=`$CYGPATH -u "$path"`
27449
27450  # Now try to locate executable using which
27451  new_path=`$WHICH "$new_path" 2> /dev/null`
27452  # bat and cmd files are not always considered executable in cygwin causing which
27453  # to not find them
27454  if test "x$new_path" = x \
27455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27457    new_path=`$CYGPATH -u "$path"`
27458  fi
27459  if test "x$new_path" = x; then
27460    # Oops. Which didn't find the executable.
27461    # The splitting of arguments from the executable at a space might have been incorrect,
27462    # since paths with space are more likely in Windows. Give it another try with the whole
27463    # argument.
27464    path="$complete"
27465    arguments="EOL"
27466    new_path=`$CYGPATH -u "$path"`
27467    new_path=`$WHICH "$new_path" 2> /dev/null`
27468    # bat and cmd files are not always considered executable in cygwin causing which
27469    # to not find them
27470    if test "x$new_path" = x \
27471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27473      new_path=`$CYGPATH -u "$path"`
27474    fi
27475    if test "x$new_path" = x; then
27476      # It's still not found. Now this is an unrecoverable error.
27477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27478$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27479      has_space=`$ECHO "$complete" | $GREP " "`
27480      if test "x$has_space" != x; then
27481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27483      fi
27484      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27485    fi
27486  fi
27487
27488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27491  # "foo.exe" is OK but "foo" is an error.
27492  #
27493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27494  # It is also a way to make sure we got the proper file name for the real test later on.
27495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27496  if test "x$test_shortpath" = x; then
27497    # Short path failed, file does not exist as specified.
27498    # Try adding .exe or .cmd
27499    if test -f "${new_path}.exe"; then
27500      input_to_shortpath="${new_path}.exe"
27501    elif test -f "${new_path}.cmd"; then
27502      input_to_shortpath="${new_path}.cmd"
27503    else
27504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27505$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27508      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27509    fi
27510  else
27511    input_to_shortpath="$new_path"
27512  fi
27513
27514  # Call helper function which possibly converts this using DOS-style short mode.
27515  # If so, the updated path is stored in $new_path.
27516  new_path="$input_to_shortpath"
27517
27518  input_path="$input_to_shortpath"
27519  # Check if we need to convert this using DOS-style short mode. If the path
27520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27521  # take no chances and rewrite it.
27522  # Note: m4 eats our [], so we need to use [ and ] instead.
27523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27524  if test "x$has_forbidden_chars" != x; then
27525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27529      # Going to short mode and back again did indeed matter. Since short mode is
27530      # case insensitive, let's make it lowercase to improve readability.
27531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27532      # Now convert it back to Unix-stile (cygpath)
27533      input_path=`$CYGPATH -u "$shortmode_path"`
27534      new_path="$input_path"
27535    fi
27536  fi
27537
27538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27539  if test "x$test_cygdrive_prefix" = x; then
27540    # As a simple fix, exclude /usr/bin since it's not a real path.
27541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27543      # a path prefixed by /cygdrive for fixpath to work.
27544      new_path="$CYGWIN_ROOT_PATH$input_path"
27545    fi
27546  fi
27547
27548  # remove trailing .exe if any
27549  new_path="${new_path/%.exe/}"
27550
27551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27552
27553  # First separate the path from the arguments. This will split at the first
27554  # space.
27555  complete="$STRIP"
27556  path="${complete%% *}"
27557  tmp="$complete EOL"
27558  arguments="${tmp#* }"
27559
27560  # Input might be given as Windows format, start by converting to
27561  # unix format.
27562  new_path="$path"
27563
27564  windows_path="$new_path"
27565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27566    unix_path=`$CYGPATH -u "$windows_path"`
27567    new_path="$unix_path"
27568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27570    new_path="$unix_path"
27571  fi
27572
27573
27574  # Now try to locate executable using which
27575  new_path=`$WHICH "$new_path" 2> /dev/null`
27576
27577  if test "x$new_path" = x; then
27578    # Oops. Which didn't find the executable.
27579    # The splitting of arguments from the executable at a space might have been incorrect,
27580    # since paths with space are more likely in Windows. Give it another try with the whole
27581    # argument.
27582    path="$complete"
27583    arguments="EOL"
27584    new_path="$path"
27585
27586  windows_path="$new_path"
27587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27588    unix_path=`$CYGPATH -u "$windows_path"`
27589    new_path="$unix_path"
27590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27592    new_path="$unix_path"
27593  fi
27594
27595
27596    new_path=`$WHICH "$new_path" 2> /dev/null`
27597
27598    if test "x$new_path" = x; then
27599      # It's still not found. Now this is an unrecoverable error.
27600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27601$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27602      has_space=`$ECHO "$complete" | $GREP " "`
27603      if test "x$has_space" != x; then
27604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27606      fi
27607      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27608    fi
27609  fi
27610
27611  # Now new_path has a complete unix path to the binary
27612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27613    # Keep paths in /bin as-is, but remove trailing .exe if any
27614    new_path="${new_path/%.exe/}"
27615    # Do not save /bin paths to all_fixpath_prefixes!
27616  else
27617    # Not in mixed or Windows style, start by that.
27618    new_path=`cmd //c echo $new_path`
27619
27620  input_path="$new_path"
27621  # Check if we need to convert this using DOS-style short mode. If the path
27622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27623  # take no chances and rewrite it.
27624  # Note: m4 eats our [], so we need to use [ and ] instead.
27625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27626  if test "x$has_forbidden_chars" != x; then
27627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27629  fi
27630
27631    # Output is in $new_path
27632
27633  windows_path="$new_path"
27634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27635    unix_path=`$CYGPATH -u "$windows_path"`
27636    new_path="$unix_path"
27637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27639    new_path="$unix_path"
27640  fi
27641
27642    # remove trailing .exe if any
27643    new_path="${new_path/%.exe/}"
27644
27645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27647  fi
27648
27649  else
27650    # We're on a posix platform. Hooray! :)
27651    # First separate the path from the arguments. This will split at the first
27652    # space.
27653    complete="$STRIP"
27654    path="${complete%% *}"
27655    tmp="$complete EOL"
27656    arguments="${tmp#* }"
27657
27658    # Cannot rely on the command "which" here since it doesn't always work.
27659    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27660    if test -z "$is_absolute_path"; then
27661      # Path to executable is not absolute. Find it.
27662      IFS_save="$IFS"
27663      IFS=:
27664      for p in $PATH; do
27665        if test -f "$p/$path" && test -x "$p/$path"; then
27666          new_path="$p/$path"
27667          break
27668        fi
27669      done
27670      IFS="$IFS_save"
27671    else
27672      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27673$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27674      new_path="$path"
27675    fi
27676
27677    if test "x$new_path" = x; then
27678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27679$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27680      has_space=`$ECHO "$complete" | $GREP " "`
27681      if test "x$has_space" != x; then
27682        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27683$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27684      fi
27685      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27686    fi
27687  fi
27688
27689  # Now join together the path and the arguments once again
27690  if test "x$arguments" != xEOL; then
27691    new_complete="$new_path ${arguments% *}"
27692  else
27693    new_complete="$new_path"
27694  fi
27695
27696  if test "x$complete" != "x$new_complete"; then
27697    STRIP="$new_complete"
27698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27699$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27700  fi
27701
27702  fi
27703
27704  # objcopy is used for moving debug symbols to separate files when
27705  # full debug symbols are enabled.
27706  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27707    if test -n "$ac_tool_prefix"; then
27708  for ac_prog in gobjcopy objcopy
27709  do
27710    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27713$as_echo_n "checking for $ac_word... " >&6; }
27714if ${ac_cv_prog_OBJCOPY+:} false; then :
27715  $as_echo_n "(cached) " >&6
27716else
27717  if test -n "$OBJCOPY"; then
27718  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27719else
27720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27721for as_dir in $PATH
27722do
27723  IFS=$as_save_IFS
27724  test -z "$as_dir" && as_dir=.
27725    for ac_exec_ext in '' $ac_executable_extensions; do
27726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27727    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27729    break 2
27730  fi
27731done
27732  done
27733IFS=$as_save_IFS
27734
27735fi
27736fi
27737OBJCOPY=$ac_cv_prog_OBJCOPY
27738if test -n "$OBJCOPY"; then
27739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27740$as_echo "$OBJCOPY" >&6; }
27741else
27742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27743$as_echo "no" >&6; }
27744fi
27745
27746
27747    test -n "$OBJCOPY" && break
27748  done
27749fi
27750if test -z "$OBJCOPY"; then
27751  ac_ct_OBJCOPY=$OBJCOPY
27752  for ac_prog in gobjcopy objcopy
27753do
27754  # Extract the first word of "$ac_prog", so it can be a program name with args.
27755set dummy $ac_prog; ac_word=$2
27756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27757$as_echo_n "checking for $ac_word... " >&6; }
27758if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27759  $as_echo_n "(cached) " >&6
27760else
27761  if test -n "$ac_ct_OBJCOPY"; then
27762  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27763else
27764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27765for as_dir in $PATH
27766do
27767  IFS=$as_save_IFS
27768  test -z "$as_dir" && as_dir=.
27769    for ac_exec_ext in '' $ac_executable_extensions; do
27770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27771    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27773    break 2
27774  fi
27775done
27776  done
27777IFS=$as_save_IFS
27778
27779fi
27780fi
27781ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27782if test -n "$ac_ct_OBJCOPY"; then
27783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27784$as_echo "$ac_ct_OBJCOPY" >&6; }
27785else
27786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27787$as_echo "no" >&6; }
27788fi
27789
27790
27791  test -n "$ac_ct_OBJCOPY" && break
27792done
27793
27794  if test "x$ac_ct_OBJCOPY" = x; then
27795    OBJCOPY=""
27796  else
27797    case $cross_compiling:$ac_tool_warned in
27798yes:)
27799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27801ac_tool_warned=yes ;;
27802esac
27803    OBJCOPY=$ac_ct_OBJCOPY
27804  fi
27805fi
27806
27807    # Only call fixup if objcopy was found.
27808    if test -n "$OBJCOPY"; then
27809
27810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27811
27812  # First separate the path from the arguments. This will split at the first
27813  # space.
27814  complete="$OBJCOPY"
27815  path="${complete%% *}"
27816  tmp="$complete EOL"
27817  arguments="${tmp#* }"
27818
27819  # Input might be given as Windows format, start by converting to
27820  # unix format.
27821  new_path=`$CYGPATH -u "$path"`
27822
27823  # Now try to locate executable using which
27824  new_path=`$WHICH "$new_path" 2> /dev/null`
27825  # bat and cmd files are not always considered executable in cygwin causing which
27826  # to not find them
27827  if test "x$new_path" = x \
27828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27830    new_path=`$CYGPATH -u "$path"`
27831  fi
27832  if test "x$new_path" = x; then
27833    # Oops. Which didn't find the executable.
27834    # The splitting of arguments from the executable at a space might have been incorrect,
27835    # since paths with space are more likely in Windows. Give it another try with the whole
27836    # argument.
27837    path="$complete"
27838    arguments="EOL"
27839    new_path=`$CYGPATH -u "$path"`
27840    new_path=`$WHICH "$new_path" 2> /dev/null`
27841    # bat and cmd files are not always considered executable in cygwin causing which
27842    # to not find them
27843    if test "x$new_path" = x \
27844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27846      new_path=`$CYGPATH -u "$path"`
27847    fi
27848    if test "x$new_path" = x; then
27849      # It's still not found. Now this is an unrecoverable error.
27850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27851$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27852      has_space=`$ECHO "$complete" | $GREP " "`
27853      if test "x$has_space" != x; then
27854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27856      fi
27857      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27858    fi
27859  fi
27860
27861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27864  # "foo.exe" is OK but "foo" is an error.
27865  #
27866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27867  # It is also a way to make sure we got the proper file name for the real test later on.
27868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27869  if test "x$test_shortpath" = x; then
27870    # Short path failed, file does not exist as specified.
27871    # Try adding .exe or .cmd
27872    if test -f "${new_path}.exe"; then
27873      input_to_shortpath="${new_path}.exe"
27874    elif test -f "${new_path}.cmd"; then
27875      input_to_shortpath="${new_path}.cmd"
27876    else
27877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27878$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27881      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27882    fi
27883  else
27884    input_to_shortpath="$new_path"
27885  fi
27886
27887  # Call helper function which possibly converts this using DOS-style short mode.
27888  # If so, the updated path is stored in $new_path.
27889  new_path="$input_to_shortpath"
27890
27891  input_path="$input_to_shortpath"
27892  # Check if we need to convert this using DOS-style short mode. If the path
27893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27894  # take no chances and rewrite it.
27895  # Note: m4 eats our [], so we need to use [ and ] instead.
27896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27897  if test "x$has_forbidden_chars" != x; then
27898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27902      # Going to short mode and back again did indeed matter. Since short mode is
27903      # case insensitive, let's make it lowercase to improve readability.
27904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27905      # Now convert it back to Unix-stile (cygpath)
27906      input_path=`$CYGPATH -u "$shortmode_path"`
27907      new_path="$input_path"
27908    fi
27909  fi
27910
27911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27912  if test "x$test_cygdrive_prefix" = x; then
27913    # As a simple fix, exclude /usr/bin since it's not a real path.
27914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27916      # a path prefixed by /cygdrive for fixpath to work.
27917      new_path="$CYGWIN_ROOT_PATH$input_path"
27918    fi
27919  fi
27920
27921  # remove trailing .exe if any
27922  new_path="${new_path/%.exe/}"
27923
27924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27925
27926  # First separate the path from the arguments. This will split at the first
27927  # space.
27928  complete="$OBJCOPY"
27929  path="${complete%% *}"
27930  tmp="$complete EOL"
27931  arguments="${tmp#* }"
27932
27933  # Input might be given as Windows format, start by converting to
27934  # unix format.
27935  new_path="$path"
27936
27937  windows_path="$new_path"
27938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27939    unix_path=`$CYGPATH -u "$windows_path"`
27940    new_path="$unix_path"
27941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27943    new_path="$unix_path"
27944  fi
27945
27946
27947  # Now try to locate executable using which
27948  new_path=`$WHICH "$new_path" 2> /dev/null`
27949
27950  if test "x$new_path" = x; then
27951    # Oops. Which didn't find the executable.
27952    # The splitting of arguments from the executable at a space might have been incorrect,
27953    # since paths with space are more likely in Windows. Give it another try with the whole
27954    # argument.
27955    path="$complete"
27956    arguments="EOL"
27957    new_path="$path"
27958
27959  windows_path="$new_path"
27960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27961    unix_path=`$CYGPATH -u "$windows_path"`
27962    new_path="$unix_path"
27963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27965    new_path="$unix_path"
27966  fi
27967
27968
27969    new_path=`$WHICH "$new_path" 2> /dev/null`
27970
27971    if test "x$new_path" = x; then
27972      # It's still not found. Now this is an unrecoverable error.
27973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27974$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27975      has_space=`$ECHO "$complete" | $GREP " "`
27976      if test "x$has_space" != x; then
27977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27979      fi
27980      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27981    fi
27982  fi
27983
27984  # Now new_path has a complete unix path to the binary
27985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27986    # Keep paths in /bin as-is, but remove trailing .exe if any
27987    new_path="${new_path/%.exe/}"
27988    # Do not save /bin paths to all_fixpath_prefixes!
27989  else
27990    # Not in mixed or Windows style, start by that.
27991    new_path=`cmd //c echo $new_path`
27992
27993  input_path="$new_path"
27994  # Check if we need to convert this using DOS-style short mode. If the path
27995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27996  # take no chances and rewrite it.
27997  # Note: m4 eats our [], so we need to use [ and ] instead.
27998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27999  if test "x$has_forbidden_chars" != x; then
28000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28002  fi
28003
28004    # Output is in $new_path
28005
28006  windows_path="$new_path"
28007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28008    unix_path=`$CYGPATH -u "$windows_path"`
28009    new_path="$unix_path"
28010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28012    new_path="$unix_path"
28013  fi
28014
28015    # remove trailing .exe if any
28016    new_path="${new_path/%.exe/}"
28017
28018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28020  fi
28021
28022  else
28023    # We're on a posix platform. Hooray! :)
28024    # First separate the path from the arguments. This will split at the first
28025    # space.
28026    complete="$OBJCOPY"
28027    path="${complete%% *}"
28028    tmp="$complete EOL"
28029    arguments="${tmp#* }"
28030
28031    # Cannot rely on the command "which" here since it doesn't always work.
28032    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28033    if test -z "$is_absolute_path"; then
28034      # Path to executable is not absolute. Find it.
28035      IFS_save="$IFS"
28036      IFS=:
28037      for p in $PATH; do
28038        if test -f "$p/$path" && test -x "$p/$path"; then
28039          new_path="$p/$path"
28040          break
28041        fi
28042      done
28043      IFS="$IFS_save"
28044    else
28045      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28046$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28047      new_path="$path"
28048    fi
28049
28050    if test "x$new_path" = x; then
28051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28052$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28053      has_space=`$ECHO "$complete" | $GREP " "`
28054      if test "x$has_space" != x; then
28055        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28057      fi
28058      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28059    fi
28060  fi
28061
28062  # Now join together the path and the arguments once again
28063  if test "x$arguments" != xEOL; then
28064    new_complete="$new_path ${arguments% *}"
28065  else
28066    new_complete="$new_path"
28067  fi
28068
28069  if test "x$complete" != "x$new_complete"; then
28070    OBJCOPY="$new_complete"
28071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28072$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28073  fi
28074
28075    fi
28076  fi
28077
28078  if test -n "$ac_tool_prefix"; then
28079  for ac_prog in gobjdump objdump
28080  do
28081    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28082set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28084$as_echo_n "checking for $ac_word... " >&6; }
28085if ${ac_cv_prog_OBJDUMP+:} false; then :
28086  $as_echo_n "(cached) " >&6
28087else
28088  if test -n "$OBJDUMP"; then
28089  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28090else
28091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28092for as_dir in $PATH
28093do
28094  IFS=$as_save_IFS
28095  test -z "$as_dir" && as_dir=.
28096    for ac_exec_ext in '' $ac_executable_extensions; do
28097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28098    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28100    break 2
28101  fi
28102done
28103  done
28104IFS=$as_save_IFS
28105
28106fi
28107fi
28108OBJDUMP=$ac_cv_prog_OBJDUMP
28109if test -n "$OBJDUMP"; then
28110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28111$as_echo "$OBJDUMP" >&6; }
28112else
28113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28114$as_echo "no" >&6; }
28115fi
28116
28117
28118    test -n "$OBJDUMP" && break
28119  done
28120fi
28121if test -z "$OBJDUMP"; then
28122  ac_ct_OBJDUMP=$OBJDUMP
28123  for ac_prog in gobjdump objdump
28124do
28125  # Extract the first word of "$ac_prog", so it can be a program name with args.
28126set dummy $ac_prog; ac_word=$2
28127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28128$as_echo_n "checking for $ac_word... " >&6; }
28129if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28130  $as_echo_n "(cached) " >&6
28131else
28132  if test -n "$ac_ct_OBJDUMP"; then
28133  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28134else
28135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28136for as_dir in $PATH
28137do
28138  IFS=$as_save_IFS
28139  test -z "$as_dir" && as_dir=.
28140    for ac_exec_ext in '' $ac_executable_extensions; do
28141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28142    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28144    break 2
28145  fi
28146done
28147  done
28148IFS=$as_save_IFS
28149
28150fi
28151fi
28152ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28153if test -n "$ac_ct_OBJDUMP"; then
28154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28155$as_echo "$ac_ct_OBJDUMP" >&6; }
28156else
28157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28158$as_echo "no" >&6; }
28159fi
28160
28161
28162  test -n "$ac_ct_OBJDUMP" && break
28163done
28164
28165  if test "x$ac_ct_OBJDUMP" = x; then
28166    OBJDUMP=""
28167  else
28168    case $cross_compiling:$ac_tool_warned in
28169yes:)
28170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28172ac_tool_warned=yes ;;
28173esac
28174    OBJDUMP=$ac_ct_OBJDUMP
28175  fi
28176fi
28177
28178  if test "x$OBJDUMP" != x; then
28179    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28180
28181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28182
28183  # First separate the path from the arguments. This will split at the first
28184  # space.
28185  complete="$OBJDUMP"
28186  path="${complete%% *}"
28187  tmp="$complete EOL"
28188  arguments="${tmp#* }"
28189
28190  # Input might be given as Windows format, start by converting to
28191  # unix format.
28192  new_path=`$CYGPATH -u "$path"`
28193
28194  # Now try to locate executable using which
28195  new_path=`$WHICH "$new_path" 2> /dev/null`
28196  # bat and cmd files are not always considered executable in cygwin causing which
28197  # to not find them
28198  if test "x$new_path" = x \
28199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28201    new_path=`$CYGPATH -u "$path"`
28202  fi
28203  if test "x$new_path" = x; then
28204    # Oops. Which didn't find the executable.
28205    # The splitting of arguments from the executable at a space might have been incorrect,
28206    # since paths with space are more likely in Windows. Give it another try with the whole
28207    # argument.
28208    path="$complete"
28209    arguments="EOL"
28210    new_path=`$CYGPATH -u "$path"`
28211    new_path=`$WHICH "$new_path" 2> /dev/null`
28212    # bat and cmd files are not always considered executable in cygwin causing which
28213    # to not find them
28214    if test "x$new_path" = x \
28215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28217      new_path=`$CYGPATH -u "$path"`
28218    fi
28219    if test "x$new_path" = x; then
28220      # It's still not found. Now this is an unrecoverable error.
28221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28222$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28223      has_space=`$ECHO "$complete" | $GREP " "`
28224      if test "x$has_space" != x; then
28225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28227      fi
28228      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28229    fi
28230  fi
28231
28232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28235  # "foo.exe" is OK but "foo" is an error.
28236  #
28237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28238  # It is also a way to make sure we got the proper file name for the real test later on.
28239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28240  if test "x$test_shortpath" = x; then
28241    # Short path failed, file does not exist as specified.
28242    # Try adding .exe or .cmd
28243    if test -f "${new_path}.exe"; then
28244      input_to_shortpath="${new_path}.exe"
28245    elif test -f "${new_path}.cmd"; then
28246      input_to_shortpath="${new_path}.cmd"
28247    else
28248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28249$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28252      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28253    fi
28254  else
28255    input_to_shortpath="$new_path"
28256  fi
28257
28258  # Call helper function which possibly converts this using DOS-style short mode.
28259  # If so, the updated path is stored in $new_path.
28260  new_path="$input_to_shortpath"
28261
28262  input_path="$input_to_shortpath"
28263  # Check if we need to convert this using DOS-style short mode. If the path
28264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28265  # take no chances and rewrite it.
28266  # Note: m4 eats our [], so we need to use [ and ] instead.
28267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28268  if test "x$has_forbidden_chars" != x; then
28269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28273      # Going to short mode and back again did indeed matter. Since short mode is
28274      # case insensitive, let's make it lowercase to improve readability.
28275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28276      # Now convert it back to Unix-stile (cygpath)
28277      input_path=`$CYGPATH -u "$shortmode_path"`
28278      new_path="$input_path"
28279    fi
28280  fi
28281
28282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28283  if test "x$test_cygdrive_prefix" = x; then
28284    # As a simple fix, exclude /usr/bin since it's not a real path.
28285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28287      # a path prefixed by /cygdrive for fixpath to work.
28288      new_path="$CYGWIN_ROOT_PATH$input_path"
28289    fi
28290  fi
28291
28292  # remove trailing .exe if any
28293  new_path="${new_path/%.exe/}"
28294
28295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28296
28297  # First separate the path from the arguments. This will split at the first
28298  # space.
28299  complete="$OBJDUMP"
28300  path="${complete%% *}"
28301  tmp="$complete EOL"
28302  arguments="${tmp#* }"
28303
28304  # Input might be given as Windows format, start by converting to
28305  # unix format.
28306  new_path="$path"
28307
28308  windows_path="$new_path"
28309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28310    unix_path=`$CYGPATH -u "$windows_path"`
28311    new_path="$unix_path"
28312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28314    new_path="$unix_path"
28315  fi
28316
28317
28318  # Now try to locate executable using which
28319  new_path=`$WHICH "$new_path" 2> /dev/null`
28320
28321  if test "x$new_path" = x; then
28322    # Oops. Which didn't find the executable.
28323    # The splitting of arguments from the executable at a space might have been incorrect,
28324    # since paths with space are more likely in Windows. Give it another try with the whole
28325    # argument.
28326    path="$complete"
28327    arguments="EOL"
28328    new_path="$path"
28329
28330  windows_path="$new_path"
28331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28332    unix_path=`$CYGPATH -u "$windows_path"`
28333    new_path="$unix_path"
28334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28336    new_path="$unix_path"
28337  fi
28338
28339
28340    new_path=`$WHICH "$new_path" 2> /dev/null`
28341
28342    if test "x$new_path" = x; then
28343      # It's still not found. Now this is an unrecoverable error.
28344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28345$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28346      has_space=`$ECHO "$complete" | $GREP " "`
28347      if test "x$has_space" != x; then
28348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28350      fi
28351      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28352    fi
28353  fi
28354
28355  # Now new_path has a complete unix path to the binary
28356  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28357    # Keep paths in /bin as-is, but remove trailing .exe if any
28358    new_path="${new_path/%.exe/}"
28359    # Do not save /bin paths to all_fixpath_prefixes!
28360  else
28361    # Not in mixed or Windows style, start by that.
28362    new_path=`cmd //c echo $new_path`
28363
28364  input_path="$new_path"
28365  # Check if we need to convert this using DOS-style short mode. If the path
28366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28367  # take no chances and rewrite it.
28368  # Note: m4 eats our [], so we need to use [ and ] instead.
28369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28370  if test "x$has_forbidden_chars" != x; then
28371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28373  fi
28374
28375    # Output is in $new_path
28376
28377  windows_path="$new_path"
28378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28379    unix_path=`$CYGPATH -u "$windows_path"`
28380    new_path="$unix_path"
28381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28383    new_path="$unix_path"
28384  fi
28385
28386    # remove trailing .exe if any
28387    new_path="${new_path/%.exe/}"
28388
28389    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28390    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28391  fi
28392
28393  else
28394    # We're on a posix platform. Hooray! :)
28395    # First separate the path from the arguments. This will split at the first
28396    # space.
28397    complete="$OBJDUMP"
28398    path="${complete%% *}"
28399    tmp="$complete EOL"
28400    arguments="${tmp#* }"
28401
28402    # Cannot rely on the command "which" here since it doesn't always work.
28403    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28404    if test -z "$is_absolute_path"; then
28405      # Path to executable is not absolute. Find it.
28406      IFS_save="$IFS"
28407      IFS=:
28408      for p in $PATH; do
28409        if test -f "$p/$path" && test -x "$p/$path"; then
28410          new_path="$p/$path"
28411          break
28412        fi
28413      done
28414      IFS="$IFS_save"
28415    else
28416      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28417$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28418      new_path="$path"
28419    fi
28420
28421    if test "x$new_path" = x; then
28422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28423$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28424      has_space=`$ECHO "$complete" | $GREP " "`
28425      if test "x$has_space" != x; then
28426        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28427$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28428      fi
28429      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28430    fi
28431  fi
28432
28433  # Now join together the path and the arguments once again
28434  if test "x$arguments" != xEOL; then
28435    new_complete="$new_path ${arguments% *}"
28436  else
28437    new_complete="$new_path"
28438  fi
28439
28440  if test "x$complete" != "x$new_complete"; then
28441    OBJDUMP="$new_complete"
28442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28443$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28444  fi
28445
28446  fi
28447
28448  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28449    # Extract the first word of "lipo", so it can be a program name with args.
28450set dummy lipo; ac_word=$2
28451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28452$as_echo_n "checking for $ac_word... " >&6; }
28453if ${ac_cv_path_LIPO+:} false; then :
28454  $as_echo_n "(cached) " >&6
28455else
28456  case $LIPO in
28457  [\\/]* | ?:[\\/]*)
28458  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28459  ;;
28460  *)
28461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28462for as_dir in $PATH
28463do
28464  IFS=$as_save_IFS
28465  test -z "$as_dir" && as_dir=.
28466    for ac_exec_ext in '' $ac_executable_extensions; do
28467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28468    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28470    break 2
28471  fi
28472done
28473  done
28474IFS=$as_save_IFS
28475
28476  ;;
28477esac
28478fi
28479LIPO=$ac_cv_path_LIPO
28480if test -n "$LIPO"; then
28481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28482$as_echo "$LIPO" >&6; }
28483else
28484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28485$as_echo "no" >&6; }
28486fi
28487
28488
28489
28490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28491
28492  # First separate the path from the arguments. This will split at the first
28493  # space.
28494  complete="$LIPO"
28495  path="${complete%% *}"
28496  tmp="$complete EOL"
28497  arguments="${tmp#* }"
28498
28499  # Input might be given as Windows format, start by converting to
28500  # unix format.
28501  new_path=`$CYGPATH -u "$path"`
28502
28503  # Now try to locate executable using which
28504  new_path=`$WHICH "$new_path" 2> /dev/null`
28505  # bat and cmd files are not always considered executable in cygwin causing which
28506  # to not find them
28507  if test "x$new_path" = x \
28508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28510    new_path=`$CYGPATH -u "$path"`
28511  fi
28512  if test "x$new_path" = x; then
28513    # Oops. Which didn't find the executable.
28514    # The splitting of arguments from the executable at a space might have been incorrect,
28515    # since paths with space are more likely in Windows. Give it another try with the whole
28516    # argument.
28517    path="$complete"
28518    arguments="EOL"
28519    new_path=`$CYGPATH -u "$path"`
28520    new_path=`$WHICH "$new_path" 2> /dev/null`
28521    # bat and cmd files are not always considered executable in cygwin causing which
28522    # to not find them
28523    if test "x$new_path" = x \
28524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28526      new_path=`$CYGPATH -u "$path"`
28527    fi
28528    if test "x$new_path" = x; then
28529      # It's still not found. Now this is an unrecoverable error.
28530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28531$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28532      has_space=`$ECHO "$complete" | $GREP " "`
28533      if test "x$has_space" != x; then
28534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28536      fi
28537      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28538    fi
28539  fi
28540
28541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28544  # "foo.exe" is OK but "foo" is an error.
28545  #
28546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28547  # It is also a way to make sure we got the proper file name for the real test later on.
28548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28549  if test "x$test_shortpath" = x; then
28550    # Short path failed, file does not exist as specified.
28551    # Try adding .exe or .cmd
28552    if test -f "${new_path}.exe"; then
28553      input_to_shortpath="${new_path}.exe"
28554    elif test -f "${new_path}.cmd"; then
28555      input_to_shortpath="${new_path}.cmd"
28556    else
28557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28558$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28561      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28562    fi
28563  else
28564    input_to_shortpath="$new_path"
28565  fi
28566
28567  # Call helper function which possibly converts this using DOS-style short mode.
28568  # If so, the updated path is stored in $new_path.
28569  new_path="$input_to_shortpath"
28570
28571  input_path="$input_to_shortpath"
28572  # Check if we need to convert this using DOS-style short mode. If the path
28573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28574  # take no chances and rewrite it.
28575  # Note: m4 eats our [], so we need to use [ and ] instead.
28576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28577  if test "x$has_forbidden_chars" != x; then
28578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28582      # Going to short mode and back again did indeed matter. Since short mode is
28583      # case insensitive, let's make it lowercase to improve readability.
28584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28585      # Now convert it back to Unix-stile (cygpath)
28586      input_path=`$CYGPATH -u "$shortmode_path"`
28587      new_path="$input_path"
28588    fi
28589  fi
28590
28591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28592  if test "x$test_cygdrive_prefix" = x; then
28593    # As a simple fix, exclude /usr/bin since it's not a real path.
28594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28596      # a path prefixed by /cygdrive for fixpath to work.
28597      new_path="$CYGWIN_ROOT_PATH$input_path"
28598    fi
28599  fi
28600
28601  # remove trailing .exe if any
28602  new_path="${new_path/%.exe/}"
28603
28604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28605
28606  # First separate the path from the arguments. This will split at the first
28607  # space.
28608  complete="$LIPO"
28609  path="${complete%% *}"
28610  tmp="$complete EOL"
28611  arguments="${tmp#* }"
28612
28613  # Input might be given as Windows format, start by converting to
28614  # unix format.
28615  new_path="$path"
28616
28617  windows_path="$new_path"
28618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28619    unix_path=`$CYGPATH -u "$windows_path"`
28620    new_path="$unix_path"
28621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28623    new_path="$unix_path"
28624  fi
28625
28626
28627  # Now try to locate executable using which
28628  new_path=`$WHICH "$new_path" 2> /dev/null`
28629
28630  if test "x$new_path" = x; then
28631    # Oops. Which didn't find the executable.
28632    # The splitting of arguments from the executable at a space might have been incorrect,
28633    # since paths with space are more likely in Windows. Give it another try with the whole
28634    # argument.
28635    path="$complete"
28636    arguments="EOL"
28637    new_path="$path"
28638
28639  windows_path="$new_path"
28640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28641    unix_path=`$CYGPATH -u "$windows_path"`
28642    new_path="$unix_path"
28643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28645    new_path="$unix_path"
28646  fi
28647
28648
28649    new_path=`$WHICH "$new_path" 2> /dev/null`
28650
28651    if test "x$new_path" = x; then
28652      # It's still not found. Now this is an unrecoverable error.
28653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28654$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28655      has_space=`$ECHO "$complete" | $GREP " "`
28656      if test "x$has_space" != x; then
28657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28659      fi
28660      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28661    fi
28662  fi
28663
28664  # Now new_path has a complete unix path to the binary
28665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28666    # Keep paths in /bin as-is, but remove trailing .exe if any
28667    new_path="${new_path/%.exe/}"
28668    # Do not save /bin paths to all_fixpath_prefixes!
28669  else
28670    # Not in mixed or Windows style, start by that.
28671    new_path=`cmd //c echo $new_path`
28672
28673  input_path="$new_path"
28674  # Check if we need to convert this using DOS-style short mode. If the path
28675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28676  # take no chances and rewrite it.
28677  # Note: m4 eats our [], so we need to use [ and ] instead.
28678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28679  if test "x$has_forbidden_chars" != x; then
28680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28682  fi
28683
28684    # Output is in $new_path
28685
28686  windows_path="$new_path"
28687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28688    unix_path=`$CYGPATH -u "$windows_path"`
28689    new_path="$unix_path"
28690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28692    new_path="$unix_path"
28693  fi
28694
28695    # remove trailing .exe if any
28696    new_path="${new_path/%.exe/}"
28697
28698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700  fi
28701
28702  else
28703    # We're on a posix platform. Hooray! :)
28704    # First separate the path from the arguments. This will split at the first
28705    # space.
28706    complete="$LIPO"
28707    path="${complete%% *}"
28708    tmp="$complete EOL"
28709    arguments="${tmp#* }"
28710
28711    # Cannot rely on the command "which" here since it doesn't always work.
28712    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28713    if test -z "$is_absolute_path"; then
28714      # Path to executable is not absolute. Find it.
28715      IFS_save="$IFS"
28716      IFS=:
28717      for p in $PATH; do
28718        if test -f "$p/$path" && test -x "$p/$path"; then
28719          new_path="$p/$path"
28720          break
28721        fi
28722      done
28723      IFS="$IFS_save"
28724    else
28725      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28726$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28727      new_path="$path"
28728    fi
28729
28730    if test "x$new_path" = x; then
28731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28732$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28733      has_space=`$ECHO "$complete" | $GREP " "`
28734      if test "x$has_space" != x; then
28735        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28737      fi
28738      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28739    fi
28740  fi
28741
28742  # Now join together the path and the arguments once again
28743  if test "x$arguments" != xEOL; then
28744    new_complete="$new_path ${arguments% *}"
28745  else
28746    new_complete="$new_path"
28747  fi
28748
28749  if test "x$complete" != "x$new_complete"; then
28750    LIPO="$new_complete"
28751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28752$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28753  fi
28754
28755  fi
28756
28757
28758
28759  # Restore old path without tools dir
28760  PATH="$OLD_PATH"
28761
28762
28763# FIXME: Currently we must test this after paths but before flags. Fix!
28764
28765# And we can test some aspects on the target using configure macros.
28766
28767
28768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28769$as_echo_n "checking for ANSI C header files... " >&6; }
28770if ${ac_cv_header_stdc+:} false; then :
28771  $as_echo_n "(cached) " >&6
28772else
28773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28774/* end confdefs.h.  */
28775#include <stdlib.h>
28776#include <stdarg.h>
28777#include <string.h>
28778#include <float.h>
28779
28780int
28781main ()
28782{
28783
28784  ;
28785  return 0;
28786}
28787_ACEOF
28788if ac_fn_cxx_try_compile "$LINENO"; then :
28789  ac_cv_header_stdc=yes
28790else
28791  ac_cv_header_stdc=no
28792fi
28793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28794
28795if test $ac_cv_header_stdc = yes; then
28796  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28798/* end confdefs.h.  */
28799#include <string.h>
28800
28801_ACEOF
28802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28803  $EGREP "memchr" >/dev/null 2>&1; then :
28804
28805else
28806  ac_cv_header_stdc=no
28807fi
28808rm -f conftest*
28809
28810fi
28811
28812if test $ac_cv_header_stdc = yes; then
28813  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28815/* end confdefs.h.  */
28816#include <stdlib.h>
28817
28818_ACEOF
28819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28820  $EGREP "free" >/dev/null 2>&1; then :
28821
28822else
28823  ac_cv_header_stdc=no
28824fi
28825rm -f conftest*
28826
28827fi
28828
28829if test $ac_cv_header_stdc = yes; then
28830  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28831  if test "$cross_compiling" = yes; then :
28832  :
28833else
28834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28835/* end confdefs.h.  */
28836#include <ctype.h>
28837#include <stdlib.h>
28838#if ((' ' & 0x0FF) == 0x020)
28839# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28840# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28841#else
28842# define ISLOWER(c) \
28843		   (('a' <= (c) && (c) <= 'i') \
28844		     || ('j' <= (c) && (c) <= 'r') \
28845		     || ('s' <= (c) && (c) <= 'z'))
28846# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28847#endif
28848
28849#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28850int
28851main ()
28852{
28853  int i;
28854  for (i = 0; i < 256; i++)
28855    if (XOR (islower (i), ISLOWER (i))
28856	|| toupper (i) != TOUPPER (i))
28857      return 2;
28858  return 0;
28859}
28860_ACEOF
28861if ac_fn_cxx_try_run "$LINENO"; then :
28862
28863else
28864  ac_cv_header_stdc=no
28865fi
28866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28867  conftest.$ac_objext conftest.beam conftest.$ac_ext
28868fi
28869
28870fi
28871fi
28872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28873$as_echo "$ac_cv_header_stdc" >&6; }
28874if test $ac_cv_header_stdc = yes; then
28875
28876$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28877
28878fi
28879
28880# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28881for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28882		  inttypes.h stdint.h unistd.h
28883do :
28884  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28885ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28886"
28887if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28888  cat >>confdefs.h <<_ACEOF
28889#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28890_ACEOF
28891
28892fi
28893
28894done
28895
28896
28897
28898  ###############################################################################
28899  #
28900  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28901  # (The JVM can use 32 or 64 bit Java pointers but that decision
28902  # is made at runtime.)
28903  #
28904
28905  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28906    # Always specify -m flags on Solaris
28907
28908  # When we add flags to the "official" CFLAGS etc, we need to
28909  # keep track of these additions in ADDED_CFLAGS etc. These
28910  # will later be checked to make sure only controlled additions
28911  # have been made to CFLAGS etc.
28912  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28913  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28914  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28915
28916  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28917  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28918  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28919
28920  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28921  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28922  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28923
28924  elif test "x$COMPILE_TYPE" = xreduced; then
28925    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28926      # Specify -m if running reduced on other Posix platforms
28927
28928  # When we add flags to the "official" CFLAGS etc, we need to
28929  # keep track of these additions in ADDED_CFLAGS etc. These
28930  # will later be checked to make sure only controlled additions
28931  # have been made to CFLAGS etc.
28932  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28933  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28934  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28935
28936  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28937  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28938  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28939
28940  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28941  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28942  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28943
28944    fi
28945  fi
28946
28947  # Make compilation sanity check
28948  for ac_header in stdio.h
28949do :
28950  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28951if test "x$ac_cv_header_stdio_h" = xyes; then :
28952  cat >>confdefs.h <<_ACEOF
28953#define HAVE_STDIO_H 1
28954_ACEOF
28955
28956else
28957
28958    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28959$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28960    if test "x$COMPILE_TYPE" = xreduced; then
28961      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28962$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28963    elif test "x$COMPILE_TYPE" = xcross; then
28964      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28965$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28966    fi
28967    as_fn_error $? "Cannot continue." "$LINENO" 5
28968
28969fi
28970
28971done
28972
28973
28974  # The cast to long int works around a bug in the HP C Compiler
28975# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28976# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28977# This bug is HP SR number 8606223364.
28978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28979$as_echo_n "checking size of int *... " >&6; }
28980if ${ac_cv_sizeof_int_p+:} false; then :
28981  $as_echo_n "(cached) " >&6
28982else
28983  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28984
28985else
28986  if test "$ac_cv_type_int_p" = yes; then
28987     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28989as_fn_error 77 "cannot compute sizeof (int *)
28990See \`config.log' for more details" "$LINENO" 5; }
28991   else
28992     ac_cv_sizeof_int_p=0
28993   fi
28994fi
28995
28996fi
28997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28998$as_echo "$ac_cv_sizeof_int_p" >&6; }
28999
29000
29001
29002cat >>confdefs.h <<_ACEOF
29003#define SIZEOF_INT_P $ac_cv_sizeof_int_p
29004_ACEOF
29005
29006
29007
29008  if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
29009    # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
29010    SIZEOF_INT_P="$ac_cv_sizeof_int_p"
29011  fi
29012
29013  if test "x$SIZEOF_INT_P" = x; then
29014    # The test failed, lets stick to the assumed value.
29015    { $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
29016$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29017  else
29018    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
29019
29020    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29021      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
29022    fi
29023  fi
29024
29025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29026$as_echo_n "checking for target address size... " >&6; }
29027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29028$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29029
29030
29031  ###############################################################################
29032  #
29033  # Is the target little of big endian?
29034  #
29035   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29036$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29037if ${ac_cv_c_bigendian+:} false; then :
29038  $as_echo_n "(cached) " >&6
29039else
29040  ac_cv_c_bigendian=unknown
29041    # See if we're dealing with a universal compiler.
29042    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29043/* end confdefs.h.  */
29044#ifndef __APPLE_CC__
29045	       not a universal capable compiler
29046	     #endif
29047	     typedef int dummy;
29048
29049_ACEOF
29050if ac_fn_cxx_try_compile "$LINENO"; then :
29051
29052	# Check for potential -arch flags.  It is not universal unless
29053	# there are at least two -arch flags with different values.
29054	ac_arch=
29055	ac_prev=
29056	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29057	 if test -n "$ac_prev"; then
29058	   case $ac_word in
29059	     i?86 | x86_64 | ppc | ppc64)
29060	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29061		 ac_arch=$ac_word
29062	       else
29063		 ac_cv_c_bigendian=universal
29064		 break
29065	       fi
29066	       ;;
29067	   esac
29068	   ac_prev=
29069	 elif test "x$ac_word" = "x-arch"; then
29070	   ac_prev=arch
29071	 fi
29072       done
29073fi
29074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29075    if test $ac_cv_c_bigendian = unknown; then
29076      # See if sys/param.h defines the BYTE_ORDER macro.
29077      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29078/* end confdefs.h.  */
29079#include <sys/types.h>
29080	     #include <sys/param.h>
29081
29082int
29083main ()
29084{
29085#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29086		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29087		     && LITTLE_ENDIAN)
29088	      bogus endian macros
29089	     #endif
29090
29091  ;
29092  return 0;
29093}
29094_ACEOF
29095if ac_fn_cxx_try_compile "$LINENO"; then :
29096  # It does; now see whether it defined to BIG_ENDIAN or not.
29097	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29098/* end confdefs.h.  */
29099#include <sys/types.h>
29100		#include <sys/param.h>
29101
29102int
29103main ()
29104{
29105#if BYTE_ORDER != BIG_ENDIAN
29106		 not big endian
29107		#endif
29108
29109  ;
29110  return 0;
29111}
29112_ACEOF
29113if ac_fn_cxx_try_compile "$LINENO"; then :
29114  ac_cv_c_bigendian=yes
29115else
29116  ac_cv_c_bigendian=no
29117fi
29118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29119fi
29120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29121    fi
29122    if test $ac_cv_c_bigendian = unknown; then
29123      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29124      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29125/* end confdefs.h.  */
29126#include <limits.h>
29127
29128int
29129main ()
29130{
29131#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29132	      bogus endian macros
29133	     #endif
29134
29135  ;
29136  return 0;
29137}
29138_ACEOF
29139if ac_fn_cxx_try_compile "$LINENO"; then :
29140  # It does; now see whether it defined to _BIG_ENDIAN or not.
29141	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29142/* end confdefs.h.  */
29143#include <limits.h>
29144
29145int
29146main ()
29147{
29148#ifndef _BIG_ENDIAN
29149		 not big endian
29150		#endif
29151
29152  ;
29153  return 0;
29154}
29155_ACEOF
29156if ac_fn_cxx_try_compile "$LINENO"; then :
29157  ac_cv_c_bigendian=yes
29158else
29159  ac_cv_c_bigendian=no
29160fi
29161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29162fi
29163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29164    fi
29165    if test $ac_cv_c_bigendian = unknown; then
29166      # Compile a test program.
29167      if test "$cross_compiling" = yes; then :
29168  # Try to guess by grepping values from an object file.
29169	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29170/* end confdefs.h.  */
29171short int ascii_mm[] =
29172		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29173		short int ascii_ii[] =
29174		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29175		int use_ascii (int i) {
29176		  return ascii_mm[i] + ascii_ii[i];
29177		}
29178		short int ebcdic_ii[] =
29179		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29180		short int ebcdic_mm[] =
29181		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29182		int use_ebcdic (int i) {
29183		  return ebcdic_mm[i] + ebcdic_ii[i];
29184		}
29185		extern int foo;
29186
29187int
29188main ()
29189{
29190return use_ascii (foo) == use_ebcdic (foo);
29191  ;
29192  return 0;
29193}
29194_ACEOF
29195if ac_fn_cxx_try_compile "$LINENO"; then :
29196  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29197	      ac_cv_c_bigendian=yes
29198	    fi
29199	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29200	      if test "$ac_cv_c_bigendian" = unknown; then
29201		ac_cv_c_bigendian=no
29202	      else
29203		# finding both strings is unlikely to happen, but who knows?
29204		ac_cv_c_bigendian=unknown
29205	      fi
29206	    fi
29207fi
29208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29209else
29210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29211/* end confdefs.h.  */
29212$ac_includes_default
29213int
29214main ()
29215{
29216
29217	     /* Are we little or big endian?  From Harbison&Steele.  */
29218	     union
29219	     {
29220	       long int l;
29221	       char c[sizeof (long int)];
29222	     } u;
29223	     u.l = 1;
29224	     return u.c[sizeof (long int) - 1] == 1;
29225
29226  ;
29227  return 0;
29228}
29229_ACEOF
29230if ac_fn_cxx_try_run "$LINENO"; then :
29231  ac_cv_c_bigendian=no
29232else
29233  ac_cv_c_bigendian=yes
29234fi
29235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29236  conftest.$ac_objext conftest.beam conftest.$ac_ext
29237fi
29238
29239    fi
29240fi
29241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29242$as_echo "$ac_cv_c_bigendian" >&6; }
29243 case $ac_cv_c_bigendian in #(
29244   yes)
29245     ENDIAN="big";; #(
29246   no)
29247     ENDIAN="little" ;; #(
29248   universal)
29249     ENDIAN="universal_endianness"
29250     ;; #(
29251   *)
29252     ENDIAN="unknown" ;;
29253 esac
29254
29255
29256  if test "x$ENDIAN" = xuniversal_endianness; then
29257    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29258  fi
29259  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29260    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
29261  fi
29262
29263
29264# Configure flags for the tools
29265
29266
29267  ###############################################################################
29268  #
29269  # How to compile shared libraries.
29270  #
29271
29272  if test "x$GCC" = xyes; then
29273    COMPILER_NAME=gcc
29274    PICFLAG="-fPIC"
29275    LIBRARY_PREFIX=lib
29276    SHARED_LIBRARY='lib$1.so'
29277    STATIC_LIBRARY='lib$1.a'
29278    SHARED_LIBRARY_FLAGS="-shared"
29279    SHARED_LIBRARY_SUFFIX='.so'
29280    STATIC_LIBRARY_SUFFIX='.a'
29281    OBJ_SUFFIX='.o'
29282    EXE_SUFFIX=''
29283    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29284    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29285    C_FLAG_REORDER=''
29286    CXX_FLAG_REORDER=''
29287    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29288    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29289    LD="$CC"
29290    LDEXE="$CC"
29291    LDCXX="$CXX"
29292    LDEXECXX="$CXX"
29293    POST_STRIP_CMD="$STRIP -g"
29294
29295    # Linking is different on MacOSX
29296    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29297      # Might change in the future to clang.
29298      COMPILER_NAME=gcc
29299      SHARED_LIBRARY='lib$1.dylib'
29300      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29301      SHARED_LIBRARY_SUFFIX='.dylib'
29302      EXE_SUFFIX=''
29303      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29304      SET_SHARED_LIBRARY_MAPFILE=''
29305      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29306      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29307      POST_STRIP_CMD="$STRIP -S"
29308    fi
29309  else
29310    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29311      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29312      COMPILER_NAME=ossc
29313      PICFLAG="-KPIC"
29314      LIBRARY_PREFIX=lib
29315      SHARED_LIBRARY='lib$1.so'
29316      STATIC_LIBRARY='lib$1.a'
29317      SHARED_LIBRARY_FLAGS="-G"
29318      SHARED_LIBRARY_SUFFIX='.so'
29319      STATIC_LIBRARY_SUFFIX='.a'
29320      OBJ_SUFFIX='.o'
29321      EXE_SUFFIX=''
29322      SET_SHARED_LIBRARY_NAME=''
29323      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29324      C_FLAG_REORDER='-xF'
29325      CXX_FLAG_REORDER='-xF'
29326      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29327      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29328      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29329      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29330      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29331      POST_STRIP_CMD="$STRIP -x"
29332      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29333    fi
29334    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29335      # If it is not gcc, then assume it is the MS Visual Studio compiler
29336      COMPILER_NAME=cl
29337      PICFLAG=""
29338      LIBRARY_PREFIX=
29339      SHARED_LIBRARY='$1.dll'
29340      STATIC_LIBRARY='$1.lib'
29341      SHARED_LIBRARY_FLAGS="-LD"
29342      SHARED_LIBRARY_SUFFIX='.dll'
29343      STATIC_LIBRARY_SUFFIX='.lib'
29344      OBJ_SUFFIX='.obj'
29345      EXE_SUFFIX='.exe'
29346      SET_SHARED_LIBRARY_NAME=''
29347      SET_SHARED_LIBRARY_MAPFILE=''
29348      SET_SHARED_LIBRARY_ORIGIN=''
29349      SET_EXECUTABLE_ORIGIN=''
29350    fi
29351  fi
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371  # The (cross) compiler is now configured, we can now test capabilities
29372  # of the target platform.
29373
29374
29375
29376  ###############################################################################
29377  #
29378  # Setup the opt flags for different compilers
29379  # and different operating systems.
29380  #
29381
29382  #
29383  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29384  #
29385  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29386    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29387    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29388    CFLAGS="$CFLAGS -mstackrealign"
29389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29390$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29392/* end confdefs.h.  */
29393int main() { return 0; }
29394_ACEOF
29395if ac_fn_cxx_try_link "$LINENO"; then :
29396
29397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29398$as_echo "yes" >&6; }
29399
29400else
29401
29402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29403$as_echo "no" >&6; }
29404          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29405
29406
29407fi
29408rm -f core conftest.err conftest.$ac_objext \
29409    conftest$ac_exeext conftest.$ac_ext
29410  fi
29411
29412  C_FLAG_DEPS="-MMD -MF"
29413  CXX_FLAG_DEPS="-MMD -MF"
29414
29415  case $COMPILER_TYPE in
29416    CC )
29417      case $COMPILER_NAME in
29418        gcc )
29419          case $OPENJDK_TARGET_OS in
29420            macosx )
29421              # On MacOSX we optimize for size, something
29422              # we should do for all platforms?
29423              C_O_FLAG_HI="-Os"
29424              C_O_FLAG_NORM="-Os"
29425              C_O_FLAG_NONE=""
29426              ;;
29427            *)
29428              C_O_FLAG_HI="-O3"
29429              C_O_FLAG_NORM="-O2"
29430              C_O_FLAG_NONE="-O0"
29431              ;;
29432          esac
29433          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29434          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29435          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29436          CFLAGS_DEBUG_SYMBOLS="-g"
29437          CXXFLAGS_DEBUG_SYMBOLS="-g"
29438          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29439            CFLAGS_DEBUG_SYMBOLS="-g1"
29440            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29441          fi
29442          ;;
29443        ossc )
29444          #
29445          # Forte has different names for this with their C++ compiler...
29446          #
29447          C_FLAG_DEPS="-xMMD -xMF"
29448          CXX_FLAG_DEPS="-xMMD -xMF"
29449
29450          # Extra options used with HIGHEST
29451          #
29452          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29453          #          done with care, there are some assumptions below that need to
29454          #          be understood about the use of pointers, and IEEE behavior.
29455          #
29456          # Use non-standard floating point mode (not IEEE 754)
29457          CC_HIGHEST="$CC_HIGHEST -fns"
29458          # Do some simplification of floating point arithmetic (not IEEE 754)
29459          CC_HIGHEST="$CC_HIGHEST -fsimple"
29460          # Use single precision floating point with 'float'
29461          CC_HIGHEST="$CC_HIGHEST -fsingle"
29462          # Assume memory references via basic pointer types do not alias
29463          #   (Source with excessing pointer casting and data access with mixed
29464          #    pointer types are not recommended)
29465          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29466          # Use intrinsic or inline versions for math/std functions
29467          #   (If you expect perfect errno behavior, do not use this)
29468          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29469          # Loop data dependency optimizations (need -xO3 or higher)
29470          CC_HIGHEST="$CC_HIGHEST -xdepend"
29471          # Pointer parameters to functions do not overlap
29472          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29473          #    If you pass in multiple pointers to the same data, do not use this)
29474          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29475          # Inline some library routines
29476          #   (If you expect perfect errno behavior, do not use this)
29477          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29478          # Use optimized math routines
29479          #   (If you expect perfect errno behavior, do not use this)
29480          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29481          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29482
29483          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29484            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29485            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29486          fi
29487
29488          case $OPENJDK_TARGET_CPU_ARCH in
29489            x86)
29490              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29491              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29492              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29493              C_O_FLAG_NONE="-xregs=no%frameptr"
29494              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29495              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29496              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29497              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29498              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29499                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29500                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29501              fi
29502              ;;
29503            sparc)
29504              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29505              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29506              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29507              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29508              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29509              C_O_FLAG_NONE=""
29510              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29511              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29512              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29513              CXX_O_FLAG_NONE=""
29514              ;;
29515          esac
29516
29517          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29518          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29519      esac
29520      ;;
29521    CL )
29522      C_O_FLAG_HIGHEST="-O2"
29523      C_O_FLAG_HI="-O1"
29524      C_O_FLAG_NORM="-O1"
29525      C_O_FLAG_NONE="-Od"
29526      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29527      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29528      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29529      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29530      ;;
29531  esac
29532
29533  if test -z "$C_O_FLAG_HIGHEST"; then
29534    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29535  fi
29536
29537  if test -z "$CXX_O_FLAG_HIGHEST"; then
29538    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29539  fi
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29555    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29556$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29557  fi
29558
29559  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29561$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29562  fi
29563
29564  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29565    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29566$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29567  fi
29568
29569
29570# Check whether --with-extra-cflags was given.
29571if test "${with_extra_cflags+set}" = set; then :
29572  withval=$with_extra_cflags;
29573fi
29574
29575
29576
29577# Check whether --with-extra-cxxflags was given.
29578if test "${with_extra_cxxflags+set}" = set; then :
29579  withval=$with_extra_cxxflags;
29580fi
29581
29582
29583
29584# Check whether --with-extra-ldflags was given.
29585if test "${with_extra_ldflags+set}" = set; then :
29586  withval=$with_extra_ldflags;
29587fi
29588
29589
29590  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29591  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29592  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29593
29594  # Hotspot needs these set in their legacy form
29595  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29596  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29597  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29598
29599
29600
29601
29602
29603  ###############################################################################
29604  #
29605  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29606  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29607  #
29608  case $COMPILER_NAME in
29609    gcc )
29610      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29611      -pipe \
29612      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29613      case $OPENJDK_TARGET_CPU_ARCH in
29614        arm )
29615          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29616          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29617          ;;
29618        ppc )
29619          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29620          ;;
29621        * )
29622          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29623          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29624          ;;
29625      esac
29626      ;;
29627    ossc )
29628      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29629      case $OPENJDK_TARGET_CPU_ARCH in
29630        x86 )
29631          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29632          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29633          ;;
29634      esac
29635
29636      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29637      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29638
29639      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29640      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29641      ;;
29642    cl )
29643      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29644      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29645      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29646      -DWIN32 -DIAL"
29647      case $OPENJDK_TARGET_CPU in
29648        x86 )
29649          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29650          ;;
29651        x86_64 )
29652          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29653          ;;
29654      esac
29655      ;;
29656  esac
29657
29658  ###############################################################################
29659
29660  # Adjust flags according to debug level.
29661  case $DEBUG_LEVEL in
29662    fastdebug )
29663      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29664      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29665      C_O_FLAG_HI="$C_O_FLAG_NORM"
29666      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29667      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29668      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29669      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29670      ;;
29671    slowdebug )
29672      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29673      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29674      C_O_FLAG_HI="$C_O_FLAG_NONE"
29675      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29676      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29677      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29678      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29679      ;;
29680  esac
29681
29682  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29683
29684  # The package path is used only on macosx?
29685  PACKAGE_PATH=/opt/local
29686
29687
29688  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29689    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29690    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29691    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29692    #   Note: -Dmacro         is the same as    #define macro 1
29693    #         -Dmacro=        is the same as    #define macro
29694    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29695      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29696    else
29697      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29698    fi
29699  else
29700    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29701  fi
29702  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29703    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29704  fi
29705  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29706    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29707  fi
29708  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29709    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29710  fi
29711  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29712    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29713    # Setting these parameters makes it an error to link to macosx APIs that are
29714    # newer than the given OS version and makes the linked binaries compatible even
29715    # if built on a newer version of the OS.
29716    # The expected format is X.Y.Z
29717    MACOSX_VERSION_MIN=10.7.0
29718
29719    # The macro takes the version with no dots, ex: 1070
29720    # Let the flags variables get resolved in make for easier override on make
29721    # command line.
29722    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29723    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29724  fi
29725  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29726    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29727  fi
29728  if test "x$DEBUG_LEVEL" = xrelease; then
29729    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29730  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29731    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29732  fi
29733  else
29734    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29735  fi
29736
29737  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29738  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29739
29740  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29741      -I${JDK_OUTPUTDIR}/include \
29742      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29743      -I${JDK_TOPDIR}/src/share/javavm/export \
29744      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29745      -I${JDK_TOPDIR}/src/share/native/common \
29746      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29747
29748  # The shared libraries are compiled using the picflag.
29749  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29750  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29751
29752  # Executable flags
29753  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29754  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29755
29756  # Now this is odd. The JDK native libraries have to link against libjvm.so
29757  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29758  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29759  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29760  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29761  # libraries will link to whatever is in memory. Yuck.
29762  #
29763  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29764  if test "x$COMPILER_NAME" = xcl; then
29765    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29766    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29767      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29768    fi
29769    # TODO: make -debug optional "--disable-full-debug-symbols"
29770    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29771    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29772    LDFLAGS_JDKLIB_SUFFIX=""
29773    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29774      LDFLAGS_STACK_SIZE=1048576
29775    else
29776      LDFLAGS_STACK_SIZE=327680
29777    fi
29778    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29779  else
29780    if test "x$COMPILER_NAME" = xgcc; then
29781      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29782      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29783      if test -n "$HAS_GNU_HASH"; then
29784        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29785      fi
29786      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29787        # And since we now know that the linker is gnu, then add -z defs, to forbid
29788        # undefined symbols in object files.
29789        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29790        if test "x$DEBUG_LEVEL" = "xrelease"; then
29791          # When building release libraries, tell the linker optimize them.
29792          # Should this be supplied to the OSS linker as well?
29793          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29794        fi
29795      fi
29796    fi
29797    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29798        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29799
29800    # On some platforms (mac) the linker warns about non existing -L dirs.
29801    # Add server first if available. Linking aginst client does not always produce the same results.
29802    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29803    # Default to server for other variants.
29804    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29805      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29806    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29807      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29808    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29809      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29810    else
29811      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29812    fi
29813
29814    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29815    if test "x$COMPILER_NAME" = xossc; then
29816      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29817    fi
29818
29819    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29820    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29821      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29822    fi
29823  fi
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839  # Some Zero and Shark settings.
29840  # ZERO_ARCHFLAG tells the compiler which mode to build for
29841  case "${OPENJDK_TARGET_CPU}" in
29842    s390)
29843      ZERO_ARCHFLAG="-m31"
29844      ;;
29845    *)
29846      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29847  esac
29848
29849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29850$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29851  supports=yes
29852
29853  saved_cflags="$CFLAGS"
29854  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29855  ac_ext=c
29856ac_cpp='$CPP $CPPFLAGS'
29857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29859ac_compiler_gnu=$ac_cv_c_compiler_gnu
29860
29861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29862/* end confdefs.h.  */
29863int i;
29864_ACEOF
29865if ac_fn_c_try_compile "$LINENO"; then :
29866
29867else
29868  supports=no
29869fi
29870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29871  ac_ext=cpp
29872ac_cpp='$CXXCPP $CPPFLAGS'
29873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29876
29877  CFLAGS="$saved_cflags"
29878
29879  saved_cxxflags="$CXXFLAGS"
29880  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29881  ac_ext=cpp
29882ac_cpp='$CXXCPP $CPPFLAGS'
29883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29886
29887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29888/* end confdefs.h.  */
29889int i;
29890_ACEOF
29891if ac_fn_cxx_try_compile "$LINENO"; then :
29892
29893else
29894  supports=no
29895fi
29896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29897  ac_ext=cpp
29898ac_cpp='$CXXCPP $CPPFLAGS'
29899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29902
29903  CXXFLAGS="$saved_cxxflags"
29904
29905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29906$as_echo "$supports" >&6; }
29907  if test "x$supports" = "xyes" ; then
29908    :
29909  else
29910    ZERO_ARCHFLAG=""
29911  fi
29912
29913
29914
29915  # Check that the compiler supports -mX flags
29916  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29917
29918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29919$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29920  supports=yes
29921
29922  saved_cflags="$CFLAGS"
29923  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29924  ac_ext=c
29925ac_cpp='$CPP $CPPFLAGS'
29926ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29927ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29928ac_compiler_gnu=$ac_cv_c_compiler_gnu
29929
29930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29931/* end confdefs.h.  */
29932int i;
29933_ACEOF
29934if ac_fn_c_try_compile "$LINENO"; then :
29935
29936else
29937  supports=no
29938fi
29939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29940  ac_ext=cpp
29941ac_cpp='$CXXCPP $CPPFLAGS'
29942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29945
29946  CFLAGS="$saved_cflags"
29947
29948  saved_cxxflags="$CXXFLAGS"
29949  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29950  ac_ext=cpp
29951ac_cpp='$CXXCPP $CPPFLAGS'
29952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29955
29956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29957/* end confdefs.h.  */
29958int i;
29959_ACEOF
29960if ac_fn_cxx_try_compile "$LINENO"; then :
29961
29962else
29963  supports=no
29964fi
29965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29966  ac_ext=cpp
29967ac_cpp='$CXXCPP $CPPFLAGS'
29968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29971
29972  CXXFLAGS="$saved_cxxflags"
29973
29974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29975$as_echo "$supports" >&6; }
29976  if test "x$supports" = "xyes" ; then
29977    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29978  else
29979    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29980  fi
29981
29982
29983
29984
29985# Setup debug symbols (need objcopy from the toolchain for that)
29986
29987  #
29988  # ENABLE_DEBUG_SYMBOLS
29989  # This must be done after the toolchain is setup, since we're looking at objcopy.
29990  #
29991  # Check whether --enable-debug-symbols was given.
29992if test "${enable_debug_symbols+set}" = set; then :
29993  enableval=$enable_debug_symbols;
29994fi
29995
29996
29997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29998$as_echo_n "checking if we should generate debug symbols... " >&6; }
29999
30000  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30001    # explicit enabling of enable-debug-symbols and can't find objcopy
30002    #   this is an error
30003    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30004  fi
30005
30006  if test "x$enable_debug_symbols" = "xyes"; then
30007    ENABLE_DEBUG_SYMBOLS=true
30008  elif test "x$enable_debug_symbols" = "xno"; then
30009    ENABLE_DEBUG_SYMBOLS=false
30010  else
30011    # Default is on if objcopy is found
30012    if test "x$OBJCOPY" != x; then
30013      ENABLE_DEBUG_SYMBOLS=true
30014    # MacOS X and Windows don't use objcopy but default is on for those OSes
30015    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30016      ENABLE_DEBUG_SYMBOLS=true
30017    else
30018      ENABLE_DEBUG_SYMBOLS=false
30019    fi
30020  fi
30021
30022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30023$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30024
30025  #
30026  # ZIP_DEBUGINFO_FILES
30027  #
30028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30029$as_echo_n "checking if we should zip debug-info files... " >&6; }
30030  # Check whether --enable-zip-debug-info was given.
30031if test "${enable_zip_debug_info+set}" = set; then :
30032  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30033else
30034  enable_zip_debug_info="yes"
30035fi
30036
30037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30038$as_echo "${enable_zip_debug_info}" >&6; }
30039
30040  if test "x${enable_zip_debug_info}" = "xno"; then
30041    ZIP_DEBUGINFO_FILES=false
30042  else
30043    ZIP_DEBUGINFO_FILES=true
30044  fi
30045
30046
30047
30048
30049
30050
30051
30052###############################################################################
30053#
30054# Check dependencies for external and internal libraries.
30055#
30056###############################################################################
30057
30058# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30059
30060  # When using cygwin or msys, we need a wrapper binary that renames
30061  # /cygdrive/c/ arguments into c:/ arguments and peeks into
30062  # @files and rewrites these too! This wrapper binary is
30063  # called fixpath.
30064  FIXPATH=
30065  if test "x$OPENJDK_BUILD_OS" = xwindows; then
30066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30067$as_echo_n "checking if fixpath can be created... " >&6; }
30068    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30069    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30070    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30071      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30072      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30073      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30074      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30075    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30076      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30077      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30078
30079      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30080      # @ was chosen as separator to minimize risk of other tools messing around with it
30081      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30082      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30083
30084      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30085    fi
30086    rm -f $OUTPUT_ROOT/fixpath*
30087    cd $OUTPUT_ROOT
30088    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30089    cd $CURDIR
30090
30091    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30093$as_echo "no" >&6; }
30094      cat $OUTPUT_ROOT/fixpath1.log
30095      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30096    fi
30097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30098$as_echo "yes" >&6; }
30099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30100$as_echo_n "checking if fixpath.exe works... " >&6; }
30101    cd $OUTPUT_ROOT
30102    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30103    cd $CURDIR
30104    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30106$as_echo "no" >&6; }
30107      cat $OUTPUT_ROOT/fixpath2.log
30108      as_fn_error $? "fixpath did not work!" "$LINENO" 5
30109    fi
30110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30111$as_echo "yes" >&6; }
30112    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30113  fi
30114
30115
30116
30117
30118
30119
30120  ###############################################################################
30121  #
30122  # OS specific settings that we never will need to probe.
30123  #
30124  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30126$as_echo_n "checking what is not needed on Linux?... " >&6; }
30127    PULSE_NOT_NEEDED=yes
30128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30129$as_echo "pulse" >&6; }
30130  fi
30131
30132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30134$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30135    ALSA_NOT_NEEDED=yes
30136    PULSE_NOT_NEEDED=yes
30137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30138$as_echo "alsa pulse" >&6; }
30139  fi
30140
30141  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30143$as_echo_n "checking what is not needed on Windows?... " >&6; }
30144    CUPS_NOT_NEEDED=yes
30145    ALSA_NOT_NEEDED=yes
30146    PULSE_NOT_NEEDED=yes
30147    X11_NOT_NEEDED=yes
30148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30149$as_echo "alsa cups pulse x11" >&6; }
30150  fi
30151
30152  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30154$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30155    ALSA_NOT_NEEDED=yes
30156    PULSE_NOT_NEEDED=yes
30157    X11_NOT_NEEDED=yes
30158    # If the java runtime framework is disabled, then we need X11.
30159    # This will be adjusted below.
30160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30161$as_echo "alsa pulse x11" >&6; }
30162  fi
30163
30164  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30166$as_echo_n "checking what is not needed on bsd?... " >&6; }
30167    ALSA_NOT_NEEDED=yes
30168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30169$as_echo "alsa" >&6; }
30170  fi
30171
30172  if test "x$OPENJDK" = "xfalse"; then
30173    FREETYPE_NOT_NEEDED=yes
30174  fi
30175
30176  if test "x$SUPPORT_HEADFUL" = xno; then
30177    X11_NOT_NEEDED=yes
30178  fi
30179
30180  ###############################################################################
30181  #
30182  # Check for MacOSX support for OpenJDK.
30183  #
30184
30185
30186  # Check whether --enable-macosx-runtime-support was given.
30187if test "${enable_macosx_runtime_support+set}" = set; then :
30188  enableval=$enable_macosx_runtime_support;
30189fi
30190
30191  if test "x$enable_macosx_runtime_support" != x; then
30192    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30193$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30194  fi
30195
30196
30197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30198$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30199  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30201$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30202  else
30203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30204$as_echo "no" >&6; }
30205  fi
30206
30207
30208
30209  ###############################################################################
30210  #
30211  # Check for X Windows
30212  #
30213
30214  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30215  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30216  # --x-libraries for the sysroot, if that seems to be correct.
30217  if test "x$SYS_ROOT" != "x/"; then
30218    if test "x$x_includes" = xNONE; then
30219      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30220        x_includes="$SYS_ROOT/usr/X11R6/include"
30221      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30222        x_includes="$SYS_ROOT/usr/include"
30223      fi
30224    fi
30225    if test "x$x_libraries" = xNONE; then
30226      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30227        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30228      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30229        x_libraries="$SYS_ROOT/usr/lib64"
30230      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30231        x_libraries="$SYS_ROOT/usr/lib"
30232      fi
30233    fi
30234  fi
30235
30236  # Now let autoconf do it's magic
30237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30238$as_echo_n "checking for X... " >&6; }
30239
30240
30241# Check whether --with-x was given.
30242if test "${with_x+set}" = set; then :
30243  withval=$with_x;
30244fi
30245
30246# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30247if test "x$with_x" = xno; then
30248  # The user explicitly disabled X.
30249  have_x=disabled
30250else
30251  case $x_includes,$x_libraries in #(
30252    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30253    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30254  $as_echo_n "(cached) " >&6
30255else
30256  # One or both of the vars are not set, and there is no cached value.
30257ac_x_includes=no ac_x_libraries=no
30258rm -f -r conftest.dir
30259if mkdir conftest.dir; then
30260  cd conftest.dir
30261  cat >Imakefile <<'_ACEOF'
30262incroot:
30263	@echo incroot='${INCROOT}'
30264usrlibdir:
30265	@echo usrlibdir='${USRLIBDIR}'
30266libdir:
30267	@echo libdir='${LIBDIR}'
30268_ACEOF
30269  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30270    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30271    for ac_var in incroot usrlibdir libdir; do
30272      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30273    done
30274    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30275    for ac_extension in a so sl dylib la dll; do
30276      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30277	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30278	ac_im_usrlibdir=$ac_im_libdir; break
30279      fi
30280    done
30281    # Screen out bogus values from the imake configuration.  They are
30282    # bogus both because they are the default anyway, and because
30283    # using them would break gcc on systems where it needs fixed includes.
30284    case $ac_im_incroot in
30285	/usr/include) ac_x_includes= ;;
30286	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30287    esac
30288    case $ac_im_usrlibdir in
30289	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30290	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30291    esac
30292  fi
30293  cd ..
30294  rm -f -r conftest.dir
30295fi
30296
30297# Standard set of common directories for X headers.
30298# Check X11 before X11Rn because it is often a symlink to the current release.
30299ac_x_header_dirs='
30300/usr/X11/include
30301/usr/X11R7/include
30302/usr/X11R6/include
30303/usr/X11R5/include
30304/usr/X11R4/include
30305
30306/usr/include/X11
30307/usr/include/X11R7
30308/usr/include/X11R6
30309/usr/include/X11R5
30310/usr/include/X11R4
30311
30312/usr/local/X11/include
30313/usr/local/X11R7/include
30314/usr/local/X11R6/include
30315/usr/local/X11R5/include
30316/usr/local/X11R4/include
30317
30318/usr/local/include/X11
30319/usr/local/include/X11R7
30320/usr/local/include/X11R6
30321/usr/local/include/X11R5
30322/usr/local/include/X11R4
30323
30324/usr/X386/include
30325/usr/x386/include
30326/usr/XFree86/include/X11
30327
30328/usr/include
30329/usr/local/include
30330/usr/unsupported/include
30331/usr/athena/include
30332/usr/local/x11r5/include
30333/usr/lpp/Xamples/include
30334
30335/usr/openwin/include
30336/usr/openwin/share/include'
30337
30338if test "$ac_x_includes" = no; then
30339  # Guess where to find include files, by looking for Xlib.h.
30340  # First, try using that file with no special directory specified.
30341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30342/* end confdefs.h.  */
30343#include <X11/Xlib.h>
30344_ACEOF
30345if ac_fn_cxx_try_cpp "$LINENO"; then :
30346  # We can compile using X headers with no special include directory.
30347ac_x_includes=
30348else
30349  for ac_dir in $ac_x_header_dirs; do
30350  if test -r "$ac_dir/X11/Xlib.h"; then
30351    ac_x_includes=$ac_dir
30352    break
30353  fi
30354done
30355fi
30356rm -f conftest.err conftest.i conftest.$ac_ext
30357fi # $ac_x_includes = no
30358
30359if test "$ac_x_libraries" = no; then
30360  # Check for the libraries.
30361  # See if we find them without any special options.
30362  # Don't add to $LIBS permanently.
30363  ac_save_LIBS=$LIBS
30364  LIBS="-lX11 $LIBS"
30365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366/* end confdefs.h.  */
30367#include <X11/Xlib.h>
30368int
30369main ()
30370{
30371XrmInitialize ()
30372  ;
30373  return 0;
30374}
30375_ACEOF
30376if ac_fn_cxx_try_link "$LINENO"; then :
30377  LIBS=$ac_save_LIBS
30378# We can link X programs with no special library path.
30379ac_x_libraries=
30380else
30381  LIBS=$ac_save_LIBS
30382for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30383do
30384  # Don't even attempt the hair of trying to link an X program!
30385  for ac_extension in a so sl dylib la dll; do
30386    if test -r "$ac_dir/libX11.$ac_extension"; then
30387      ac_x_libraries=$ac_dir
30388      break 2
30389    fi
30390  done
30391done
30392fi
30393rm -f core conftest.err conftest.$ac_objext \
30394    conftest$ac_exeext conftest.$ac_ext
30395fi # $ac_x_libraries = no
30396
30397case $ac_x_includes,$ac_x_libraries in #(
30398  no,* | *,no | *\'*)
30399    # Didn't find X, or a directory has "'" in its name.
30400    ac_cv_have_x="have_x=no";; #(
30401  *)
30402    # Record where we found X for the cache.
30403    ac_cv_have_x="have_x=yes\
30404	ac_x_includes='$ac_x_includes'\
30405	ac_x_libraries='$ac_x_libraries'"
30406esac
30407fi
30408;; #(
30409    *) have_x=yes;;
30410  esac
30411  eval "$ac_cv_have_x"
30412fi # $with_x != no
30413
30414if test "$have_x" != yes; then
30415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30416$as_echo "$have_x" >&6; }
30417  no_x=yes
30418else
30419  # If each of the values was on the command line, it overrides each guess.
30420  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30421  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30422  # Update the cache value to reflect the command line values.
30423  ac_cv_have_x="have_x=yes\
30424	ac_x_includes='$x_includes'\
30425	ac_x_libraries='$x_libraries'"
30426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30427$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30428fi
30429
30430  if test "$no_x" = yes; then
30431  # Not all programs may use this symbol, but it does not hurt to define it.
30432
30433$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30434
30435  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30436else
30437  if test -n "$x_includes"; then
30438    X_CFLAGS="$X_CFLAGS -I$x_includes"
30439  fi
30440
30441  # It would also be nice to do this for all -L options, not just this one.
30442  if test -n "$x_libraries"; then
30443    X_LIBS="$X_LIBS -L$x_libraries"
30444    # For Solaris; some versions of Sun CC require a space after -R and
30445    # others require no space.  Words are not sufficient . . . .
30446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30447$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30448    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30449    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30450    ac_cxx_werror_flag=yes
30451    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30452/* end confdefs.h.  */
30453
30454int
30455main ()
30456{
30457
30458  ;
30459  return 0;
30460}
30461_ACEOF
30462if ac_fn_cxx_try_link "$LINENO"; then :
30463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30464$as_echo "no" >&6; }
30465       X_LIBS="$X_LIBS -R$x_libraries"
30466else
30467  LIBS="$ac_xsave_LIBS -R $x_libraries"
30468       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30469/* end confdefs.h.  */
30470
30471int
30472main ()
30473{
30474
30475  ;
30476  return 0;
30477}
30478_ACEOF
30479if ac_fn_cxx_try_link "$LINENO"; then :
30480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30481$as_echo "yes" >&6; }
30482	  X_LIBS="$X_LIBS -R $x_libraries"
30483else
30484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30485$as_echo "neither works" >&6; }
30486fi
30487rm -f core conftest.err conftest.$ac_objext \
30488    conftest$ac_exeext conftest.$ac_ext
30489fi
30490rm -f core conftest.err conftest.$ac_objext \
30491    conftest$ac_exeext conftest.$ac_ext
30492    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30493    LIBS=$ac_xsave_LIBS
30494  fi
30495
30496  # Check for system-dependent libraries X programs must link with.
30497  # Do this before checking for the system-independent R6 libraries
30498  # (-lICE), since we may need -lsocket or whatever for X linking.
30499
30500  if test "$ISC" = yes; then
30501    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30502  else
30503    # Martyn Johnson says this is needed for Ultrix, if the X
30504    # libraries were built with DECnet support.  And Karl Berry says
30505    # the Alpha needs dnet_stub (dnet does not exist).
30506    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30507    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30508/* end confdefs.h.  */
30509
30510/* Override any GCC internal prototype to avoid an error.
30511   Use char because int might match the return type of a GCC
30512   builtin and then its argument prototype would still apply.  */
30513#ifdef __cplusplus
30514extern "C"
30515#endif
30516char XOpenDisplay ();
30517int
30518main ()
30519{
30520return XOpenDisplay ();
30521  ;
30522  return 0;
30523}
30524_ACEOF
30525if ac_fn_cxx_try_link "$LINENO"; then :
30526
30527else
30528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30529$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30530if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30531  $as_echo_n "(cached) " >&6
30532else
30533  ac_check_lib_save_LIBS=$LIBS
30534LIBS="-ldnet  $LIBS"
30535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30536/* end confdefs.h.  */
30537
30538/* Override any GCC internal prototype to avoid an error.
30539   Use char because int might match the return type of a GCC
30540   builtin and then its argument prototype would still apply.  */
30541#ifdef __cplusplus
30542extern "C"
30543#endif
30544char dnet_ntoa ();
30545int
30546main ()
30547{
30548return dnet_ntoa ();
30549  ;
30550  return 0;
30551}
30552_ACEOF
30553if ac_fn_cxx_try_link "$LINENO"; then :
30554  ac_cv_lib_dnet_dnet_ntoa=yes
30555else
30556  ac_cv_lib_dnet_dnet_ntoa=no
30557fi
30558rm -f core conftest.err conftest.$ac_objext \
30559    conftest$ac_exeext conftest.$ac_ext
30560LIBS=$ac_check_lib_save_LIBS
30561fi
30562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30563$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30564if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30565  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30566fi
30567
30568    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30570$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30571if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30572  $as_echo_n "(cached) " >&6
30573else
30574  ac_check_lib_save_LIBS=$LIBS
30575LIBS="-ldnet_stub  $LIBS"
30576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30577/* end confdefs.h.  */
30578
30579/* Override any GCC internal prototype to avoid an error.
30580   Use char because int might match the return type of a GCC
30581   builtin and then its argument prototype would still apply.  */
30582#ifdef __cplusplus
30583extern "C"
30584#endif
30585char dnet_ntoa ();
30586int
30587main ()
30588{
30589return dnet_ntoa ();
30590  ;
30591  return 0;
30592}
30593_ACEOF
30594if ac_fn_cxx_try_link "$LINENO"; then :
30595  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30596else
30597  ac_cv_lib_dnet_stub_dnet_ntoa=no
30598fi
30599rm -f core conftest.err conftest.$ac_objext \
30600    conftest$ac_exeext conftest.$ac_ext
30601LIBS=$ac_check_lib_save_LIBS
30602fi
30603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30604$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30605if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30606  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30607fi
30608
30609    fi
30610fi
30611rm -f core conftest.err conftest.$ac_objext \
30612    conftest$ac_exeext conftest.$ac_ext
30613    LIBS="$ac_xsave_LIBS"
30614
30615    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30616    # to get the SysV transport functions.
30617    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30618    # needs -lnsl.
30619    # The nsl library prevents programs from opening the X display
30620    # on Irix 5.2, according to T.E. Dickey.
30621    # The functions gethostbyname, getservbyname, and inet_addr are
30622    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30623    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30624if test "x$ac_cv_func_gethostbyname" = xyes; then :
30625
30626fi
30627
30628    if test $ac_cv_func_gethostbyname = no; then
30629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30630$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30631if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30632  $as_echo_n "(cached) " >&6
30633else
30634  ac_check_lib_save_LIBS=$LIBS
30635LIBS="-lnsl  $LIBS"
30636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30637/* end confdefs.h.  */
30638
30639/* Override any GCC internal prototype to avoid an error.
30640   Use char because int might match the return type of a GCC
30641   builtin and then its argument prototype would still apply.  */
30642#ifdef __cplusplus
30643extern "C"
30644#endif
30645char gethostbyname ();
30646int
30647main ()
30648{
30649return gethostbyname ();
30650  ;
30651  return 0;
30652}
30653_ACEOF
30654if ac_fn_cxx_try_link "$LINENO"; then :
30655  ac_cv_lib_nsl_gethostbyname=yes
30656else
30657  ac_cv_lib_nsl_gethostbyname=no
30658fi
30659rm -f core conftest.err conftest.$ac_objext \
30660    conftest$ac_exeext conftest.$ac_ext
30661LIBS=$ac_check_lib_save_LIBS
30662fi
30663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30664$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30665if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30666  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30667fi
30668
30669      if test $ac_cv_lib_nsl_gethostbyname = no; then
30670	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30671$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30672if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30673  $as_echo_n "(cached) " >&6
30674else
30675  ac_check_lib_save_LIBS=$LIBS
30676LIBS="-lbsd  $LIBS"
30677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30678/* end confdefs.h.  */
30679
30680/* Override any GCC internal prototype to avoid an error.
30681   Use char because int might match the return type of a GCC
30682   builtin and then its argument prototype would still apply.  */
30683#ifdef __cplusplus
30684extern "C"
30685#endif
30686char gethostbyname ();
30687int
30688main ()
30689{
30690return gethostbyname ();
30691  ;
30692  return 0;
30693}
30694_ACEOF
30695if ac_fn_cxx_try_link "$LINENO"; then :
30696  ac_cv_lib_bsd_gethostbyname=yes
30697else
30698  ac_cv_lib_bsd_gethostbyname=no
30699fi
30700rm -f core conftest.err conftest.$ac_objext \
30701    conftest$ac_exeext conftest.$ac_ext
30702LIBS=$ac_check_lib_save_LIBS
30703fi
30704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30705$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30706if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30707  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30708fi
30709
30710      fi
30711    fi
30712
30713    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30714    # socket/setsockopt and other routines are undefined under SCO ODT
30715    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30716    # on later versions), says Simon Leinen: it contains gethostby*
30717    # variants that don't use the name server (or something).  -lsocket
30718    # must be given before -lnsl if both are needed.  We assume that
30719    # if connect needs -lnsl, so does gethostbyname.
30720    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30721if test "x$ac_cv_func_connect" = xyes; then :
30722
30723fi
30724
30725    if test $ac_cv_func_connect = no; then
30726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30727$as_echo_n "checking for connect in -lsocket... " >&6; }
30728if ${ac_cv_lib_socket_connect+:} false; then :
30729  $as_echo_n "(cached) " >&6
30730else
30731  ac_check_lib_save_LIBS=$LIBS
30732LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30734/* end confdefs.h.  */
30735
30736/* Override any GCC internal prototype to avoid an error.
30737   Use char because int might match the return type of a GCC
30738   builtin and then its argument prototype would still apply.  */
30739#ifdef __cplusplus
30740extern "C"
30741#endif
30742char connect ();
30743int
30744main ()
30745{
30746return connect ();
30747  ;
30748  return 0;
30749}
30750_ACEOF
30751if ac_fn_cxx_try_link "$LINENO"; then :
30752  ac_cv_lib_socket_connect=yes
30753else
30754  ac_cv_lib_socket_connect=no
30755fi
30756rm -f core conftest.err conftest.$ac_objext \
30757    conftest$ac_exeext conftest.$ac_ext
30758LIBS=$ac_check_lib_save_LIBS
30759fi
30760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30761$as_echo "$ac_cv_lib_socket_connect" >&6; }
30762if test "x$ac_cv_lib_socket_connect" = xyes; then :
30763  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30764fi
30765
30766    fi
30767
30768    # Guillermo Gomez says -lposix is necessary on A/UX.
30769    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30770if test "x$ac_cv_func_remove" = xyes; then :
30771
30772fi
30773
30774    if test $ac_cv_func_remove = no; then
30775      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30776$as_echo_n "checking for remove in -lposix... " >&6; }
30777if ${ac_cv_lib_posix_remove+:} false; then :
30778  $as_echo_n "(cached) " >&6
30779else
30780  ac_check_lib_save_LIBS=$LIBS
30781LIBS="-lposix  $LIBS"
30782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30783/* end confdefs.h.  */
30784
30785/* Override any GCC internal prototype to avoid an error.
30786   Use char because int might match the return type of a GCC
30787   builtin and then its argument prototype would still apply.  */
30788#ifdef __cplusplus
30789extern "C"
30790#endif
30791char remove ();
30792int
30793main ()
30794{
30795return remove ();
30796  ;
30797  return 0;
30798}
30799_ACEOF
30800if ac_fn_cxx_try_link "$LINENO"; then :
30801  ac_cv_lib_posix_remove=yes
30802else
30803  ac_cv_lib_posix_remove=no
30804fi
30805rm -f core conftest.err conftest.$ac_objext \
30806    conftest$ac_exeext conftest.$ac_ext
30807LIBS=$ac_check_lib_save_LIBS
30808fi
30809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30810$as_echo "$ac_cv_lib_posix_remove" >&6; }
30811if test "x$ac_cv_lib_posix_remove" = xyes; then :
30812  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30813fi
30814
30815    fi
30816
30817    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30818    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30819if test "x$ac_cv_func_shmat" = xyes; then :
30820
30821fi
30822
30823    if test $ac_cv_func_shmat = no; then
30824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30825$as_echo_n "checking for shmat in -lipc... " >&6; }
30826if ${ac_cv_lib_ipc_shmat+:} false; then :
30827  $as_echo_n "(cached) " >&6
30828else
30829  ac_check_lib_save_LIBS=$LIBS
30830LIBS="-lipc  $LIBS"
30831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30832/* end confdefs.h.  */
30833
30834/* Override any GCC internal prototype to avoid an error.
30835   Use char because int might match the return type of a GCC
30836   builtin and then its argument prototype would still apply.  */
30837#ifdef __cplusplus
30838extern "C"
30839#endif
30840char shmat ();
30841int
30842main ()
30843{
30844return shmat ();
30845  ;
30846  return 0;
30847}
30848_ACEOF
30849if ac_fn_cxx_try_link "$LINENO"; then :
30850  ac_cv_lib_ipc_shmat=yes
30851else
30852  ac_cv_lib_ipc_shmat=no
30853fi
30854rm -f core conftest.err conftest.$ac_objext \
30855    conftest$ac_exeext conftest.$ac_ext
30856LIBS=$ac_check_lib_save_LIBS
30857fi
30858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30859$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30860if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30861  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30862fi
30863
30864    fi
30865  fi
30866
30867  # Check for libraries that X11R6 Xt/Xaw programs need.
30868  ac_save_LDFLAGS=$LDFLAGS
30869  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30870  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30871  # check for ICE first), but we must link in the order -lSM -lICE or
30872  # we get undefined symbols.  So assume we have SM if we have ICE.
30873  # These have to be linked with before -lX11, unlike the other
30874  # libraries we check for below, so use a different variable.
30875  # John Interrante, Karl Berry
30876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30877$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30878if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30879  $as_echo_n "(cached) " >&6
30880else
30881  ac_check_lib_save_LIBS=$LIBS
30882LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30884/* end confdefs.h.  */
30885
30886/* Override any GCC internal prototype to avoid an error.
30887   Use char because int might match the return type of a GCC
30888   builtin and then its argument prototype would still apply.  */
30889#ifdef __cplusplus
30890extern "C"
30891#endif
30892char IceConnectionNumber ();
30893int
30894main ()
30895{
30896return IceConnectionNumber ();
30897  ;
30898  return 0;
30899}
30900_ACEOF
30901if ac_fn_cxx_try_link "$LINENO"; then :
30902  ac_cv_lib_ICE_IceConnectionNumber=yes
30903else
30904  ac_cv_lib_ICE_IceConnectionNumber=no
30905fi
30906rm -f core conftest.err conftest.$ac_objext \
30907    conftest$ac_exeext conftest.$ac_ext
30908LIBS=$ac_check_lib_save_LIBS
30909fi
30910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30911$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30912if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30913  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30914fi
30915
30916  LDFLAGS=$ac_save_LDFLAGS
30917
30918fi
30919
30920
30921  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30922  # this doesn't make sense so we remove it.
30923  if test "x$COMPILE_TYPE" = xcross; then
30924    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30925  fi
30926
30927  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30928
30929  # Print a helpful message on how to acquire the necessary build dependency.
30930  # x11 is the help tag: freetype, cups, pulse, alsa etc
30931  MISSING_DEPENDENCY=x11
30932
30933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30934    cygwin_help $MISSING_DEPENDENCY
30935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30936    msys_help $MISSING_DEPENDENCY
30937  else
30938    PKGHANDLER_COMMAND=
30939
30940    case $PKGHANDLER in
30941      apt-get)
30942        apt_help     $MISSING_DEPENDENCY ;;
30943      yum)
30944        yum_help     $MISSING_DEPENDENCY ;;
30945      port)
30946        port_help    $MISSING_DEPENDENCY ;;
30947      pkgutil)
30948        pkgutil_help $MISSING_DEPENDENCY ;;
30949      pkgadd)
30950        pkgadd_help  $MISSING_DEPENDENCY ;;
30951      * )
30952        break ;;
30953    esac
30954
30955    if test "x$PKGHANDLER_COMMAND" != x; then
30956      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30957    fi
30958  fi
30959
30960    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30961  fi
30962
30963  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30964    OPENWIN_HOME="/usr/openwin"
30965  fi
30966
30967
30968
30969  #
30970  # Weird Sol10 something check...TODO change to try compile
30971  #
30972  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30973    if test "`uname -r`" = "5.10"; then
30974      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30975        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30976      fi
30977    fi
30978  fi
30979
30980  ac_ext=c
30981ac_cpp='$CPP $CPPFLAGS'
30982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30984ac_compiler_gnu=$ac_cv_c_compiler_gnu
30985
30986  OLD_CFLAGS="$CFLAGS"
30987  CFLAGS="$CFLAGS $X_CFLAGS"
30988
30989  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30990  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30991do :
30992  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30993ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
30994        # include <X11/Xlib.h>
30995        # include <X11/Xutil.h>
30996
30997
30998"
30999if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31000  cat >>confdefs.h <<_ACEOF
31001#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31002_ACEOF
31003 X11_A_OK=yes
31004else
31005  X11_A_OK=no; break
31006fi
31007
31008done
31009
31010
31011  CFLAGS="$OLD_CFLAGS"
31012  ac_ext=cpp
31013ac_cpp='$CXXCPP $CPPFLAGS'
31014ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31015ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31016ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31017
31018
31019  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31020
31021  # Print a helpful message on how to acquire the necessary build dependency.
31022  # x11 is the help tag: freetype, cups, pulse, alsa etc
31023  MISSING_DEPENDENCY=x11
31024
31025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31026    cygwin_help $MISSING_DEPENDENCY
31027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31028    msys_help $MISSING_DEPENDENCY
31029  else
31030    PKGHANDLER_COMMAND=
31031
31032    case $PKGHANDLER in
31033      apt-get)
31034        apt_help     $MISSING_DEPENDENCY ;;
31035      yum)
31036        yum_help     $MISSING_DEPENDENCY ;;
31037      port)
31038        port_help    $MISSING_DEPENDENCY ;;
31039      pkgutil)
31040        pkgutil_help $MISSING_DEPENDENCY ;;
31041      pkgadd)
31042        pkgadd_help  $MISSING_DEPENDENCY ;;
31043      * )
31044        break ;;
31045    esac
31046
31047    if test "x$PKGHANDLER_COMMAND" != x; then
31048      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31049    fi
31050  fi
31051
31052    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31053  fi
31054
31055
31056
31057
31058
31059
31060  ###############################################################################
31061  #
31062  # The common unix printing system cups is used to print from java.
31063  #
31064
31065# Check whether --with-cups was given.
31066if test "${with_cups+set}" = set; then :
31067  withval=$with_cups;
31068fi
31069
31070
31071# Check whether --with-cups-include was given.
31072if test "${with_cups_include+set}" = set; then :
31073  withval=$with_cups_include;
31074fi
31075
31076
31077  if test "x$CUPS_NOT_NEEDED" = xyes; then
31078    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31079      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31080$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31081    fi
31082    CUPS_CFLAGS=
31083  else
31084    CUPS_FOUND=no
31085
31086    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31087      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31088    fi
31089
31090    if test "x${with_cups}" != x; then
31091      CUPS_CFLAGS="-I${with_cups}/include"
31092      CUPS_FOUND=yes
31093    fi
31094    if test "x${with_cups_include}" != x; then
31095      CUPS_CFLAGS="-I${with_cups_include}"
31096      CUPS_FOUND=yes
31097    fi
31098    if test "x$CUPS_FOUND" = xno; then
31099
31100
31101  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31102    # Source the builddeps file again, to make sure it uses the latest variables!
31103    . $builddepsfile
31104    # Look for a target and build machine specific resource!
31105    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31106    if test "x$resource" = x; then
31107      # Ok, lets instead look for a target specific resource
31108      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31109    fi
31110    if test "x$resource" = x; then
31111      # Ok, lets instead look for a build specific resource
31112      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31113    fi
31114    if test "x$resource" = x; then
31115      # Ok, lets instead look for a generic resource
31116      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31117      resource=${builddep_cups}
31118    fi
31119    if test "x$resource" != x; then
31120      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31121$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31122      # If the resource in the builddeps.conf file is an existing directory,
31123      # for example /java/linux/cups
31124      if test -d ${resource}; then
31125        depdir=${resource}
31126      else
31127
31128  # cups is for example mymodule
31129  # $resource is for example libs/general/libmymod_1_2_3.zip
31130  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31131  # $with_builddeps_dir is for example /localhome/builddeps
31132  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31133  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31134  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31135  filename=`basename $resource`
31136  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31137  filebase=${filename%%.*}
31138  extension=${filename#*.}
31139  installdir=$with_builddeps_dir/$filebase
31140  if test ! -f $installdir/$filename.unpacked; then
31141    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31142$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31143    if test ! -d $installdir; then
31144      mkdir -p $installdir
31145    fi
31146    if test ! -d $installdir; then
31147      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31148    fi
31149    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31150    touch $tmpfile
31151    if test ! -f $tmpfile; then
31152      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31153    fi
31154
31155  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31156  # $tmpfile is the local file name for the downloaded file.
31157  VALID_TOOL=no
31158  if test "x$BDEPS_FTP" = xwget; then
31159    VALID_TOOL=yes
31160    wget -O $tmpfile $with_builddeps_server/$resource
31161  fi
31162  if test "x$BDEPS_FTP" = xlftp; then
31163    VALID_TOOL=yes
31164    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31165  fi
31166  if test "x$BDEPS_FTP" = xftp; then
31167    VALID_TOOL=yes
31168    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31169    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31170    FTPUSERPWD=${FTPSERVER%%@*}
31171    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31172      FTPUSER=${userpwd%%:*}
31173      FTPPWD=${userpwd#*@}
31174      FTPSERVER=${FTPSERVER#*@}
31175    else
31176      FTPUSER=ftp
31177      FTPPWD=ftp
31178    fi
31179    # the "pass" command does not work on some
31180    # ftp clients (read ftp.exe) but if it works,
31181    # passive mode is better!
31182    ( \
31183        echo "user $FTPUSER $FTPPWD"        ; \
31184        echo "pass"                         ; \
31185        echo "bin"                          ; \
31186        echo "get $FTPPATH $tmpfile"              ; \
31187    ) | ftp -in $FTPSERVER
31188  fi
31189  if test "x$VALID_TOOL" != xyes; then
31190    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31191  fi
31192
31193    mv $tmpfile $installdir/$filename
31194    if test ! -s $installdir/$filename; then
31195      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31196    fi
31197    case "$extension" in
31198      zip)  echo "Unzipping $installdir/$filename..."
31199        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31200        ;;
31201      tar.gz) echo "Untaring $installdir/$filename..."
31202        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31203        ;;
31204      tgz) echo "Untaring $installdir/$filename..."
31205        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31206        ;;
31207      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31208        ;;
31209    esac
31210  fi
31211  if test -f $installdir/$filename.unpacked; then
31212    depdir=$installdir
31213  fi
31214
31215      fi
31216      # Source the builddeps file again, because in the previous command, the depdir
31217      # was updated to point at the current build dependency install directory.
31218      . $builddepsfile
31219      # Now extract variables from the builddeps.conf files.
31220      theroot=${builddep_cups_ROOT}
31221      thecflags=${builddep_cups_CFLAGS}
31222      thelibs=${builddep_cups_LIBS}
31223      if test "x$depdir" = x; then
31224        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31225      fi
31226      CUPS=$depdir
31227      if test "x$theroot" != x; then
31228        CUPS="$theroot"
31229      fi
31230      if test "x$thecflags" != x; then
31231        CUPS_CFLAGS="$thecflags"
31232      fi
31233      if test "x$thelibs" != x; then
31234        CUPS_LIBS="$thelibs"
31235      fi
31236      CUPS_FOUND=yes
31237
31238    fi
31239
31240  fi
31241
31242    fi
31243    if test "x$CUPS_FOUND" = xno; then
31244      # Are the cups headers installed in the default /usr/include location?
31245      for ac_header in cups/cups.h cups/ppd.h
31246do :
31247  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31248ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31249if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31250  cat >>confdefs.h <<_ACEOF
31251#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31252_ACEOF
31253
31254            CUPS_FOUND=yes
31255            CUPS_CFLAGS=
31256            DEFAULT_CUPS=yes
31257
31258
31259fi
31260
31261done
31262
31263    fi
31264    if test "x$CUPS_FOUND" = xno; then
31265      # Getting nervous now? Lets poke around for standard Solaris third-party
31266      # package installation locations.
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31268$as_echo_n "checking for cups headers... " >&6; }
31269      if test -s /opt/sfw/cups/include/cups/cups.h; then
31270        # An SFW package seems to be installed!
31271        CUPS_FOUND=yes
31272        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31273      elif test -s /opt/csw/include/cups/cups.h; then
31274        # A CSW package seems to be installed!
31275        CUPS_FOUND=yes
31276        CUPS_CFLAGS="-I/opt/csw/include"
31277      fi
31278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31279$as_echo "$CUPS_FOUND" >&6; }
31280    fi
31281    if test "x$CUPS_FOUND" = xno; then
31282
31283  # Print a helpful message on how to acquire the necessary build dependency.
31284  # cups is the help tag: freetype, cups, pulse, alsa etc
31285  MISSING_DEPENDENCY=cups
31286
31287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31288    cygwin_help $MISSING_DEPENDENCY
31289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31290    msys_help $MISSING_DEPENDENCY
31291  else
31292    PKGHANDLER_COMMAND=
31293
31294    case $PKGHANDLER in
31295      apt-get)
31296        apt_help     $MISSING_DEPENDENCY ;;
31297      yum)
31298        yum_help     $MISSING_DEPENDENCY ;;
31299      port)
31300        port_help    $MISSING_DEPENDENCY ;;
31301      pkgutil)
31302        pkgutil_help $MISSING_DEPENDENCY ;;
31303      pkgadd)
31304        pkgadd_help  $MISSING_DEPENDENCY ;;
31305      * )
31306        break ;;
31307    esac
31308
31309    if test "x$PKGHANDLER_COMMAND" != x; then
31310      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31311    fi
31312  fi
31313
31314      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31315    fi
31316  fi
31317
31318
31319
31320
31321
31322
31323  ###############################################################################
31324  #
31325  # The ubiquitous freetype library is used to render fonts.
31326  #
31327
31328# Check whether --with-freetype was given.
31329if test "${with_freetype+set}" = set; then :
31330  withval=$with_freetype;
31331fi
31332
31333
31334# Check whether --with-freetype-include was given.
31335if test "${with_freetype_include+set}" = set; then :
31336  withval=$with_freetype_include;
31337fi
31338
31339
31340# Check whether --with-freetype-lib was given.
31341if test "${with_freetype_lib+set}" = set; then :
31342  withval=$with_freetype_lib;
31343fi
31344
31345  # Check whether --enable-freetype-bundling was given.
31346if test "${enable_freetype_bundling+set}" = set; then :
31347  enableval=$enable_freetype_bundling;
31348fi
31349
31350
31351  FREETYPE_CFLAGS=
31352  FREETYPE_LIBS=
31353  FREETYPE_BUNDLE_LIB_PATH=
31354
31355  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31356    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31357      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31358$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31359    fi
31360    if test "x$enable_freetype_bundling" != x; then
31361      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31362$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31363    fi
31364  else
31365    # freetype is needed to build; go get it!
31366
31367    BUNDLE_FREETYPE="$enable_freetype_bundling"
31368
31369    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31370      # User has specified settings
31371
31372      if test "x$BUNDLE_FREETYPE" = x; then
31373        # If not specified, default is to bundle freetype
31374        BUNDLE_FREETYPE=yes
31375      fi
31376
31377      if test "x$with_freetype" != x; then
31378        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31379        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31380      fi
31381
31382      # Allow --with-freetype-lib and --with-freetype-include to override
31383      if test "x$with_freetype_include" != x; then
31384        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31385      fi
31386      if test "x$with_freetype_lib" != x; then
31387        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31388      fi
31389
31390      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31391        # Okay, we got it. Check that it works.
31392
31393  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31394  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31395  METHOD="--with-freetype"
31396
31397  # First check if the files exists.
31398  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31399    # We found an arbitrary include file. That's a good sign.
31400    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31401$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31402    FOUND_FREETYPE=yes
31403
31404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31406      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31407$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31408      FOUND_FREETYPE=no
31409    else
31410      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31411        # On Windows, we will need both .lib and .dll file.
31412        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31413          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31414$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31415          FOUND_FREETYPE=no
31416        fi
31417      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
31418        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31419        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31420      fi
31421    fi
31422  fi
31423
31424  if test "x$FOUND_FREETYPE" = xyes; then
31425
31426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31427
31428  # Input might be given as Windows format, start by converting to
31429  # unix format.
31430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31431  new_path=`$CYGPATH -u "$path"`
31432
31433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31436  # "foo.exe" is OK but "foo" is an error.
31437  #
31438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31439  # It is also a way to make sure we got the proper file name for the real test later on.
31440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31441  if test "x$test_shortpath" = x; then
31442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31443$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31444    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31445  fi
31446
31447  # Call helper function which possibly converts this using DOS-style short mode.
31448  # If so, the updated path is stored in $new_path.
31449
31450  input_path="$new_path"
31451  # Check if we need to convert this using DOS-style short mode. If the path
31452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31453  # take no chances and rewrite it.
31454  # Note: m4 eats our [], so we need to use [ and ] instead.
31455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31456  if test "x$has_forbidden_chars" != x; then
31457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31461      # Going to short mode and back again did indeed matter. Since short mode is
31462      # case insensitive, let's make it lowercase to improve readability.
31463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31464      # Now convert it back to Unix-stile (cygpath)
31465      input_path=`$CYGPATH -u "$shortmode_path"`
31466      new_path="$input_path"
31467    fi
31468  fi
31469
31470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31471  if test "x$test_cygdrive_prefix" = x; then
31472    # As a simple fix, exclude /usr/bin since it's not a real path.
31473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31475      # a path prefixed by /cygdrive for fixpath to work.
31476      new_path="$CYGWIN_ROOT_PATH$input_path"
31477    fi
31478  fi
31479
31480
31481  if test "x$path" != "x$new_path"; then
31482    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31485  fi
31486
31487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31488
31489  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31490  has_colon=`$ECHO $path | $GREP ^.:`
31491  new_path="$path"
31492  if test "x$has_colon" = x; then
31493    # Not in mixed or Windows style, start by that.
31494    new_path=`cmd //c echo $path`
31495  fi
31496
31497
31498  input_path="$new_path"
31499  # Check if we need to convert this using DOS-style short mode. If the path
31500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31501  # take no chances and rewrite it.
31502  # Note: m4 eats our [], so we need to use [ and ] instead.
31503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31504  if test "x$has_forbidden_chars" != x; then
31505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31507  fi
31508
31509
31510  windows_path="$new_path"
31511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31512    unix_path=`$CYGPATH -u "$windows_path"`
31513    new_path="$unix_path"
31514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31516    new_path="$unix_path"
31517  fi
31518
31519  if test "x$path" != "x$new_path"; then
31520    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31523  fi
31524
31525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31527
31528  else
31529    # We're on a posix platform. Hooray! :)
31530    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31531    has_space=`$ECHO "$path" | $GREP " "`
31532    if test "x$has_space" != x; then
31533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31536    fi
31537
31538    # Use eval to expand a potential ~
31539    eval path="$path"
31540    if test ! -f "$path" && test ! -d "$path"; then
31541      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31542    fi
31543
31544    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31545  fi
31546
31547
31548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31549
31550  # Input might be given as Windows format, start by converting to
31551  # unix format.
31552  path="$POTENTIAL_FREETYPE_LIB_PATH"
31553  new_path=`$CYGPATH -u "$path"`
31554
31555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31558  # "foo.exe" is OK but "foo" is an error.
31559  #
31560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31561  # It is also a way to make sure we got the proper file name for the real test later on.
31562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31563  if test "x$test_shortpath" = x; then
31564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31567  fi
31568
31569  # Call helper function which possibly converts this using DOS-style short mode.
31570  # If so, the updated path is stored in $new_path.
31571
31572  input_path="$new_path"
31573  # Check if we need to convert this using DOS-style short mode. If the path
31574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31575  # take no chances and rewrite it.
31576  # Note: m4 eats our [], so we need to use [ and ] instead.
31577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31578  if test "x$has_forbidden_chars" != x; then
31579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31583      # Going to short mode and back again did indeed matter. Since short mode is
31584      # case insensitive, let's make it lowercase to improve readability.
31585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31586      # Now convert it back to Unix-stile (cygpath)
31587      input_path=`$CYGPATH -u "$shortmode_path"`
31588      new_path="$input_path"
31589    fi
31590  fi
31591
31592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31593  if test "x$test_cygdrive_prefix" = x; then
31594    # As a simple fix, exclude /usr/bin since it's not a real path.
31595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31597      # a path prefixed by /cygdrive for fixpath to work.
31598      new_path="$CYGWIN_ROOT_PATH$input_path"
31599    fi
31600  fi
31601
31602
31603  if test "x$path" != "x$new_path"; then
31604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31607  fi
31608
31609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31610
31611  path="$POTENTIAL_FREETYPE_LIB_PATH"
31612  has_colon=`$ECHO $path | $GREP ^.:`
31613  new_path="$path"
31614  if test "x$has_colon" = x; then
31615    # Not in mixed or Windows style, start by that.
31616    new_path=`cmd //c echo $path`
31617  fi
31618
31619
31620  input_path="$new_path"
31621  # Check if we need to convert this using DOS-style short mode. If the path
31622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31623  # take no chances and rewrite it.
31624  # Note: m4 eats our [], so we need to use [ and ] instead.
31625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31626  if test "x$has_forbidden_chars" != x; then
31627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31629  fi
31630
31631
31632  windows_path="$new_path"
31633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31634    unix_path=`$CYGPATH -u "$windows_path"`
31635    new_path="$unix_path"
31636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31638    new_path="$unix_path"
31639  fi
31640
31641  if test "x$path" != "x$new_path"; then
31642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31645  fi
31646
31647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31649
31650  else
31651    # We're on a posix platform. Hooray! :)
31652    path="$POTENTIAL_FREETYPE_LIB_PATH"
31653    has_space=`$ECHO "$path" | $GREP " "`
31654    if test "x$has_space" != x; then
31655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31657      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31658    fi
31659
31660    # Use eval to expand a potential ~
31661    eval path="$path"
31662    if test ! -f "$path" && test ! -d "$path"; then
31663      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31664    fi
31665
31666    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31667  fi
31668
31669
31670    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31672$as_echo_n "checking for freetype includes... " >&6; }
31673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31674$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31675    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31677$as_echo_n "checking for freetype libraries... " >&6; }
31678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31679$as_echo "$FREETYPE_LIB_PATH" >&6; }
31680  fi
31681
31682        if test "x$FOUND_FREETYPE" != xyes; then
31683          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31684        fi
31685      else
31686        # User specified only one of lib or include. This is an error.
31687        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31688          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31689$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31690          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31691        else
31692          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31693$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31694          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31695        fi
31696      fi
31697    else
31698      # User did not specify settings, but we need freetype. Try to locate it.
31699
31700      if test "x$BUNDLE_FREETYPE" = x; then
31701        # If not specified, default is to bundle freetype only on windows
31702        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31703          BUNDLE_FREETYPE=yes
31704        else
31705          BUNDLE_FREETYPE=no
31706        fi
31707      fi
31708
31709      if test "x$FOUND_FREETYPE" != xyes; then
31710        # Check builddeps
31711
31712
31713  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31714    # Source the builddeps file again, to make sure it uses the latest variables!
31715    . $builddepsfile
31716    # Look for a target and build machine specific resource!
31717    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31718    if test "x$resource" = x; then
31719      # Ok, lets instead look for a target specific resource
31720      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31721    fi
31722    if test "x$resource" = x; then
31723      # Ok, lets instead look for a build specific resource
31724      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31725    fi
31726    if test "x$resource" = x; then
31727      # Ok, lets instead look for a generic resource
31728      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31729      resource=${builddep_freetype2}
31730    fi
31731    if test "x$resource" != x; then
31732      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31733$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31734      # If the resource in the builddeps.conf file is an existing directory,
31735      # for example /java/linux/cups
31736      if test -d ${resource}; then
31737        depdir=${resource}
31738      else
31739
31740  # freetype2 is for example mymodule
31741  # $resource is for example libs/general/libmymod_1_2_3.zip
31742  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31743  # $with_builddeps_dir is for example /localhome/builddeps
31744  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31745  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31746  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31747  filename=`basename $resource`
31748  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31749  filebase=${filename%%.*}
31750  extension=${filename#*.}
31751  installdir=$with_builddeps_dir/$filebase
31752  if test ! -f $installdir/$filename.unpacked; then
31753    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31754$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31755    if test ! -d $installdir; then
31756      mkdir -p $installdir
31757    fi
31758    if test ! -d $installdir; then
31759      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31760    fi
31761    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31762    touch $tmpfile
31763    if test ! -f $tmpfile; then
31764      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31765    fi
31766
31767  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31768  # $tmpfile is the local file name for the downloaded file.
31769  VALID_TOOL=no
31770  if test "x$BDEPS_FTP" = xwget; then
31771    VALID_TOOL=yes
31772    wget -O $tmpfile $with_builddeps_server/$resource
31773  fi
31774  if test "x$BDEPS_FTP" = xlftp; then
31775    VALID_TOOL=yes
31776    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31777  fi
31778  if test "x$BDEPS_FTP" = xftp; then
31779    VALID_TOOL=yes
31780    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31781    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31782    FTPUSERPWD=${FTPSERVER%%@*}
31783    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31784      FTPUSER=${userpwd%%:*}
31785      FTPPWD=${userpwd#*@}
31786      FTPSERVER=${FTPSERVER#*@}
31787    else
31788      FTPUSER=ftp
31789      FTPPWD=ftp
31790    fi
31791    # the "pass" command does not work on some
31792    # ftp clients (read ftp.exe) but if it works,
31793    # passive mode is better!
31794    ( \
31795        echo "user $FTPUSER $FTPPWD"        ; \
31796        echo "pass"                         ; \
31797        echo "bin"                          ; \
31798        echo "get $FTPPATH $tmpfile"              ; \
31799    ) | ftp -in $FTPSERVER
31800  fi
31801  if test "x$VALID_TOOL" != xyes; then
31802    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31803  fi
31804
31805    mv $tmpfile $installdir/$filename
31806    if test ! -s $installdir/$filename; then
31807      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31808    fi
31809    case "$extension" in
31810      zip)  echo "Unzipping $installdir/$filename..."
31811        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31812        ;;
31813      tar.gz) echo "Untaring $installdir/$filename..."
31814        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31815        ;;
31816      tgz) echo "Untaring $installdir/$filename..."
31817        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31818        ;;
31819      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31820        ;;
31821    esac
31822  fi
31823  if test -f $installdir/$filename.unpacked; then
31824    depdir=$installdir
31825  fi
31826
31827      fi
31828      # Source the builddeps file again, because in the previous command, the depdir
31829      # was updated to point at the current build dependency install directory.
31830      . $builddepsfile
31831      # Now extract variables from the builddeps.conf files.
31832      theroot=${builddep_freetype2_ROOT}
31833      thecflags=${builddep_freetype2_CFLAGS}
31834      thelibs=${builddep_freetype2_LIBS}
31835      if test "x$depdir" = x; then
31836        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31837      fi
31838      FREETYPE=$depdir
31839      if test "x$theroot" != x; then
31840        FREETYPE="$theroot"
31841      fi
31842      if test "x$thecflags" != x; then
31843        FREETYPE_CFLAGS="$thecflags"
31844      fi
31845      if test "x$thelibs" != x; then
31846        FREETYPE_LIBS="$thelibs"
31847      fi
31848      FOUND_FREETYPE=yes
31849      else FOUND_FREETYPE=no
31850
31851    fi
31852    else FOUND_FREETYPE=no
31853
31854  fi
31855
31856        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31857        if test "x$FOUND_FREETYPE" = xyes; then
31858          if test "x$BUNDLE_FREETYPE" = xyes; then
31859            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31860$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31861            FOUND_FREETYPE=no
31862          else
31863            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31864$as_echo_n "checking for freetype... " >&6; }
31865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31866$as_echo "yes (using builddeps)" >&6; }
31867          fi
31868        fi
31869      fi
31870
31871      if test "x$FOUND_FREETYPE" != xyes; then
31872        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31873        if test "x$PKG_CONFIG" != x; then
31874
31875pkg_failed=no
31876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31877$as_echo_n "checking for FREETYPE... " >&6; }
31878
31879if test -n "$FREETYPE_CFLAGS"; then
31880    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
31881 elif test -n "$PKG_CONFIG"; then
31882    if test -n "$PKG_CONFIG" && \
31883    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31884  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31885  ac_status=$?
31886  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31887  test $ac_status = 0; }; then
31888  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31889else
31890  pkg_failed=yes
31891fi
31892 else
31893    pkg_failed=untried
31894fi
31895if test -n "$FREETYPE_LIBS"; then
31896    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
31897 elif test -n "$PKG_CONFIG"; then
31898    if test -n "$PKG_CONFIG" && \
31899    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31900  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31901  ac_status=$?
31902  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31903  test $ac_status = 0; }; then
31904  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31905else
31906  pkg_failed=yes
31907fi
31908 else
31909    pkg_failed=untried
31910fi
31911
31912
31913
31914if test $pkg_failed = yes; then
31915
31916if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31917        _pkg_short_errors_supported=yes
31918else
31919        _pkg_short_errors_supported=no
31920fi
31921        if test $_pkg_short_errors_supported = yes; then
31922	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31923        else
31924	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31925        fi
31926	# Put the nasty error message in config.log where it belongs
31927	echo "$FREETYPE_PKG_ERRORS" >&5
31928
31929	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31930$as_echo "no" >&6; }
31931                FOUND_FREETYPE=no
31932elif test $pkg_failed = untried; then
31933	FOUND_FREETYPE=no
31934else
31935	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
31936	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31938$as_echo "yes" >&6; }
31939	FOUND_FREETYPE=yes
31940fi
31941          if test "x$FOUND_FREETYPE" = xyes; then
31942            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31943            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
31944            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31945            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31946              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
31947            fi
31948            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31949            if test "x$BUNDLE_FREETYPE" = xyes; then
31950              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
31951$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
31952              FOUND_FREETYPE=no
31953            else
31954              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31955$as_echo_n "checking for freetype... " >&6; }
31956              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
31957$as_echo "yes (using pkg-config)" >&6; }
31958            fi
31959          fi
31960        fi
31961      fi
31962
31963      if test "x$FOUND_FREETYPE" != xyes; then
31964        # Check in well-known locations
31965        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31966          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
31967
31968  windows_path="$FREETYPE_BASE_DIR"
31969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31970    unix_path=`$CYGPATH -u "$windows_path"`
31971    FREETYPE_BASE_DIR="$unix_path"
31972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31974    FREETYPE_BASE_DIR="$unix_path"
31975  fi
31976
31977
31978  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
31979  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
31980  METHOD="well-known location"
31981
31982  # First check if the files exists.
31983  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31984    # We found an arbitrary include file. That's a good sign.
31985    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31986$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31987    FOUND_FREETYPE=yes
31988
31989    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31990    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31991      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31992$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31993      FOUND_FREETYPE=no
31994    else
31995      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31996        # On Windows, we will need both .lib and .dll file.
31997        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31998          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31999$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32000          FOUND_FREETYPE=no
32001        fi
32002      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
32003        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32004        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32005      fi
32006    fi
32007  fi
32008
32009  if test "x$FOUND_FREETYPE" = xyes; then
32010
32011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32012
32013  # Input might be given as Windows format, start by converting to
32014  # unix format.
32015  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32016  new_path=`$CYGPATH -u "$path"`
32017
32018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32021  # "foo.exe" is OK but "foo" is an error.
32022  #
32023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32024  # It is also a way to make sure we got the proper file name for the real test later on.
32025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32026  if test "x$test_shortpath" = x; then
32027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32030  fi
32031
32032  # Call helper function which possibly converts this using DOS-style short mode.
32033  # If so, the updated path is stored in $new_path.
32034
32035  input_path="$new_path"
32036  # Check if we need to convert this using DOS-style short mode. If the path
32037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32038  # take no chances and rewrite it.
32039  # Note: m4 eats our [], so we need to use [ and ] instead.
32040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32041  if test "x$has_forbidden_chars" != x; then
32042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32046      # Going to short mode and back again did indeed matter. Since short mode is
32047      # case insensitive, let's make it lowercase to improve readability.
32048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32049      # Now convert it back to Unix-stile (cygpath)
32050      input_path=`$CYGPATH -u "$shortmode_path"`
32051      new_path="$input_path"
32052    fi
32053  fi
32054
32055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32056  if test "x$test_cygdrive_prefix" = x; then
32057    # As a simple fix, exclude /usr/bin since it's not a real path.
32058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32060      # a path prefixed by /cygdrive for fixpath to work.
32061      new_path="$CYGWIN_ROOT_PATH$input_path"
32062    fi
32063  fi
32064
32065
32066  if test "x$path" != "x$new_path"; then
32067    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32070  fi
32071
32072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32073
32074  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32075  has_colon=`$ECHO $path | $GREP ^.:`
32076  new_path="$path"
32077  if test "x$has_colon" = x; then
32078    # Not in mixed or Windows style, start by that.
32079    new_path=`cmd //c echo $path`
32080  fi
32081
32082
32083  input_path="$new_path"
32084  # Check if we need to convert this using DOS-style short mode. If the path
32085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32086  # take no chances and rewrite it.
32087  # Note: m4 eats our [], so we need to use [ and ] instead.
32088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32089  if test "x$has_forbidden_chars" != x; then
32090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32092  fi
32093
32094
32095  windows_path="$new_path"
32096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32097    unix_path=`$CYGPATH -u "$windows_path"`
32098    new_path="$unix_path"
32099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32101    new_path="$unix_path"
32102  fi
32103
32104  if test "x$path" != "x$new_path"; then
32105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32108  fi
32109
32110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32112
32113  else
32114    # We're on a posix platform. Hooray! :)
32115    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32116    has_space=`$ECHO "$path" | $GREP " "`
32117    if test "x$has_space" != x; then
32118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32121    fi
32122
32123    # Use eval to expand a potential ~
32124    eval path="$path"
32125    if test ! -f "$path" && test ! -d "$path"; then
32126      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32127    fi
32128
32129    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32130  fi
32131
32132
32133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32134
32135  # Input might be given as Windows format, start by converting to
32136  # unix format.
32137  path="$POTENTIAL_FREETYPE_LIB_PATH"
32138  new_path=`$CYGPATH -u "$path"`
32139
32140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32143  # "foo.exe" is OK but "foo" is an error.
32144  #
32145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32146  # It is also a way to make sure we got the proper file name for the real test later on.
32147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32148  if test "x$test_shortpath" = x; then
32149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32152  fi
32153
32154  # Call helper function which possibly converts this using DOS-style short mode.
32155  # If so, the updated path is stored in $new_path.
32156
32157  input_path="$new_path"
32158  # Check if we need to convert this using DOS-style short mode. If the path
32159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32160  # take no chances and rewrite it.
32161  # Note: m4 eats our [], so we need to use [ and ] instead.
32162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32163  if test "x$has_forbidden_chars" != x; then
32164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32168      # Going to short mode and back again did indeed matter. Since short mode is
32169      # case insensitive, let's make it lowercase to improve readability.
32170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32171      # Now convert it back to Unix-stile (cygpath)
32172      input_path=`$CYGPATH -u "$shortmode_path"`
32173      new_path="$input_path"
32174    fi
32175  fi
32176
32177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32178  if test "x$test_cygdrive_prefix" = x; then
32179    # As a simple fix, exclude /usr/bin since it's not a real path.
32180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32182      # a path prefixed by /cygdrive for fixpath to work.
32183      new_path="$CYGWIN_ROOT_PATH$input_path"
32184    fi
32185  fi
32186
32187
32188  if test "x$path" != "x$new_path"; then
32189    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32192  fi
32193
32194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32195
32196  path="$POTENTIAL_FREETYPE_LIB_PATH"
32197  has_colon=`$ECHO $path | $GREP ^.:`
32198  new_path="$path"
32199  if test "x$has_colon" = x; then
32200    # Not in mixed or Windows style, start by that.
32201    new_path=`cmd //c echo $path`
32202  fi
32203
32204
32205  input_path="$new_path"
32206  # Check if we need to convert this using DOS-style short mode. If the path
32207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32208  # take no chances and rewrite it.
32209  # Note: m4 eats our [], so we need to use [ and ] instead.
32210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32211  if test "x$has_forbidden_chars" != x; then
32212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32214  fi
32215
32216
32217  windows_path="$new_path"
32218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32219    unix_path=`$CYGPATH -u "$windows_path"`
32220    new_path="$unix_path"
32221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32223    new_path="$unix_path"
32224  fi
32225
32226  if test "x$path" != "x$new_path"; then
32227    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32230  fi
32231
32232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32234
32235  else
32236    # We're on a posix platform. Hooray! :)
32237    path="$POTENTIAL_FREETYPE_LIB_PATH"
32238    has_space=`$ECHO "$path" | $GREP " "`
32239    if test "x$has_space" != x; then
32240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32242      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32243    fi
32244
32245    # Use eval to expand a potential ~
32246    eval path="$path"
32247    if test ! -f "$path" && test ! -d "$path"; then
32248      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32249    fi
32250
32251    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32252  fi
32253
32254
32255    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32257$as_echo_n "checking for freetype includes... " >&6; }
32258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32259$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32260    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32262$as_echo_n "checking for freetype libraries... " >&6; }
32263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32264$as_echo "$FREETYPE_LIB_PATH" >&6; }
32265  fi
32266
32267          if test "x$FOUND_FREETYPE" != xyes; then
32268            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32269
32270  windows_path="$FREETYPE_BASE_DIR"
32271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32272    unix_path=`$CYGPATH -u "$windows_path"`
32273    FREETYPE_BASE_DIR="$unix_path"
32274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32276    FREETYPE_BASE_DIR="$unix_path"
32277  fi
32278
32279
32280  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32281  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32282  METHOD="well-known location"
32283
32284  # First check if the files exists.
32285  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32286    # We found an arbitrary include file. That's a good sign.
32287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32288$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32289    FOUND_FREETYPE=yes
32290
32291    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32292    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32293      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32294$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32295      FOUND_FREETYPE=no
32296    else
32297      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32298        # On Windows, we will need both .lib and .dll file.
32299        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32300          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32301$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32302          FOUND_FREETYPE=no
32303        fi
32304      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
32305        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32306        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32307      fi
32308    fi
32309  fi
32310
32311  if test "x$FOUND_FREETYPE" = xyes; then
32312
32313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32314
32315  # Input might be given as Windows format, start by converting to
32316  # unix format.
32317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32318  new_path=`$CYGPATH -u "$path"`
32319
32320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32323  # "foo.exe" is OK but "foo" is an error.
32324  #
32325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32326  # It is also a way to make sure we got the proper file name for the real test later on.
32327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32328  if test "x$test_shortpath" = x; then
32329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32332  fi
32333
32334  # Call helper function which possibly converts this using DOS-style short mode.
32335  # If so, the updated path is stored in $new_path.
32336
32337  input_path="$new_path"
32338  # Check if we need to convert this using DOS-style short mode. If the path
32339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32340  # take no chances and rewrite it.
32341  # Note: m4 eats our [], so we need to use [ and ] instead.
32342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32343  if test "x$has_forbidden_chars" != x; then
32344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32348      # Going to short mode and back again did indeed matter. Since short mode is
32349      # case insensitive, let's make it lowercase to improve readability.
32350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32351      # Now convert it back to Unix-stile (cygpath)
32352      input_path=`$CYGPATH -u "$shortmode_path"`
32353      new_path="$input_path"
32354    fi
32355  fi
32356
32357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32358  if test "x$test_cygdrive_prefix" = x; then
32359    # As a simple fix, exclude /usr/bin since it's not a real path.
32360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32362      # a path prefixed by /cygdrive for fixpath to work.
32363      new_path="$CYGWIN_ROOT_PATH$input_path"
32364    fi
32365  fi
32366
32367
32368  if test "x$path" != "x$new_path"; then
32369    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32372  fi
32373
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375
32376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32377  has_colon=`$ECHO $path | $GREP ^.:`
32378  new_path="$path"
32379  if test "x$has_colon" = x; then
32380    # Not in mixed or Windows style, start by that.
32381    new_path=`cmd //c echo $path`
32382  fi
32383
32384
32385  input_path="$new_path"
32386  # Check if we need to convert this using DOS-style short mode. If the path
32387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32388  # take no chances and rewrite it.
32389  # Note: m4 eats our [], so we need to use [ and ] instead.
32390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32391  if test "x$has_forbidden_chars" != x; then
32392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32394  fi
32395
32396
32397  windows_path="$new_path"
32398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32399    unix_path=`$CYGPATH -u "$windows_path"`
32400    new_path="$unix_path"
32401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32403    new_path="$unix_path"
32404  fi
32405
32406  if test "x$path" != "x$new_path"; then
32407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32410  fi
32411
32412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32414
32415  else
32416    # We're on a posix platform. Hooray! :)
32417    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32418    has_space=`$ECHO "$path" | $GREP " "`
32419    if test "x$has_space" != x; then
32420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32422      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32423    fi
32424
32425    # Use eval to expand a potential ~
32426    eval path="$path"
32427    if test ! -f "$path" && test ! -d "$path"; then
32428      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32429    fi
32430
32431    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32432  fi
32433
32434
32435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32436
32437  # Input might be given as Windows format, start by converting to
32438  # unix format.
32439  path="$POTENTIAL_FREETYPE_LIB_PATH"
32440  new_path=`$CYGPATH -u "$path"`
32441
32442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32445  # "foo.exe" is OK but "foo" is an error.
32446  #
32447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32448  # It is also a way to make sure we got the proper file name for the real test later on.
32449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32450  if test "x$test_shortpath" = x; then
32451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32454  fi
32455
32456  # Call helper function which possibly converts this using DOS-style short mode.
32457  # If so, the updated path is stored in $new_path.
32458
32459  input_path="$new_path"
32460  # Check if we need to convert this using DOS-style short mode. If the path
32461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32462  # take no chances and rewrite it.
32463  # Note: m4 eats our [], so we need to use [ and ] instead.
32464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32465  if test "x$has_forbidden_chars" != x; then
32466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32470      # Going to short mode and back again did indeed matter. Since short mode is
32471      # case insensitive, let's make it lowercase to improve readability.
32472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32473      # Now convert it back to Unix-stile (cygpath)
32474      input_path=`$CYGPATH -u "$shortmode_path"`
32475      new_path="$input_path"
32476    fi
32477  fi
32478
32479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32480  if test "x$test_cygdrive_prefix" = x; then
32481    # As a simple fix, exclude /usr/bin since it's not a real path.
32482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32484      # a path prefixed by /cygdrive for fixpath to work.
32485      new_path="$CYGWIN_ROOT_PATH$input_path"
32486    fi
32487  fi
32488
32489
32490  if test "x$path" != "x$new_path"; then
32491    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32494  fi
32495
32496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32497
32498  path="$POTENTIAL_FREETYPE_LIB_PATH"
32499  has_colon=`$ECHO $path | $GREP ^.:`
32500  new_path="$path"
32501  if test "x$has_colon" = x; then
32502    # Not in mixed or Windows style, start by that.
32503    new_path=`cmd //c echo $path`
32504  fi
32505
32506
32507  input_path="$new_path"
32508  # Check if we need to convert this using DOS-style short mode. If the path
32509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32510  # take no chances and rewrite it.
32511  # Note: m4 eats our [], so we need to use [ and ] instead.
32512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32513  if test "x$has_forbidden_chars" != x; then
32514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32516  fi
32517
32518
32519  windows_path="$new_path"
32520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32521    unix_path=`$CYGPATH -u "$windows_path"`
32522    new_path="$unix_path"
32523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32525    new_path="$unix_path"
32526  fi
32527
32528  if test "x$path" != "x$new_path"; then
32529    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32532  fi
32533
32534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32536
32537  else
32538    # We're on a posix platform. Hooray! :)
32539    path="$POTENTIAL_FREETYPE_LIB_PATH"
32540    has_space=`$ECHO "$path" | $GREP " "`
32541    if test "x$has_space" != x; then
32542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32544      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32545    fi
32546
32547    # Use eval to expand a potential ~
32548    eval path="$path"
32549    if test ! -f "$path" && test ! -d "$path"; then
32550      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32551    fi
32552
32553    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32554  fi
32555
32556
32557    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32559$as_echo_n "checking for freetype includes... " >&6; }
32560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32561$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32562    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32564$as_echo_n "checking for freetype libraries... " >&6; }
32565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32566$as_echo "$FREETYPE_LIB_PATH" >&6; }
32567  fi
32568
32569          fi
32570        else
32571          if test "x$SYS_ROOT" = "x/"; then
32572            FREETYPE_ROOT=
32573          else
32574            FREETYPE_ROOT="$SYS_ROOT"
32575          fi
32576          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32577
32578  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32579  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32580  METHOD="well-known location"
32581
32582  # First check if the files exists.
32583  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32584    # We found an arbitrary include file. That's a good sign.
32585    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32586$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32587    FOUND_FREETYPE=yes
32588
32589    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32590    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32591      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32592$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32593      FOUND_FREETYPE=no
32594    else
32595      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32596        # On Windows, we will need both .lib and .dll file.
32597        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32598          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32599$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32600          FOUND_FREETYPE=no
32601        fi
32602      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
32603        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32604        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32605      fi
32606    fi
32607  fi
32608
32609  if test "x$FOUND_FREETYPE" = xyes; then
32610
32611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32612
32613  # Input might be given as Windows format, start by converting to
32614  # unix format.
32615  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32616  new_path=`$CYGPATH -u "$path"`
32617
32618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32621  # "foo.exe" is OK but "foo" is an error.
32622  #
32623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32624  # It is also a way to make sure we got the proper file name for the real test later on.
32625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32626  if test "x$test_shortpath" = x; then
32627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32628$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32629    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32630  fi
32631
32632  # Call helper function which possibly converts this using DOS-style short mode.
32633  # If so, the updated path is stored in $new_path.
32634
32635  input_path="$new_path"
32636  # Check if we need to convert this using DOS-style short mode. If the path
32637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32638  # take no chances and rewrite it.
32639  # Note: m4 eats our [], so we need to use [ and ] instead.
32640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32641  if test "x$has_forbidden_chars" != x; then
32642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32646      # Going to short mode and back again did indeed matter. Since short mode is
32647      # case insensitive, let's make it lowercase to improve readability.
32648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32649      # Now convert it back to Unix-stile (cygpath)
32650      input_path=`$CYGPATH -u "$shortmode_path"`
32651      new_path="$input_path"
32652    fi
32653  fi
32654
32655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32656  if test "x$test_cygdrive_prefix" = x; then
32657    # As a simple fix, exclude /usr/bin since it's not a real path.
32658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32660      # a path prefixed by /cygdrive for fixpath to work.
32661      new_path="$CYGWIN_ROOT_PATH$input_path"
32662    fi
32663  fi
32664
32665
32666  if test "x$path" != "x$new_path"; then
32667    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32669$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32670  fi
32671
32672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32673
32674  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32675  has_colon=`$ECHO $path | $GREP ^.:`
32676  new_path="$path"
32677  if test "x$has_colon" = x; then
32678    # Not in mixed or Windows style, start by that.
32679    new_path=`cmd //c echo $path`
32680  fi
32681
32682
32683  input_path="$new_path"
32684  # Check if we need to convert this using DOS-style short mode. If the path
32685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32686  # take no chances and rewrite it.
32687  # Note: m4 eats our [], so we need to use [ and ] instead.
32688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32689  if test "x$has_forbidden_chars" != x; then
32690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32692  fi
32693
32694
32695  windows_path="$new_path"
32696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32697    unix_path=`$CYGPATH -u "$windows_path"`
32698    new_path="$unix_path"
32699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32701    new_path="$unix_path"
32702  fi
32703
32704  if test "x$path" != "x$new_path"; then
32705    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32708  fi
32709
32710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32712
32713  else
32714    # We're on a posix platform. Hooray! :)
32715    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32716    has_space=`$ECHO "$path" | $GREP " "`
32717    if test "x$has_space" != x; then
32718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32720      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32721    fi
32722
32723    # Use eval to expand a potential ~
32724    eval path="$path"
32725    if test ! -f "$path" && test ! -d "$path"; then
32726      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32727    fi
32728
32729    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32730  fi
32731
32732
32733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32734
32735  # Input might be given as Windows format, start by converting to
32736  # unix format.
32737  path="$POTENTIAL_FREETYPE_LIB_PATH"
32738  new_path=`$CYGPATH -u "$path"`
32739
32740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32743  # "foo.exe" is OK but "foo" is an error.
32744  #
32745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32746  # It is also a way to make sure we got the proper file name for the real test later on.
32747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32748  if test "x$test_shortpath" = x; then
32749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32752  fi
32753
32754  # Call helper function which possibly converts this using DOS-style short mode.
32755  # If so, the updated path is stored in $new_path.
32756
32757  input_path="$new_path"
32758  # Check if we need to convert this using DOS-style short mode. If the path
32759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32760  # take no chances and rewrite it.
32761  # Note: m4 eats our [], so we need to use [ and ] instead.
32762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32763  if test "x$has_forbidden_chars" != x; then
32764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32768      # Going to short mode and back again did indeed matter. Since short mode is
32769      # case insensitive, let's make it lowercase to improve readability.
32770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32771      # Now convert it back to Unix-stile (cygpath)
32772      input_path=`$CYGPATH -u "$shortmode_path"`
32773      new_path="$input_path"
32774    fi
32775  fi
32776
32777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32778  if test "x$test_cygdrive_prefix" = x; then
32779    # As a simple fix, exclude /usr/bin since it's not a real path.
32780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32782      # a path prefixed by /cygdrive for fixpath to work.
32783      new_path="$CYGWIN_ROOT_PATH$input_path"
32784    fi
32785  fi
32786
32787
32788  if test "x$path" != "x$new_path"; then
32789    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32792  fi
32793
32794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32795
32796  path="$POTENTIAL_FREETYPE_LIB_PATH"
32797  has_colon=`$ECHO $path | $GREP ^.:`
32798  new_path="$path"
32799  if test "x$has_colon" = x; then
32800    # Not in mixed or Windows style, start by that.
32801    new_path=`cmd //c echo $path`
32802  fi
32803
32804
32805  input_path="$new_path"
32806  # Check if we need to convert this using DOS-style short mode. If the path
32807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32808  # take no chances and rewrite it.
32809  # Note: m4 eats our [], so we need to use [ and ] instead.
32810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32811  if test "x$has_forbidden_chars" != x; then
32812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32814  fi
32815
32816
32817  windows_path="$new_path"
32818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819    unix_path=`$CYGPATH -u "$windows_path"`
32820    new_path="$unix_path"
32821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32823    new_path="$unix_path"
32824  fi
32825
32826  if test "x$path" != "x$new_path"; then
32827    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32830  fi
32831
32832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32834
32835  else
32836    # We're on a posix platform. Hooray! :)
32837    path="$POTENTIAL_FREETYPE_LIB_PATH"
32838    has_space=`$ECHO "$path" | $GREP " "`
32839    if test "x$has_space" != x; then
32840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32842      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32843    fi
32844
32845    # Use eval to expand a potential ~
32846    eval path="$path"
32847    if test ! -f "$path" && test ! -d "$path"; then
32848      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32849    fi
32850
32851    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32852  fi
32853
32854
32855    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32857$as_echo_n "checking for freetype includes... " >&6; }
32858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32859$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32860    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32862$as_echo_n "checking for freetype libraries... " >&6; }
32863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32864$as_echo "$FREETYPE_LIB_PATH" >&6; }
32865  fi
32866
32867
32868          if test "x$FOUND_FREETYPE" != xyes; then
32869            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32870
32871  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32872  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32873  METHOD="well-known location"
32874
32875  # First check if the files exists.
32876  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32877    # We found an arbitrary include file. That's a good sign.
32878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32879$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32880    FOUND_FREETYPE=yes
32881
32882    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32883    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32884      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32885$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32886      FOUND_FREETYPE=no
32887    else
32888      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32889        # On Windows, we will need both .lib and .dll file.
32890        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32891          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32892$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32893          FOUND_FREETYPE=no
32894        fi
32895      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
32896        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32897        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32898      fi
32899    fi
32900  fi
32901
32902  if test "x$FOUND_FREETYPE" = xyes; then
32903
32904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32905
32906  # Input might be given as Windows format, start by converting to
32907  # unix format.
32908  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32909  new_path=`$CYGPATH -u "$path"`
32910
32911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32914  # "foo.exe" is OK but "foo" is an error.
32915  #
32916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32917  # It is also a way to make sure we got the proper file name for the real test later on.
32918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32919  if test "x$test_shortpath" = x; then
32920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32922    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32923  fi
32924
32925  # Call helper function which possibly converts this using DOS-style short mode.
32926  # If so, the updated path is stored in $new_path.
32927
32928  input_path="$new_path"
32929  # Check if we need to convert this using DOS-style short mode. If the path
32930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32931  # take no chances and rewrite it.
32932  # Note: m4 eats our [], so we need to use [ and ] instead.
32933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32934  if test "x$has_forbidden_chars" != x; then
32935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32939      # Going to short mode and back again did indeed matter. Since short mode is
32940      # case insensitive, let's make it lowercase to improve readability.
32941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32942      # Now convert it back to Unix-stile (cygpath)
32943      input_path=`$CYGPATH -u "$shortmode_path"`
32944      new_path="$input_path"
32945    fi
32946  fi
32947
32948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32949  if test "x$test_cygdrive_prefix" = x; then
32950    # As a simple fix, exclude /usr/bin since it's not a real path.
32951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32953      # a path prefixed by /cygdrive for fixpath to work.
32954      new_path="$CYGWIN_ROOT_PATH$input_path"
32955    fi
32956  fi
32957
32958
32959  if test "x$path" != "x$new_path"; then
32960    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32962$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32963  fi
32964
32965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32966
32967  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32968  has_colon=`$ECHO $path | $GREP ^.:`
32969  new_path="$path"
32970  if test "x$has_colon" = x; then
32971    # Not in mixed or Windows style, start by that.
32972    new_path=`cmd //c echo $path`
32973  fi
32974
32975
32976  input_path="$new_path"
32977  # Check if we need to convert this using DOS-style short mode. If the path
32978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32979  # take no chances and rewrite it.
32980  # Note: m4 eats our [], so we need to use [ and ] instead.
32981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32982  if test "x$has_forbidden_chars" != x; then
32983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32985  fi
32986
32987
32988  windows_path="$new_path"
32989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32990    unix_path=`$CYGPATH -u "$windows_path"`
32991    new_path="$unix_path"
32992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32994    new_path="$unix_path"
32995  fi
32996
32997  if test "x$path" != "x$new_path"; then
32998    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33000$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33001  fi
33002
33003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33005
33006  else
33007    # We're on a posix platform. Hooray! :)
33008    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33009    has_space=`$ECHO "$path" | $GREP " "`
33010    if test "x$has_space" != x; then
33011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33012$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33013      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33014    fi
33015
33016    # Use eval to expand a potential ~
33017    eval path="$path"
33018    if test ! -f "$path" && test ! -d "$path"; then
33019      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33020    fi
33021
33022    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33023  fi
33024
33025
33026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33027
33028  # Input might be given as Windows format, start by converting to
33029  # unix format.
33030  path="$POTENTIAL_FREETYPE_LIB_PATH"
33031  new_path=`$CYGPATH -u "$path"`
33032
33033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33036  # "foo.exe" is OK but "foo" is an error.
33037  #
33038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33039  # It is also a way to make sure we got the proper file name for the real test later on.
33040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33041  if test "x$test_shortpath" = x; then
33042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33043$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33044    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33045  fi
33046
33047  # Call helper function which possibly converts this using DOS-style short mode.
33048  # If so, the updated path is stored in $new_path.
33049
33050  input_path="$new_path"
33051  # Check if we need to convert this using DOS-style short mode. If the path
33052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33053  # take no chances and rewrite it.
33054  # Note: m4 eats our [], so we need to use [ and ] instead.
33055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33056  if test "x$has_forbidden_chars" != x; then
33057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33061      # Going to short mode and back again did indeed matter. Since short mode is
33062      # case insensitive, let's make it lowercase to improve readability.
33063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33064      # Now convert it back to Unix-stile (cygpath)
33065      input_path=`$CYGPATH -u "$shortmode_path"`
33066      new_path="$input_path"
33067    fi
33068  fi
33069
33070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33071  if test "x$test_cygdrive_prefix" = x; then
33072    # As a simple fix, exclude /usr/bin since it's not a real path.
33073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33075      # a path prefixed by /cygdrive for fixpath to work.
33076      new_path="$CYGWIN_ROOT_PATH$input_path"
33077    fi
33078  fi
33079
33080
33081  if test "x$path" != "x$new_path"; then
33082    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33085  fi
33086
33087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33088
33089  path="$POTENTIAL_FREETYPE_LIB_PATH"
33090  has_colon=`$ECHO $path | $GREP ^.:`
33091  new_path="$path"
33092  if test "x$has_colon" = x; then
33093    # Not in mixed or Windows style, start by that.
33094    new_path=`cmd //c echo $path`
33095  fi
33096
33097
33098  input_path="$new_path"
33099  # Check if we need to convert this using DOS-style short mode. If the path
33100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33101  # take no chances and rewrite it.
33102  # Note: m4 eats our [], so we need to use [ and ] instead.
33103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33104  if test "x$has_forbidden_chars" != x; then
33105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33107  fi
33108
33109
33110  windows_path="$new_path"
33111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33112    unix_path=`$CYGPATH -u "$windows_path"`
33113    new_path="$unix_path"
33114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33116    new_path="$unix_path"
33117  fi
33118
33119  if test "x$path" != "x$new_path"; then
33120    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33123  fi
33124
33125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33127
33128  else
33129    # We're on a posix platform. Hooray! :)
33130    path="$POTENTIAL_FREETYPE_LIB_PATH"
33131    has_space=`$ECHO "$path" | $GREP " "`
33132    if test "x$has_space" != x; then
33133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33136    fi
33137
33138    # Use eval to expand a potential ~
33139    eval path="$path"
33140    if test ! -f "$path" && test ! -d "$path"; then
33141      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33142    fi
33143
33144    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33145  fi
33146
33147
33148    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33150$as_echo_n "checking for freetype includes... " >&6; }
33151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33152$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33153    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33155$as_echo_n "checking for freetype libraries... " >&6; }
33156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33157$as_echo "$FREETYPE_LIB_PATH" >&6; }
33158  fi
33159
33160          fi
33161
33162          if test "x$FOUND_FREETYPE" != xyes; then
33163            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33164            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33165
33166  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33167  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33168  METHOD="well-known location"
33169
33170  # First check if the files exists.
33171  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33172    # We found an arbitrary include file. That's a good sign.
33173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33174$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33175    FOUND_FREETYPE=yes
33176
33177    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33178    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33179      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33180$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33181      FOUND_FREETYPE=no
33182    else
33183      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33184        # On Windows, we will need both .lib and .dll file.
33185        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33186          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33187$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33188          FOUND_FREETYPE=no
33189        fi
33190      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
33191        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33192        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33193      fi
33194    fi
33195  fi
33196
33197  if test "x$FOUND_FREETYPE" = xyes; then
33198
33199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33200
33201  # Input might be given as Windows format, start by converting to
33202  # unix format.
33203  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33204  new_path=`$CYGPATH -u "$path"`
33205
33206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33209  # "foo.exe" is OK but "foo" is an error.
33210  #
33211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33212  # It is also a way to make sure we got the proper file name for the real test later on.
33213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33214  if test "x$test_shortpath" = x; then
33215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33216$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33217    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33218  fi
33219
33220  # Call helper function which possibly converts this using DOS-style short mode.
33221  # If so, the updated path is stored in $new_path.
33222
33223  input_path="$new_path"
33224  # Check if we need to convert this using DOS-style short mode. If the path
33225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33226  # take no chances and rewrite it.
33227  # Note: m4 eats our [], so we need to use [ and ] instead.
33228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33229  if test "x$has_forbidden_chars" != x; then
33230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33234      # Going to short mode and back again did indeed matter. Since short mode is
33235      # case insensitive, let's make it lowercase to improve readability.
33236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33237      # Now convert it back to Unix-stile (cygpath)
33238      input_path=`$CYGPATH -u "$shortmode_path"`
33239      new_path="$input_path"
33240    fi
33241  fi
33242
33243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33244  if test "x$test_cygdrive_prefix" = x; then
33245    # As a simple fix, exclude /usr/bin since it's not a real path.
33246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33248      # a path prefixed by /cygdrive for fixpath to work.
33249      new_path="$CYGWIN_ROOT_PATH$input_path"
33250    fi
33251  fi
33252
33253
33254  if test "x$path" != "x$new_path"; then
33255    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33257$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33258  fi
33259
33260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33261
33262  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33263  has_colon=`$ECHO $path | $GREP ^.:`
33264  new_path="$path"
33265  if test "x$has_colon" = x; then
33266    # Not in mixed or Windows style, start by that.
33267    new_path=`cmd //c echo $path`
33268  fi
33269
33270
33271  input_path="$new_path"
33272  # Check if we need to convert this using DOS-style short mode. If the path
33273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33274  # take no chances and rewrite it.
33275  # Note: m4 eats our [], so we need to use [ and ] instead.
33276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33277  if test "x$has_forbidden_chars" != x; then
33278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33280  fi
33281
33282
33283  windows_path="$new_path"
33284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33285    unix_path=`$CYGPATH -u "$windows_path"`
33286    new_path="$unix_path"
33287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33289    new_path="$unix_path"
33290  fi
33291
33292  if test "x$path" != "x$new_path"; then
33293    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33296  fi
33297
33298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33300
33301  else
33302    # We're on a posix platform. Hooray! :)
33303    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33304    has_space=`$ECHO "$path" | $GREP " "`
33305    if test "x$has_space" != x; then
33306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33308      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33309    fi
33310
33311    # Use eval to expand a potential ~
33312    eval path="$path"
33313    if test ! -f "$path" && test ! -d "$path"; then
33314      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33315    fi
33316
33317    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33318  fi
33319
33320
33321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33322
33323  # Input might be given as Windows format, start by converting to
33324  # unix format.
33325  path="$POTENTIAL_FREETYPE_LIB_PATH"
33326  new_path=`$CYGPATH -u "$path"`
33327
33328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33331  # "foo.exe" is OK but "foo" is an error.
33332  #
33333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33334  # It is also a way to make sure we got the proper file name for the real test later on.
33335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33336  if test "x$test_shortpath" = x; then
33337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33339    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33340  fi
33341
33342  # Call helper function which possibly converts this using DOS-style short mode.
33343  # If so, the updated path is stored in $new_path.
33344
33345  input_path="$new_path"
33346  # Check if we need to convert this using DOS-style short mode. If the path
33347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33348  # take no chances and rewrite it.
33349  # Note: m4 eats our [], so we need to use [ and ] instead.
33350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33351  if test "x$has_forbidden_chars" != x; then
33352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33356      # Going to short mode and back again did indeed matter. Since short mode is
33357      # case insensitive, let's make it lowercase to improve readability.
33358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33359      # Now convert it back to Unix-stile (cygpath)
33360      input_path=`$CYGPATH -u "$shortmode_path"`
33361      new_path="$input_path"
33362    fi
33363  fi
33364
33365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33366  if test "x$test_cygdrive_prefix" = x; then
33367    # As a simple fix, exclude /usr/bin since it's not a real path.
33368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33370      # a path prefixed by /cygdrive for fixpath to work.
33371      new_path="$CYGWIN_ROOT_PATH$input_path"
33372    fi
33373  fi
33374
33375
33376  if test "x$path" != "x$new_path"; then
33377    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33380  fi
33381
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383
33384  path="$POTENTIAL_FREETYPE_LIB_PATH"
33385  has_colon=`$ECHO $path | $GREP ^.:`
33386  new_path="$path"
33387  if test "x$has_colon" = x; then
33388    # Not in mixed or Windows style, start by that.
33389    new_path=`cmd //c echo $path`
33390  fi
33391
33392
33393  input_path="$new_path"
33394  # Check if we need to convert this using DOS-style short mode. If the path
33395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33396  # take no chances and rewrite it.
33397  # Note: m4 eats our [], so we need to use [ and ] instead.
33398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33399  if test "x$has_forbidden_chars" != x; then
33400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33402  fi
33403
33404
33405  windows_path="$new_path"
33406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33407    unix_path=`$CYGPATH -u "$windows_path"`
33408    new_path="$unix_path"
33409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33411    new_path="$unix_path"
33412  fi
33413
33414  if test "x$path" != "x$new_path"; then
33415    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33418  fi
33419
33420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33422
33423  else
33424    # We're on a posix platform. Hooray! :)
33425    path="$POTENTIAL_FREETYPE_LIB_PATH"
33426    has_space=`$ECHO "$path" | $GREP " "`
33427    if test "x$has_space" != x; then
33428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33431    fi
33432
33433    # Use eval to expand a potential ~
33434    eval path="$path"
33435    if test ! -f "$path" && test ! -d "$path"; then
33436      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33437    fi
33438
33439    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33440  fi
33441
33442
33443    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33445$as_echo_n "checking for freetype includes... " >&6; }
33446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33447$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33448    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33450$as_echo_n "checking for freetype libraries... " >&6; }
33451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33452$as_echo "$FREETYPE_LIB_PATH" >&6; }
33453  fi
33454
33455            else
33456
33457  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33458  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33459  METHOD="well-known location"
33460
33461  # First check if the files exists.
33462  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33463    # We found an arbitrary include file. That's a good sign.
33464    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33465$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33466    FOUND_FREETYPE=yes
33467
33468    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33469    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33470      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33471$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33472      FOUND_FREETYPE=no
33473    else
33474      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33475        # On Windows, we will need both .lib and .dll file.
33476        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33477          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33478$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33479          FOUND_FREETYPE=no
33480        fi
33481      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
33482        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33483        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33484      fi
33485    fi
33486  fi
33487
33488  if test "x$FOUND_FREETYPE" = xyes; then
33489
33490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33491
33492  # Input might be given as Windows format, start by converting to
33493  # unix format.
33494  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33495  new_path=`$CYGPATH -u "$path"`
33496
33497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33500  # "foo.exe" is OK but "foo" is an error.
33501  #
33502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33503  # It is also a way to make sure we got the proper file name for the real test later on.
33504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33505  if test "x$test_shortpath" = x; then
33506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33508    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33509  fi
33510
33511  # Call helper function which possibly converts this using DOS-style short mode.
33512  # If so, the updated path is stored in $new_path.
33513
33514  input_path="$new_path"
33515  # Check if we need to convert this using DOS-style short mode. If the path
33516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33517  # take no chances and rewrite it.
33518  # Note: m4 eats our [], so we need to use [ and ] instead.
33519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33520  if test "x$has_forbidden_chars" != x; then
33521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33525      # Going to short mode and back again did indeed matter. Since short mode is
33526      # case insensitive, let's make it lowercase to improve readability.
33527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33528      # Now convert it back to Unix-stile (cygpath)
33529      input_path=`$CYGPATH -u "$shortmode_path"`
33530      new_path="$input_path"
33531    fi
33532  fi
33533
33534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33535  if test "x$test_cygdrive_prefix" = x; then
33536    # As a simple fix, exclude /usr/bin since it's not a real path.
33537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33539      # a path prefixed by /cygdrive for fixpath to work.
33540      new_path="$CYGWIN_ROOT_PATH$input_path"
33541    fi
33542  fi
33543
33544
33545  if test "x$path" != "x$new_path"; then
33546    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33548$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33549  fi
33550
33551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33552
33553  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33554  has_colon=`$ECHO $path | $GREP ^.:`
33555  new_path="$path"
33556  if test "x$has_colon" = x; then
33557    # Not in mixed or Windows style, start by that.
33558    new_path=`cmd //c echo $path`
33559  fi
33560
33561
33562  input_path="$new_path"
33563  # Check if we need to convert this using DOS-style short mode. If the path
33564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33565  # take no chances and rewrite it.
33566  # Note: m4 eats our [], so we need to use [ and ] instead.
33567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33568  if test "x$has_forbidden_chars" != x; then
33569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33571  fi
33572
33573
33574  windows_path="$new_path"
33575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33576    unix_path=`$CYGPATH -u "$windows_path"`
33577    new_path="$unix_path"
33578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33580    new_path="$unix_path"
33581  fi
33582
33583  if test "x$path" != "x$new_path"; then
33584    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33586$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33587  fi
33588
33589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33591
33592  else
33593    # We're on a posix platform. Hooray! :)
33594    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33595    has_space=`$ECHO "$path" | $GREP " "`
33596    if test "x$has_space" != x; then
33597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33598$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33599      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33600    fi
33601
33602    # Use eval to expand a potential ~
33603    eval path="$path"
33604    if test ! -f "$path" && test ! -d "$path"; then
33605      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33606    fi
33607
33608    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33609  fi
33610
33611
33612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33613
33614  # Input might be given as Windows format, start by converting to
33615  # unix format.
33616  path="$POTENTIAL_FREETYPE_LIB_PATH"
33617  new_path=`$CYGPATH -u "$path"`
33618
33619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33622  # "foo.exe" is OK but "foo" is an error.
33623  #
33624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33625  # It is also a way to make sure we got the proper file name for the real test later on.
33626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33627  if test "x$test_shortpath" = x; then
33628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33629$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33630    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33631  fi
33632
33633  # Call helper function which possibly converts this using DOS-style short mode.
33634  # If so, the updated path is stored in $new_path.
33635
33636  input_path="$new_path"
33637  # Check if we need to convert this using DOS-style short mode. If the path
33638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33639  # take no chances and rewrite it.
33640  # Note: m4 eats our [], so we need to use [ and ] instead.
33641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33642  if test "x$has_forbidden_chars" != x; then
33643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33647      # Going to short mode and back again did indeed matter. Since short mode is
33648      # case insensitive, let's make it lowercase to improve readability.
33649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33650      # Now convert it back to Unix-stile (cygpath)
33651      input_path=`$CYGPATH -u "$shortmode_path"`
33652      new_path="$input_path"
33653    fi
33654  fi
33655
33656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33657  if test "x$test_cygdrive_prefix" = x; then
33658    # As a simple fix, exclude /usr/bin since it's not a real path.
33659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33661      # a path prefixed by /cygdrive for fixpath to work.
33662      new_path="$CYGWIN_ROOT_PATH$input_path"
33663    fi
33664  fi
33665
33666
33667  if test "x$path" != "x$new_path"; then
33668    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33671  fi
33672
33673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33674
33675  path="$POTENTIAL_FREETYPE_LIB_PATH"
33676  has_colon=`$ECHO $path | $GREP ^.:`
33677  new_path="$path"
33678  if test "x$has_colon" = x; then
33679    # Not in mixed or Windows style, start by that.
33680    new_path=`cmd //c echo $path`
33681  fi
33682
33683
33684  input_path="$new_path"
33685  # Check if we need to convert this using DOS-style short mode. If the path
33686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33687  # take no chances and rewrite it.
33688  # Note: m4 eats our [], so we need to use [ and ] instead.
33689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33690  if test "x$has_forbidden_chars" != x; then
33691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33693  fi
33694
33695
33696  windows_path="$new_path"
33697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33698    unix_path=`$CYGPATH -u "$windows_path"`
33699    new_path="$unix_path"
33700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33702    new_path="$unix_path"
33703  fi
33704
33705  if test "x$path" != "x$new_path"; then
33706    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33709  fi
33710
33711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33713
33714  else
33715    # We're on a posix platform. Hooray! :)
33716    path="$POTENTIAL_FREETYPE_LIB_PATH"
33717    has_space=`$ECHO "$path" | $GREP " "`
33718    if test "x$has_space" != x; then
33719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33721      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33722    fi
33723
33724    # Use eval to expand a potential ~
33725    eval path="$path"
33726    if test ! -f "$path" && test ! -d "$path"; then
33727      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33728    fi
33729
33730    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33731  fi
33732
33733
33734    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33736$as_echo_n "checking for freetype includes... " >&6; }
33737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33738$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33739    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33741$as_echo_n "checking for freetype libraries... " >&6; }
33742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33743$as_echo "$FREETYPE_LIB_PATH" >&6; }
33744  fi
33745
33746              if test "x$FOUND_FREETYPE" != xyes; then
33747
33748  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33749  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33750  METHOD="well-known location"
33751
33752  # First check if the files exists.
33753  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33754    # We found an arbitrary include file. That's a good sign.
33755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33756$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33757    FOUND_FREETYPE=yes
33758
33759    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33760    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33761      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33762$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33763      FOUND_FREETYPE=no
33764    else
33765      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33766        # On Windows, we will need both .lib and .dll file.
33767        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33768          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33769$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33770          FOUND_FREETYPE=no
33771        fi
33772      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
33773        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33774        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33775      fi
33776    fi
33777  fi
33778
33779  if test "x$FOUND_FREETYPE" = xyes; then
33780
33781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33782
33783  # Input might be given as Windows format, start by converting to
33784  # unix format.
33785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33786  new_path=`$CYGPATH -u "$path"`
33787
33788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33791  # "foo.exe" is OK but "foo" is an error.
33792  #
33793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33794  # It is also a way to make sure we got the proper file name for the real test later on.
33795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33796  if test "x$test_shortpath" = x; then
33797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33800  fi
33801
33802  # Call helper function which possibly converts this using DOS-style short mode.
33803  # If so, the updated path is stored in $new_path.
33804
33805  input_path="$new_path"
33806  # Check if we need to convert this using DOS-style short mode. If the path
33807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33808  # take no chances and rewrite it.
33809  # Note: m4 eats our [], so we need to use [ and ] instead.
33810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33811  if test "x$has_forbidden_chars" != x; then
33812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33816      # Going to short mode and back again did indeed matter. Since short mode is
33817      # case insensitive, let's make it lowercase to improve readability.
33818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33819      # Now convert it back to Unix-stile (cygpath)
33820      input_path=`$CYGPATH -u "$shortmode_path"`
33821      new_path="$input_path"
33822    fi
33823  fi
33824
33825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33826  if test "x$test_cygdrive_prefix" = x; then
33827    # As a simple fix, exclude /usr/bin since it's not a real path.
33828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33830      # a path prefixed by /cygdrive for fixpath to work.
33831      new_path="$CYGWIN_ROOT_PATH$input_path"
33832    fi
33833  fi
33834
33835
33836  if test "x$path" != "x$new_path"; then
33837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33840  fi
33841
33842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33843
33844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33845  has_colon=`$ECHO $path | $GREP ^.:`
33846  new_path="$path"
33847  if test "x$has_colon" = x; then
33848    # Not in mixed or Windows style, start by that.
33849    new_path=`cmd //c echo $path`
33850  fi
33851
33852
33853  input_path="$new_path"
33854  # Check if we need to convert this using DOS-style short mode. If the path
33855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33856  # take no chances and rewrite it.
33857  # Note: m4 eats our [], so we need to use [ and ] instead.
33858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33859  if test "x$has_forbidden_chars" != x; then
33860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33862  fi
33863
33864
33865  windows_path="$new_path"
33866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33867    unix_path=`$CYGPATH -u "$windows_path"`
33868    new_path="$unix_path"
33869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33871    new_path="$unix_path"
33872  fi
33873
33874  if test "x$path" != "x$new_path"; then
33875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33878  fi
33879
33880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33882
33883  else
33884    # We're on a posix platform. Hooray! :)
33885    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33886    has_space=`$ECHO "$path" | $GREP " "`
33887    if test "x$has_space" != x; then
33888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33890      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33891    fi
33892
33893    # Use eval to expand a potential ~
33894    eval path="$path"
33895    if test ! -f "$path" && test ! -d "$path"; then
33896      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33897    fi
33898
33899    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33900  fi
33901
33902
33903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904
33905  # Input might be given as Windows format, start by converting to
33906  # unix format.
33907  path="$POTENTIAL_FREETYPE_LIB_PATH"
33908  new_path=`$CYGPATH -u "$path"`
33909
33910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33913  # "foo.exe" is OK but "foo" is an error.
33914  #
33915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33916  # It is also a way to make sure we got the proper file name for the real test later on.
33917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33918  if test "x$test_shortpath" = x; then
33919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33921    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33922  fi
33923
33924  # Call helper function which possibly converts this using DOS-style short mode.
33925  # If so, the updated path is stored in $new_path.
33926
33927  input_path="$new_path"
33928  # Check if we need to convert this using DOS-style short mode. If the path
33929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33930  # take no chances and rewrite it.
33931  # Note: m4 eats our [], so we need to use [ and ] instead.
33932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33933  if test "x$has_forbidden_chars" != x; then
33934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33938      # Going to short mode and back again did indeed matter. Since short mode is
33939      # case insensitive, let's make it lowercase to improve readability.
33940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33941      # Now convert it back to Unix-stile (cygpath)
33942      input_path=`$CYGPATH -u "$shortmode_path"`
33943      new_path="$input_path"
33944    fi
33945  fi
33946
33947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33948  if test "x$test_cygdrive_prefix" = x; then
33949    # As a simple fix, exclude /usr/bin since it's not a real path.
33950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33952      # a path prefixed by /cygdrive for fixpath to work.
33953      new_path="$CYGWIN_ROOT_PATH$input_path"
33954    fi
33955  fi
33956
33957
33958  if test "x$path" != "x$new_path"; then
33959    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33962  fi
33963
33964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33965
33966  path="$POTENTIAL_FREETYPE_LIB_PATH"
33967  has_colon=`$ECHO $path | $GREP ^.:`
33968  new_path="$path"
33969  if test "x$has_colon" = x; then
33970    # Not in mixed or Windows style, start by that.
33971    new_path=`cmd //c echo $path`
33972  fi
33973
33974
33975  input_path="$new_path"
33976  # Check if we need to convert this using DOS-style short mode. If the path
33977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33978  # take no chances and rewrite it.
33979  # Note: m4 eats our [], so we need to use [ and ] instead.
33980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33981  if test "x$has_forbidden_chars" != x; then
33982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33984  fi
33985
33986
33987  windows_path="$new_path"
33988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33989    unix_path=`$CYGPATH -u "$windows_path"`
33990    new_path="$unix_path"
33991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33993    new_path="$unix_path"
33994  fi
33995
33996  if test "x$path" != "x$new_path"; then
33997    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34000  fi
34001
34002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34004
34005  else
34006    # We're on a posix platform. Hooray! :)
34007    path="$POTENTIAL_FREETYPE_LIB_PATH"
34008    has_space=`$ECHO "$path" | $GREP " "`
34009    if test "x$has_space" != x; then
34010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34012      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34013    fi
34014
34015    # Use eval to expand a potential ~
34016    eval path="$path"
34017    if test ! -f "$path" && test ! -d "$path"; then
34018      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34019    fi
34020
34021    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34022  fi
34023
34024
34025    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34027$as_echo_n "checking for freetype includes... " >&6; }
34028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34029$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34030    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34032$as_echo_n "checking for freetype libraries... " >&6; }
34033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34034$as_echo "$FREETYPE_LIB_PATH" >&6; }
34035  fi
34036
34037              fi
34038            fi
34039          fi
34040        fi
34041      fi # end check in well-known locations
34042
34043      if test "x$FOUND_FREETYPE" != xyes; then
34044
34045  # Print a helpful message on how to acquire the necessary build dependency.
34046  # freetype is the help tag: freetype, cups, pulse, alsa etc
34047  MISSING_DEPENDENCY=freetype
34048
34049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34050    cygwin_help $MISSING_DEPENDENCY
34051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34052    msys_help $MISSING_DEPENDENCY
34053  else
34054    PKGHANDLER_COMMAND=
34055
34056    case $PKGHANDLER in
34057      apt-get)
34058        apt_help     $MISSING_DEPENDENCY ;;
34059      yum)
34060        yum_help     $MISSING_DEPENDENCY ;;
34061      port)
34062        port_help    $MISSING_DEPENDENCY ;;
34063      pkgutil)
34064        pkgutil_help $MISSING_DEPENDENCY ;;
34065      pkgadd)
34066        pkgadd_help  $MISSING_DEPENDENCY ;;
34067      * )
34068        break ;;
34069    esac
34070
34071    if test "x$PKGHANDLER_COMMAND" != x; then
34072      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34073    fi
34074  fi
34075
34076        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34077      fi
34078    fi # end user specified settings
34079
34080    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34081    if test "x$FREETYPE_CFLAGS" = x; then
34082
34083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34084
34085  # Input might be given as Windows format, start by converting to
34086  # unix format.
34087  path="$FREETYPE_INCLUDE_PATH"
34088  new_path=`$CYGPATH -u "$path"`
34089
34090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34093  # "foo.exe" is OK but "foo" is an error.
34094  #
34095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34096  # It is also a way to make sure we got the proper file name for the real test later on.
34097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34098  if test "x$test_shortpath" = x; then
34099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34100$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34101    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34102  fi
34103
34104  # Call helper function which possibly converts this using DOS-style short mode.
34105  # If so, the updated path is stored in $new_path.
34106
34107  input_path="$new_path"
34108  # Check if we need to convert this using DOS-style short mode. If the path
34109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34110  # take no chances and rewrite it.
34111  # Note: m4 eats our [], so we need to use [ and ] instead.
34112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34113  if test "x$has_forbidden_chars" != x; then
34114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34118      # Going to short mode and back again did indeed matter. Since short mode is
34119      # case insensitive, let's make it lowercase to improve readability.
34120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34121      # Now convert it back to Unix-stile (cygpath)
34122      input_path=`$CYGPATH -u "$shortmode_path"`
34123      new_path="$input_path"
34124    fi
34125  fi
34126
34127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34128  if test "x$test_cygdrive_prefix" = x; then
34129    # As a simple fix, exclude /usr/bin since it's not a real path.
34130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34132      # a path prefixed by /cygdrive for fixpath to work.
34133      new_path="$CYGWIN_ROOT_PATH$input_path"
34134    fi
34135  fi
34136
34137
34138  if test "x$path" != "x$new_path"; then
34139    FREETYPE_INCLUDE_PATH="$new_path"
34140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34141$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34142  fi
34143
34144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34145
34146  path="$FREETYPE_INCLUDE_PATH"
34147  has_colon=`$ECHO $path | $GREP ^.:`
34148  new_path="$path"
34149  if test "x$has_colon" = x; then
34150    # Not in mixed or Windows style, start by that.
34151    new_path=`cmd //c echo $path`
34152  fi
34153
34154
34155  input_path="$new_path"
34156  # Check if we need to convert this using DOS-style short mode. If the path
34157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34158  # take no chances and rewrite it.
34159  # Note: m4 eats our [], so we need to use [ and ] instead.
34160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34161  if test "x$has_forbidden_chars" != x; then
34162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34164  fi
34165
34166
34167  windows_path="$new_path"
34168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34169    unix_path=`$CYGPATH -u "$windows_path"`
34170    new_path="$unix_path"
34171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34173    new_path="$unix_path"
34174  fi
34175
34176  if test "x$path" != "x$new_path"; then
34177    FREETYPE_INCLUDE_PATH="$new_path"
34178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34179$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34180  fi
34181
34182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34184
34185  else
34186    # We're on a posix platform. Hooray! :)
34187    path="$FREETYPE_INCLUDE_PATH"
34188    has_space=`$ECHO "$path" | $GREP " "`
34189    if test "x$has_space" != x; then
34190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34191$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34193    fi
34194
34195    # Use eval to expand a potential ~
34196    eval path="$path"
34197    if test ! -f "$path" && test ! -d "$path"; then
34198      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34199    fi
34200
34201    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34202  fi
34203
34204      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34205        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34206      else
34207        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34208      fi
34209    fi
34210
34211    if test "x$FREETYPE_LIBS" = x; then
34212
34213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34214
34215  # Input might be given as Windows format, start by converting to
34216  # unix format.
34217  path="$FREETYPE_LIB_PATH"
34218  new_path=`$CYGPATH -u "$path"`
34219
34220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34223  # "foo.exe" is OK but "foo" is an error.
34224  #
34225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34226  # It is also a way to make sure we got the proper file name for the real test later on.
34227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34228  if test "x$test_shortpath" = x; then
34229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34230$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34231    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34232  fi
34233
34234  # Call helper function which possibly converts this using DOS-style short mode.
34235  # If so, the updated path is stored in $new_path.
34236
34237  input_path="$new_path"
34238  # Check if we need to convert this using DOS-style short mode. If the path
34239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34240  # take no chances and rewrite it.
34241  # Note: m4 eats our [], so we need to use [ and ] instead.
34242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34243  if test "x$has_forbidden_chars" != x; then
34244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34248      # Going to short mode and back again did indeed matter. Since short mode is
34249      # case insensitive, let's make it lowercase to improve readability.
34250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34251      # Now convert it back to Unix-stile (cygpath)
34252      input_path=`$CYGPATH -u "$shortmode_path"`
34253      new_path="$input_path"
34254    fi
34255  fi
34256
34257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34258  if test "x$test_cygdrive_prefix" = x; then
34259    # As a simple fix, exclude /usr/bin since it's not a real path.
34260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34262      # a path prefixed by /cygdrive for fixpath to work.
34263      new_path="$CYGWIN_ROOT_PATH$input_path"
34264    fi
34265  fi
34266
34267
34268  if test "x$path" != "x$new_path"; then
34269    FREETYPE_LIB_PATH="$new_path"
34270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34271$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34272  fi
34273
34274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34275
34276  path="$FREETYPE_LIB_PATH"
34277  has_colon=`$ECHO $path | $GREP ^.:`
34278  new_path="$path"
34279  if test "x$has_colon" = x; then
34280    # Not in mixed or Windows style, start by that.
34281    new_path=`cmd //c echo $path`
34282  fi
34283
34284
34285  input_path="$new_path"
34286  # Check if we need to convert this using DOS-style short mode. If the path
34287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34288  # take no chances and rewrite it.
34289  # Note: m4 eats our [], so we need to use [ and ] instead.
34290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34291  if test "x$has_forbidden_chars" != x; then
34292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34294  fi
34295
34296
34297  windows_path="$new_path"
34298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34299    unix_path=`$CYGPATH -u "$windows_path"`
34300    new_path="$unix_path"
34301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34303    new_path="$unix_path"
34304  fi
34305
34306  if test "x$path" != "x$new_path"; then
34307    FREETYPE_LIB_PATH="$new_path"
34308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34309$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34310  fi
34311
34312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34314
34315  else
34316    # We're on a posix platform. Hooray! :)
34317    path="$FREETYPE_LIB_PATH"
34318    has_space=`$ECHO "$path" | $GREP " "`
34319    if test "x$has_space" != x; then
34320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34321$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34322      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34323    fi
34324
34325    # Use eval to expand a potential ~
34326    eval path="$path"
34327    if test ! -f "$path" && test ! -d "$path"; then
34328      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34329    fi
34330
34331    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34332  fi
34333
34334      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34335        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34336      else
34337        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34338      fi
34339    fi
34340
34341    # Try to compile it
34342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34343$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34344    ac_ext=cpp
34345ac_cpp='$CXXCPP $CPPFLAGS'
34346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34349
34350    PREV_CXXCFLAGS="$CXXFLAGS"
34351    PREV_LIBS="$LIBS"
34352    PREV_CXX="$CXX"
34353    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34354    LIBS="$LIBS $FREETYPE_LIBS"
34355    CXX="$FIXPATH $CXX"
34356    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34357/* end confdefs.h.  */
34358
34359          #include<ft2build.h>
34360          #include FT_FREETYPE_H
34361          int main () {
34362            FT_Init_FreeType(NULL);
34363            return 0;
34364          }
34365
34366_ACEOF
34367if ac_fn_cxx_try_link "$LINENO"; then :
34368
34369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34370$as_echo "yes" >&6; }
34371
34372else
34373
34374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34375$as_echo "no" >&6; }
34376          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34377$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34378          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34379$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34380
34381
34382  # Print a helpful message on how to acquire the necessary build dependency.
34383  # freetype is the help tag: freetype, cups, pulse, alsa etc
34384  MISSING_DEPENDENCY=freetype
34385
34386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34387    cygwin_help $MISSING_DEPENDENCY
34388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34389    msys_help $MISSING_DEPENDENCY
34390  else
34391    PKGHANDLER_COMMAND=
34392
34393    case $PKGHANDLER in
34394      apt-get)
34395        apt_help     $MISSING_DEPENDENCY ;;
34396      yum)
34397        yum_help     $MISSING_DEPENDENCY ;;
34398      port)
34399        port_help    $MISSING_DEPENDENCY ;;
34400      pkgutil)
34401        pkgutil_help $MISSING_DEPENDENCY ;;
34402      pkgadd)
34403        pkgadd_help  $MISSING_DEPENDENCY ;;
34404      * )
34405        break ;;
34406    esac
34407
34408    if test "x$PKGHANDLER_COMMAND" != x; then
34409      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34410    fi
34411  fi
34412
34413
34414          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34415
34416
34417fi
34418rm -f core conftest.err conftest.$ac_objext \
34419    conftest$ac_exeext conftest.$ac_ext
34420    CXXCFLAGS="$PREV_CXXFLAGS"
34421    LIBS="$PREV_LIBS"
34422    CXX="$PREV_CXX"
34423    ac_ext=cpp
34424ac_cpp='$CXXCPP $CPPFLAGS'
34425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34428
34429
34430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34431$as_echo_n "checking if we should bundle freetype... " >&6; }
34432    if test "x$BUNDLE_FREETYPE" = xyes; then
34433      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34434    fi
34435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34436$as_echo "$BUNDLE_FREETYPE" >&6; }
34437
34438  fi # end freetype needed
34439
34440
34441
34442
34443
34444
34445
34446  ###############################################################################
34447  #
34448  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34449  #
34450
34451# Check whether --with-alsa was given.
34452if test "${with_alsa+set}" = set; then :
34453  withval=$with_alsa;
34454fi
34455
34456
34457# Check whether --with-alsa-include was given.
34458if test "${with_alsa_include+set}" = set; then :
34459  withval=$with_alsa_include;
34460fi
34461
34462
34463# Check whether --with-alsa-lib was given.
34464if test "${with_alsa_lib+set}" = set; then :
34465  withval=$with_alsa_lib;
34466fi
34467
34468
34469  if test "x$ALSA_NOT_NEEDED" = xyes; then
34470    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34471      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34472$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34473    fi
34474    ALSA_CFLAGS=
34475    ALSA_LIBS=
34476  else
34477    ALSA_FOUND=no
34478
34479    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34480      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34481    fi
34482
34483    if test "x${with_alsa}" != x; then
34484      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34485      ALSA_CFLAGS="-I${with_alsa}/include"
34486      ALSA_FOUND=yes
34487    fi
34488    if test "x${with_alsa_include}" != x; then
34489      ALSA_CFLAGS="-I${with_alsa_include}"
34490      ALSA_FOUND=yes
34491    fi
34492    if test "x${with_alsa_lib}" != x; then
34493      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34494      ALSA_FOUND=yes
34495    fi
34496    if test "x$ALSA_FOUND" = xno; then
34497
34498
34499  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34500    # Source the builddeps file again, to make sure it uses the latest variables!
34501    . $builddepsfile
34502    # Look for a target and build machine specific resource!
34503    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34504    if test "x$resource" = x; then
34505      # Ok, lets instead look for a target specific resource
34506      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34507    fi
34508    if test "x$resource" = x; then
34509      # Ok, lets instead look for a build specific resource
34510      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34511    fi
34512    if test "x$resource" = x; then
34513      # Ok, lets instead look for a generic resource
34514      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34515      resource=${builddep_alsa}
34516    fi
34517    if test "x$resource" != x; then
34518      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34519$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34520      # If the resource in the builddeps.conf file is an existing directory,
34521      # for example /java/linux/cups
34522      if test -d ${resource}; then
34523        depdir=${resource}
34524      else
34525
34526  # alsa is for example mymodule
34527  # $resource is for example libs/general/libmymod_1_2_3.zip
34528  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34529  # $with_builddeps_dir is for example /localhome/builddeps
34530  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34531  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34532  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34533  filename=`basename $resource`
34534  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34535  filebase=${filename%%.*}
34536  extension=${filename#*.}
34537  installdir=$with_builddeps_dir/$filebase
34538  if test ! -f $installdir/$filename.unpacked; then
34539    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34540$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34541    if test ! -d $installdir; then
34542      mkdir -p $installdir
34543    fi
34544    if test ! -d $installdir; then
34545      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34546    fi
34547    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34548    touch $tmpfile
34549    if test ! -f $tmpfile; then
34550      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34551    fi
34552
34553  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34554  # $tmpfile is the local file name for the downloaded file.
34555  VALID_TOOL=no
34556  if test "x$BDEPS_FTP" = xwget; then
34557    VALID_TOOL=yes
34558    wget -O $tmpfile $with_builddeps_server/$resource
34559  fi
34560  if test "x$BDEPS_FTP" = xlftp; then
34561    VALID_TOOL=yes
34562    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34563  fi
34564  if test "x$BDEPS_FTP" = xftp; then
34565    VALID_TOOL=yes
34566    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34567    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34568    FTPUSERPWD=${FTPSERVER%%@*}
34569    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34570      FTPUSER=${userpwd%%:*}
34571      FTPPWD=${userpwd#*@}
34572      FTPSERVER=${FTPSERVER#*@}
34573    else
34574      FTPUSER=ftp
34575      FTPPWD=ftp
34576    fi
34577    # the "pass" command does not work on some
34578    # ftp clients (read ftp.exe) but if it works,
34579    # passive mode is better!
34580    ( \
34581        echo "user $FTPUSER $FTPPWD"        ; \
34582        echo "pass"                         ; \
34583        echo "bin"                          ; \
34584        echo "get $FTPPATH $tmpfile"              ; \
34585    ) | ftp -in $FTPSERVER
34586  fi
34587  if test "x$VALID_TOOL" != xyes; then
34588    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34589  fi
34590
34591    mv $tmpfile $installdir/$filename
34592    if test ! -s $installdir/$filename; then
34593      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34594    fi
34595    case "$extension" in
34596      zip)  echo "Unzipping $installdir/$filename..."
34597        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34598        ;;
34599      tar.gz) echo "Untaring $installdir/$filename..."
34600        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34601        ;;
34602      tgz) echo "Untaring $installdir/$filename..."
34603        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34604        ;;
34605      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34606        ;;
34607    esac
34608  fi
34609  if test -f $installdir/$filename.unpacked; then
34610    depdir=$installdir
34611  fi
34612
34613      fi
34614      # Source the builddeps file again, because in the previous command, the depdir
34615      # was updated to point at the current build dependency install directory.
34616      . $builddepsfile
34617      # Now extract variables from the builddeps.conf files.
34618      theroot=${builddep_alsa_ROOT}
34619      thecflags=${builddep_alsa_CFLAGS}
34620      thelibs=${builddep_alsa_LIBS}
34621      if test "x$depdir" = x; then
34622        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34623      fi
34624      ALSA=$depdir
34625      if test "x$theroot" != x; then
34626        ALSA="$theroot"
34627      fi
34628      if test "x$thecflags" != x; then
34629        ALSA_CFLAGS="$thecflags"
34630      fi
34631      if test "x$thelibs" != x; then
34632        ALSA_LIBS="$thelibs"
34633      fi
34634      ALSA_FOUND=yes
34635      else ALSA_FOUND=no
34636
34637    fi
34638    else ALSA_FOUND=no
34639
34640  fi
34641
34642    fi
34643    if test "x$ALSA_FOUND" = xno; then
34644
34645pkg_failed=no
34646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34647$as_echo_n "checking for ALSA... " >&6; }
34648
34649if test -n "$ALSA_CFLAGS"; then
34650    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34651 elif test -n "$PKG_CONFIG"; then
34652    if test -n "$PKG_CONFIG" && \
34653    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34654  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34655  ac_status=$?
34656  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34657  test $ac_status = 0; }; then
34658  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34659else
34660  pkg_failed=yes
34661fi
34662 else
34663    pkg_failed=untried
34664fi
34665if test -n "$ALSA_LIBS"; then
34666    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34667 elif test -n "$PKG_CONFIG"; then
34668    if test -n "$PKG_CONFIG" && \
34669    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34670  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34671  ac_status=$?
34672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34673  test $ac_status = 0; }; then
34674  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34675else
34676  pkg_failed=yes
34677fi
34678 else
34679    pkg_failed=untried
34680fi
34681
34682
34683
34684if test $pkg_failed = yes; then
34685
34686if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34687        _pkg_short_errors_supported=yes
34688else
34689        _pkg_short_errors_supported=no
34690fi
34691        if test $_pkg_short_errors_supported = yes; then
34692	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34693        else
34694	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34695        fi
34696	# Put the nasty error message in config.log where it belongs
34697	echo "$ALSA_PKG_ERRORS" >&5
34698
34699	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34700$as_echo "no" >&6; }
34701                ALSA_FOUND=no
34702elif test $pkg_failed = untried; then
34703	ALSA_FOUND=no
34704else
34705	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34706	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34708$as_echo "yes" >&6; }
34709	ALSA_FOUND=yes
34710fi
34711    fi
34712    if test "x$ALSA_FOUND" = xno; then
34713      for ac_header in alsa/asoundlib.h
34714do :
34715  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34716if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34717  cat >>confdefs.h <<_ACEOF
34718#define HAVE_ALSA_ASOUNDLIB_H 1
34719_ACEOF
34720
34721            ALSA_FOUND=yes
34722            ALSA_CFLAGS=-Iignoreme
34723            ALSA_LIBS=-lasound
34724            DEFAULT_ALSA=yes
34725
34726else
34727  ALSA_FOUND=no
34728fi
34729
34730done
34731
34732    fi
34733    if test "x$ALSA_FOUND" = xno; then
34734
34735  # Print a helpful message on how to acquire the necessary build dependency.
34736  # alsa is the help tag: freetype, cups, pulse, alsa etc
34737  MISSING_DEPENDENCY=alsa
34738
34739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34740    cygwin_help $MISSING_DEPENDENCY
34741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34742    msys_help $MISSING_DEPENDENCY
34743  else
34744    PKGHANDLER_COMMAND=
34745
34746    case $PKGHANDLER in
34747      apt-get)
34748        apt_help     $MISSING_DEPENDENCY ;;
34749      yum)
34750        yum_help     $MISSING_DEPENDENCY ;;
34751      port)
34752        port_help    $MISSING_DEPENDENCY ;;
34753      pkgutil)
34754        pkgutil_help $MISSING_DEPENDENCY ;;
34755      pkgadd)
34756        pkgadd_help  $MISSING_DEPENDENCY ;;
34757      * )
34758        break ;;
34759    esac
34760
34761    if test "x$PKGHANDLER_COMMAND" != x; then
34762      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34763    fi
34764  fi
34765
34766      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34767    fi
34768  fi
34769
34770
34771
34772
34773
34774
34775  ###############################################################################
34776  #
34777  # Check for the jpeg library
34778  #
34779
34780  USE_EXTERNAL_LIBJPEG=true
34781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34782$as_echo_n "checking for main in -ljpeg... " >&6; }
34783if ${ac_cv_lib_jpeg_main+:} false; then :
34784  $as_echo_n "(cached) " >&6
34785else
34786  ac_check_lib_save_LIBS=$LIBS
34787LIBS="-ljpeg  $LIBS"
34788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34789/* end confdefs.h.  */
34790
34791
34792int
34793main ()
34794{
34795return main ();
34796  ;
34797  return 0;
34798}
34799_ACEOF
34800if ac_fn_cxx_try_link "$LINENO"; then :
34801  ac_cv_lib_jpeg_main=yes
34802else
34803  ac_cv_lib_jpeg_main=no
34804fi
34805rm -f core conftest.err conftest.$ac_objext \
34806    conftest$ac_exeext conftest.$ac_ext
34807LIBS=$ac_check_lib_save_LIBS
34808fi
34809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34810$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34811if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34812  cat >>confdefs.h <<_ACEOF
34813#define HAVE_LIBJPEG 1
34814_ACEOF
34815
34816  LIBS="-ljpeg $LIBS"
34817
34818else
34819   USE_EXTERNAL_LIBJPEG=false
34820      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34821$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34822
34823fi
34824
34825
34826
34827  ###############################################################################
34828  #
34829  # Check for the gif library
34830  #
34831
34832
34833# Check whether --with-giflib was given.
34834if test "${with_giflib+set}" = set; then :
34835  withval=$with_giflib;
34836fi
34837
34838
34839
34840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34841$as_echo_n "checking for which giflib to use... " >&6; }
34842
34843  # default is bundled
34844  DEFAULT_GIFLIB=bundled
34845
34846  #
34847  # if user didn't specify, use DEFAULT_GIFLIB
34848  #
34849  if test "x${with_giflib}" = "x"; then
34850    with_giflib=${DEFAULT_GIFLIB}
34851  fi
34852
34853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34854$as_echo "${with_giflib}" >&6; }
34855
34856  if test "x${with_giflib}" = "xbundled"; then
34857    USE_EXTERNAL_LIBGIF=false
34858  elif test "x${with_giflib}" = "xsystem"; then
34859    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34860if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34861
34862else
34863   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34864fi
34865
34866
34867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34868$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34869if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34870  $as_echo_n "(cached) " >&6
34871else
34872  ac_check_lib_save_LIBS=$LIBS
34873LIBS="-lgif  $LIBS"
34874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34875/* end confdefs.h.  */
34876
34877/* Override any GCC internal prototype to avoid an error.
34878   Use char because int might match the return type of a GCC
34879   builtin and then its argument prototype would still apply.  */
34880#ifdef __cplusplus
34881extern "C"
34882#endif
34883char DGifGetCode ();
34884int
34885main ()
34886{
34887return DGifGetCode ();
34888  ;
34889  return 0;
34890}
34891_ACEOF
34892if ac_fn_cxx_try_link "$LINENO"; then :
34893  ac_cv_lib_gif_DGifGetCode=yes
34894else
34895  ac_cv_lib_gif_DGifGetCode=no
34896fi
34897rm -f core conftest.err conftest.$ac_objext \
34898    conftest$ac_exeext conftest.$ac_ext
34899LIBS=$ac_check_lib_save_LIBS
34900fi
34901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
34902$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
34903if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
34904  cat >>confdefs.h <<_ACEOF
34905#define HAVE_LIBGIF 1
34906_ACEOF
34907
34908  LIBS="-lgif $LIBS"
34909
34910else
34911   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
34912fi
34913
34914
34915    USE_EXTERNAL_LIBGIF=true
34916  else
34917    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
34918  fi
34919
34920
34921  ###############################################################################
34922  #
34923  # Check for the zlib library
34924  #
34925
34926
34927# Check whether --with-zlib was given.
34928if test "${with_zlib+set}" = set; then :
34929  withval=$with_zlib;
34930fi
34931
34932
34933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34934$as_echo_n "checking for compress in -lz... " >&6; }
34935if ${ac_cv_lib_z_compress+:} false; then :
34936  $as_echo_n "(cached) " >&6
34937else
34938  ac_check_lib_save_LIBS=$LIBS
34939LIBS="-lz  $LIBS"
34940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34941/* end confdefs.h.  */
34942
34943/* Override any GCC internal prototype to avoid an error.
34944   Use char because int might match the return type of a GCC
34945   builtin and then its argument prototype would still apply.  */
34946#ifdef __cplusplus
34947extern "C"
34948#endif
34949char compress ();
34950int
34951main ()
34952{
34953return compress ();
34954  ;
34955  return 0;
34956}
34957_ACEOF
34958if ac_fn_cxx_try_link "$LINENO"; then :
34959  ac_cv_lib_z_compress=yes
34960else
34961  ac_cv_lib_z_compress=no
34962fi
34963rm -f core conftest.err conftest.$ac_objext \
34964    conftest$ac_exeext conftest.$ac_ext
34965LIBS=$ac_check_lib_save_LIBS
34966fi
34967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34968$as_echo "$ac_cv_lib_z_compress" >&6; }
34969if test "x$ac_cv_lib_z_compress" = xyes; then :
34970   ZLIB_FOUND=yes
34971else
34972   ZLIB_FOUND=no
34973fi
34974
34975
34976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
34977$as_echo_n "checking for which zlib to use... " >&6; }
34978
34979  DEFAULT_ZLIB=bundled
34980  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
34981    #
34982    # On macosx default is system...on others default is
34983    #
34984    DEFAULT_ZLIB=system
34985  fi
34986
34987  if test "x${ZLIB_FOUND}" != "xyes"; then
34988    #
34989    # If we don't find any system...set default to bundled
34990    #
34991    DEFAULT_ZLIB=bundled
34992  fi
34993
34994  #
34995  # If user didn't specify, use DEFAULT_ZLIB
34996  #
34997  if test "x${with_zlib}" = "x"; then
34998    with_zlib=${DEFAULT_ZLIB}
34999  fi
35000
35001  if test "x${with_zlib}" = "xbundled"; then
35002    USE_EXTERNAL_LIBZ=false
35003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35004$as_echo "bundled" >&6; }
35005  elif test "x${with_zlib}" = "xsystem"; then
35006    if test "x${ZLIB_FOUND}" = "xyes"; then
35007      USE_EXTERNAL_LIBZ=true
35008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35009$as_echo "system" >&6; }
35010    else
35011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35012$as_echo "system not found" >&6; }
35013      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35014    fi
35015  else
35016    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35017  fi
35018
35019
35020
35021  ###############################################################################
35022  LIBZIP_CAN_USE_MMAP=true
35023
35024
35025
35026  ###############################################################################
35027  #
35028  # Check if altzone exists in time.h
35029  #
35030
35031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35032/* end confdefs.h.  */
35033#include <time.h>
35034int
35035main ()
35036{
35037return (int)altzone;
35038  ;
35039  return 0;
35040}
35041_ACEOF
35042if ac_fn_cxx_try_link "$LINENO"; then :
35043  has_altzone=yes
35044else
35045  has_altzone=no
35046fi
35047rm -f core conftest.err conftest.$ac_objext \
35048    conftest$ac_exeext conftest.$ac_ext
35049  if test "x$has_altzone" = xyes; then
35050
35051$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35052
35053  fi
35054
35055  ###############################################################################
35056  #
35057  # Check the maths library
35058  #
35059
35060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35061$as_echo_n "checking for cos in -lm... " >&6; }
35062if ${ac_cv_lib_m_cos+:} false; then :
35063  $as_echo_n "(cached) " >&6
35064else
35065  ac_check_lib_save_LIBS=$LIBS
35066LIBS="-lm  $LIBS"
35067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35068/* end confdefs.h.  */
35069
35070/* Override any GCC internal prototype to avoid an error.
35071   Use char because int might match the return type of a GCC
35072   builtin and then its argument prototype would still apply.  */
35073#ifdef __cplusplus
35074extern "C"
35075#endif
35076char cos ();
35077int
35078main ()
35079{
35080return cos ();
35081  ;
35082  return 0;
35083}
35084_ACEOF
35085if ac_fn_cxx_try_link "$LINENO"; then :
35086  ac_cv_lib_m_cos=yes
35087else
35088  ac_cv_lib_m_cos=no
35089fi
35090rm -f core conftest.err conftest.$ac_objext \
35091    conftest$ac_exeext conftest.$ac_ext
35092LIBS=$ac_check_lib_save_LIBS
35093fi
35094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35095$as_echo "$ac_cv_lib_m_cos" >&6; }
35096if test "x$ac_cv_lib_m_cos" = xyes; then :
35097  cat >>confdefs.h <<_ACEOF
35098#define HAVE_LIBM 1
35099_ACEOF
35100
35101  LIBS="-lm $LIBS"
35102
35103else
35104
35105        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35106$as_echo "$as_me: Maths library was not found" >&6;}
35107
35108
35109fi
35110
35111
35112
35113  ###############################################################################
35114  #
35115  # Check for libdl.so
35116
35117  save_LIBS="$LIBS"
35118  LIBS=""
35119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35120$as_echo_n "checking for dlopen in -ldl... " >&6; }
35121if ${ac_cv_lib_dl_dlopen+:} false; then :
35122  $as_echo_n "(cached) " >&6
35123else
35124  ac_check_lib_save_LIBS=$LIBS
35125LIBS="-ldl  $LIBS"
35126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35127/* end confdefs.h.  */
35128
35129/* Override any GCC internal prototype to avoid an error.
35130   Use char because int might match the return type of a GCC
35131   builtin and then its argument prototype would still apply.  */
35132#ifdef __cplusplus
35133extern "C"
35134#endif
35135char dlopen ();
35136int
35137main ()
35138{
35139return dlopen ();
35140  ;
35141  return 0;
35142}
35143_ACEOF
35144if ac_fn_cxx_try_link "$LINENO"; then :
35145  ac_cv_lib_dl_dlopen=yes
35146else
35147  ac_cv_lib_dl_dlopen=no
35148fi
35149rm -f core conftest.err conftest.$ac_objext \
35150    conftest$ac_exeext conftest.$ac_ext
35151LIBS=$ac_check_lib_save_LIBS
35152fi
35153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35154$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35155if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35156  cat >>confdefs.h <<_ACEOF
35157#define HAVE_LIBDL 1
35158_ACEOF
35159
35160  LIBS="-ldl $LIBS"
35161
35162fi
35163
35164  LIBDL="$LIBS"
35165
35166  LIBS="$save_LIBS"
35167
35168
35169  ###############################################################################
35170  #
35171  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35172  # dynamic build is configured on command line.
35173  #
35174
35175# Check whether --with-stdc++lib was given.
35176if test "${with_stdc__lib+set}" = set; then :
35177  withval=$with_stdc__lib;
35178        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35179                && test "x$with_stdc__lib" != xdefault; then
35180          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35181        fi
35182
35183else
35184  with_stdc__lib=default
35185
35186fi
35187
35188
35189  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35190    # Test if -lstdc++ works.
35191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35192$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35193    ac_ext=cpp
35194ac_cpp='$CXXCPP $CPPFLAGS'
35195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35198
35199    OLD_CXXFLAGS="$CXXFLAGS"
35200    CXXFLAGS="$CXXFLAGS -lstdc++"
35201    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35202/* end confdefs.h.  */
35203
35204int
35205main ()
35206{
35207return 0;
35208  ;
35209  return 0;
35210}
35211_ACEOF
35212if ac_fn_cxx_try_link "$LINENO"; then :
35213  has_dynamic_libstdcxx=yes
35214else
35215  has_dynamic_libstdcxx=no
35216fi
35217rm -f core conftest.err conftest.$ac_objext \
35218    conftest$ac_exeext conftest.$ac_ext
35219    CXXFLAGS="$OLD_CXXFLAGS"
35220    ac_ext=cpp
35221ac_cpp='$CXXCPP $CPPFLAGS'
35222ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35223ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35224ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35225
35226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35227$as_echo "$has_dynamic_libstdcxx" >&6; }
35228
35229    # Test if stdc++ can be linked statically.
35230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35231$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35232    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35233    ac_ext=cpp
35234ac_cpp='$CXXCPP $CPPFLAGS'
35235ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35236ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35237ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35238
35239    OLD_LIBS="$LIBS"
35240    OLD_CXX="$CXX"
35241    LIBS="$STATIC_STDCXX_FLAGS"
35242    CXX="$CC"
35243    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35244/* end confdefs.h.  */
35245
35246int
35247main ()
35248{
35249return 0;
35250  ;
35251  return 0;
35252}
35253_ACEOF
35254if ac_fn_cxx_try_link "$LINENO"; then :
35255  has_static_libstdcxx=yes
35256else
35257  has_static_libstdcxx=no
35258fi
35259rm -f core conftest.err conftest.$ac_objext \
35260    conftest$ac_exeext conftest.$ac_ext
35261    LIBS="$OLD_LIBS"
35262    CXX="$OLD_CXX"
35263    ac_ext=cpp
35264ac_cpp='$CXXCPP $CPPFLAGS'
35265ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35266ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35267ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35268
35269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35270$as_echo "$has_static_libstdcxx" >&6; }
35271
35272    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35273      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35274    fi
35275
35276    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35277      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35278    fi
35279
35280    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35281      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35282    fi
35283
35284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35285$as_echo_n "checking how to link with libstdc++... " >&6; }
35286    # If dynamic was requested, it's available since it would fail above otherwise.
35287    # If dynamic wasn't requested, go with static unless it isn't available.
35288    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35289      LIBCXX="$LIBCXX -lstdc++"
35290      LDCXX="$CXX"
35291      STATIC_CXX_SETTING="STATIC_CXX=false"
35292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35293$as_echo "dynamic" >&6; }
35294    else
35295      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35296      LDCXX="$CC"
35297      STATIC_CXX_SETTING="STATIC_CXX=true"
35298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35299$as_echo "static" >&6; }
35300    fi
35301  fi
35302
35303
35304  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35305    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35306
35307pkg_failed=no
35308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35309$as_echo_n "checking for LIBFFI... " >&6; }
35310
35311if test -n "$LIBFFI_CFLAGS"; then
35312    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35313 elif test -n "$PKG_CONFIG"; then
35314    if test -n "$PKG_CONFIG" && \
35315    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35316  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35317  ac_status=$?
35318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35319  test $ac_status = 0; }; then
35320  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35321else
35322  pkg_failed=yes
35323fi
35324 else
35325    pkg_failed=untried
35326fi
35327if test -n "$LIBFFI_LIBS"; then
35328    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35329 elif test -n "$PKG_CONFIG"; then
35330    if test -n "$PKG_CONFIG" && \
35331    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35332  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35333  ac_status=$?
35334  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35335  test $ac_status = 0; }; then
35336  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35337else
35338  pkg_failed=yes
35339fi
35340 else
35341    pkg_failed=untried
35342fi
35343
35344
35345
35346if test $pkg_failed = yes; then
35347
35348if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35349        _pkg_short_errors_supported=yes
35350else
35351        _pkg_short_errors_supported=no
35352fi
35353        if test $_pkg_short_errors_supported = yes; then
35354	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35355        else
35356	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35357        fi
35358	# Put the nasty error message in config.log where it belongs
35359	echo "$LIBFFI_PKG_ERRORS" >&5
35360
35361	as_fn_error $? "Package requirements (libffi) were not met:
35362
35363$LIBFFI_PKG_ERRORS
35364
35365Consider adjusting the PKG_CONFIG_PATH environment variable if you
35366installed software in a non-standard prefix.
35367
35368Alternatively, you may set the environment variables LIBFFI_CFLAGS
35369and LIBFFI_LIBS to avoid the need to call pkg-config.
35370See the pkg-config man page for more details.
35371" "$LINENO" 5
35372elif test $pkg_failed = untried; then
35373	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35375as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35376is in your PATH or set the PKG_CONFIG environment variable to the full
35377path to pkg-config.
35378
35379Alternatively, you may set the environment variables LIBFFI_CFLAGS
35380and LIBFFI_LIBS to avoid the need to call pkg-config.
35381See the pkg-config man page for more details.
35382
35383To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35384See \`config.log' for more details" "$LINENO" 5; }
35385else
35386	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35387	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35389$as_echo "yes" >&6; }
35390	:
35391fi
35392
35393  fi
35394
35395  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35396    # Extract the first word of "llvm-config", so it can be a program name with args.
35397set dummy llvm-config; ac_word=$2
35398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35399$as_echo_n "checking for $ac_word... " >&6; }
35400if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35401  $as_echo_n "(cached) " >&6
35402else
35403  if test -n "$LLVM_CONFIG"; then
35404  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35405else
35406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35407for as_dir in $PATH
35408do
35409  IFS=$as_save_IFS
35410  test -z "$as_dir" && as_dir=.
35411    for ac_exec_ext in '' $ac_executable_extensions; do
35412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35413    ac_cv_prog_LLVM_CONFIG="llvm-config"
35414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35415    break 2
35416  fi
35417done
35418  done
35419IFS=$as_save_IFS
35420
35421fi
35422fi
35423LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35424if test -n "$LLVM_CONFIG"; then
35425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35426$as_echo "$LLVM_CONFIG" >&6; }
35427else
35428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35429$as_echo "no" >&6; }
35430fi
35431
35432
35433
35434    if test "x$LLVM_CONFIG" != xllvm-config; then
35435      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35436    fi
35437
35438    llvm_components="jit mcjit engine nativecodegen native"
35439    unset LLVM_CFLAGS
35440    for flag in $("$LLVM_CONFIG" --cxxflags); do
35441      if echo "${flag}" | grep -q '^-[ID]'; then
35442        if test "${flag}" != "-D_DEBUG" ; then
35443          if test "${LLVM_CFLAGS}" != "" ; then
35444            LLVM_CFLAGS="${LLVM_CFLAGS} "
35445          fi
35446          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35447        fi
35448      fi
35449    done
35450    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35451    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35452
35453    unset LLVM_LDFLAGS
35454    for flag in $("${LLVM_CONFIG}" --ldflags); do
35455      if echo "${flag}" | grep -q '^-L'; then
35456        if test "${LLVM_LDFLAGS}" != ""; then
35457          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35458        fi
35459        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35460      fi
35461    done
35462
35463    unset LLVM_LIBS
35464    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35465      if echo "${flag}" | grep -q '^-l'; then
35466        if test "${LLVM_LIBS}" != ""; then
35467          LLVM_LIBS="${LLVM_LIBS} "
35468        fi
35469        LLVM_LIBS="${LLVM_LIBS}${flag}"
35470      fi
35471    done
35472
35473
35474
35475
35476  fi
35477
35478  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35479  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35480    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35481  fi
35482
35483  # TODO better (platform agnostic) test
35484  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35485    LIBCXX="-lstdc++"
35486  fi
35487
35488
35489
35490
35491
35492###############################################################################
35493#
35494# We need to do some final tweaking, when everything else is done.
35495#
35496###############################################################################
35497
35498
35499  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35500
35501
35502  # The name of the Service Agent jar.
35503  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35504  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35505    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35506  fi
35507
35508
35509
35510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35511$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35512
35513    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35514      ENABLE_INTREE_EC=yes
35515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35516$as_echo "yes" >&6; }
35517    else
35518      ENABLE_INTREE_EC=no
35519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35520$as_echo "no" >&6; }
35521    fi
35522
35523
35524
35525
35526###############################################################################
35527#
35528# Configure parts of the build that only affect the build performance,
35529# not the result.
35530#
35531###############################################################################
35532
35533
35534  # How many cores do we have on this build system?
35535
35536# Check whether --with-num-cores was given.
35537if test "${with_num_cores+set}" = set; then :
35538  withval=$with_num_cores;
35539fi
35540
35541  if test "x$with_num_cores" = x; then
35542    # The number of cores were not specified, try to probe them.
35543
35544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35545$as_echo_n "checking for number of cores... " >&6; }
35546  NUM_CORES=1
35547  FOUND_CORES=no
35548
35549  if test -f /proc/cpuinfo; then
35550    # Looks like a Linux (or cygwin) system
35551    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35552    FOUND_CORES=yes
35553  elif test -x /usr/sbin/psrinfo; then
35554    # Looks like a Solaris system
35555    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35556    FOUND_CORES=yes
35557  elif test -x /usr/sbin/system_profiler; then
35558    # Looks like a MacOSX system
35559    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35560    FOUND_CORES=yes
35561  elif test -n "$NUMBER_OF_PROCESSORS"; then
35562    # On windows, look in the env
35563    NUM_CORES=$NUMBER_OF_PROCESSORS
35564    FOUND_CORES=yes
35565  fi
35566
35567  if test "x$FOUND_CORES" = xyes; then
35568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35569$as_echo "$NUM_CORES" >&6; }
35570  else
35571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35572$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35573    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35574$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35575  fi
35576
35577  else
35578    NUM_CORES=$with_num_cores
35579  fi
35580
35581
35582
35583  # How much memory do we have on this build system?
35584
35585# Check whether --with-memory-size was given.
35586if test "${with_memory_size+set}" = set; then :
35587  withval=$with_memory_size;
35588fi
35589
35590  if test "x$with_memory_size" = x; then
35591    # The memory size was not specified, try to probe it.
35592
35593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35594$as_echo_n "checking for memory size... " >&6; }
35595  # Default to 1024 MB
35596  MEMORY_SIZE=1024
35597  FOUND_MEM=no
35598
35599  if test -f /proc/meminfo; then
35600    # Looks like a Linux (or cygwin) system
35601    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35602    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35603    FOUND_MEM=yes
35604  elif test -x /usr/sbin/prtconf; then
35605    # Looks like a Solaris system
35606    MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
35607    FOUND_MEM=yes
35608  elif test -x /usr/sbin/system_profiler; then
35609    # Looks like a MacOSX system
35610    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35611    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35612    FOUND_MEM=yes
35613  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35614    # Windows, but without cygwin
35615    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35616    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35617    FOUND_MEM=yes
35618  fi
35619
35620  if test "x$FOUND_MEM" = xyes; then
35621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35622$as_echo "$MEMORY_SIZE MB" >&6; }
35623  else
35624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35625$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35626    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35627$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35628  fi
35629
35630  else
35631    MEMORY_SIZE=$with_memory_size
35632  fi
35633
35634
35635
35636  # Provide a decent default number of parallel jobs for make depending on
35637  # number of cores, amount of memory and machine architecture.
35638
35639# Check whether --with-jobs was given.
35640if test "${with_jobs+set}" = set; then :
35641  withval=$with_jobs;
35642fi
35643
35644  if test "x$with_jobs" = x; then
35645    # Number of jobs was not specified, calculate.
35646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35647$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35648    # Approximate memory in GB, rounding up a bit.
35649    memory_gb=`expr $MEMORY_SIZE / 1100`
35650    # Pick the lowest of memory in gb and number of cores.
35651    if test "$memory_gb" -lt "$NUM_CORES"; then
35652      JOBS="$memory_gb"
35653    else
35654      JOBS="$NUM_CORES"
35655      # On bigger machines, leave some room for other processes to run
35656      if test "$JOBS" -gt "4"; then
35657        JOBS=`expr $JOBS '*' 90 / 100`
35658      fi
35659    fi
35660    # Cap number of jobs to 16
35661    if test "$JOBS" -gt "16"; then
35662      JOBS=16
35663    fi
35664    if test "$JOBS" -eq "0"; then
35665      JOBS=1
35666    fi
35667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35668$as_echo "$JOBS" >&6; }
35669  else
35670    JOBS=$with_jobs
35671  fi
35672
35673
35674
35675# Setup smart javac (after cores and memory have been setup)
35676
35677
35678# Check whether --with-sjavac-server-java was given.
35679if test "${with_sjavac_server_java+set}" = set; then :
35680  withval=$with_sjavac_server_java;
35681fi
35682
35683
35684  if test "x$with_sjavac_server_java" != x; then
35685    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35686    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35687    if test "x$FOUND_VERSION" = x; then
35688      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35689    fi
35690  else
35691    SJAVAC_SERVER_JAVA=""
35692    # Hotspot specific options.
35693
35694  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35695  $ECHO "Command: $JAVA -verbosegc -version" >&5
35696  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35697  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35698  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35699  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35700    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35701    JVM_ARG_OK=true
35702  else
35703    $ECHO "Arg failed:" >&5
35704    $ECHO "$OUTPUT" >&5
35705    JVM_ARG_OK=false
35706  fi
35707
35708    # JRockit specific options.
35709
35710  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35711  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35712  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35713  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35714  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35715  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35716    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35717    JVM_ARG_OK=true
35718  else
35719    $ECHO "Arg failed:" >&5
35720    $ECHO "$OUTPUT" >&5
35721    JVM_ARG_OK=false
35722  fi
35723
35724    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35725  fi
35726
35727
35728  if test "$MEMORY_SIZE" -gt "2500"; then
35729
35730  $ECHO "Check if jvm arg is ok: -d64" >&5
35731  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35732  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35733  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35734  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35735  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35736    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35737    JVM_ARG_OK=true
35738  else
35739    $ECHO "Arg failed:" >&5
35740    $ECHO "$OUTPUT" >&5
35741    JVM_ARG_OK=false
35742  fi
35743
35744    if test "$JVM_ARG_OK" = true; then
35745      JVM_64BIT=true
35746      JVM_ARG_OK=false
35747    fi
35748  fi
35749
35750  if test "$JVM_64BIT" = true; then
35751    if test "$MEMORY_SIZE" -gt "17000"; then
35752
35753  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35754  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35755  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35756  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35757  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35758  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35759    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35760    JVM_ARG_OK=true
35761  else
35762    $ECHO "Arg failed:" >&5
35763    $ECHO "$OUTPUT" >&5
35764    JVM_ARG_OK=false
35765  fi
35766
35767    fi
35768    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35769
35770  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35771  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35772  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35773  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35774  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35775  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35776    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35777    JVM_ARG_OK=true
35778  else
35779    $ECHO "Arg failed:" >&5
35780    $ECHO "$OUTPUT" >&5
35781    JVM_ARG_OK=false
35782  fi
35783
35784    fi
35785    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35786
35787  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35788  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35789  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35790  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35791  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35792  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35793    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35794    JVM_ARG_OK=true
35795  else
35796    $ECHO "Arg failed:" >&5
35797    $ECHO "$OUTPUT" >&5
35798    JVM_ARG_OK=false
35799  fi
35800
35801    fi
35802    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35803
35804  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35805  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35806  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35807  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35808  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35809  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35810    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35811    JVM_ARG_OK=true
35812  else
35813    $ECHO "Arg failed:" >&5
35814    $ECHO "$OUTPUT" >&5
35815    JVM_ARG_OK=false
35816  fi
35817
35818    fi
35819  fi
35820  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35821
35822  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35823  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35824  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35825  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35826  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35827  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35828    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35829    JVM_ARG_OK=true
35830  else
35831    $ECHO "Arg failed:" >&5
35832    $ECHO "$OUTPUT" >&5
35833    JVM_ARG_OK=false
35834  fi
35835
35836  fi
35837  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35838
35839  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35840  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35841  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35842  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35843  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35844  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35845    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35846    JVM_ARG_OK=true
35847  else
35848    $ECHO "Arg failed:" >&5
35849    $ECHO "$OUTPUT" >&5
35850    JVM_ARG_OK=false
35851  fi
35852
35853  fi
35854  if test "$JVM_ARG_OK" = false; then
35855
35856  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35857  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35858  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35859  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35860  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35861  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35862    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35863    JVM_ARG_OK=true
35864  else
35865    $ECHO "Arg failed:" >&5
35866    $ECHO "$OUTPUT" >&5
35867    JVM_ARG_OK=false
35868  fi
35869
35870  fi
35871
35872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35873$as_echo_n "checking whether to use sjavac... " >&6; }
35874  # Check whether --enable-sjavac was given.
35875if test "${enable_sjavac+set}" = set; then :
35876  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35877else
35878  ENABLE_SJAVAC='no'
35879fi
35880
35881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
35882$as_echo "$ENABLE_SJAVAC" >&6; }
35883
35884
35885  if test "x$ENABLE_SJAVAC" = xyes; then
35886    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
35887  else
35888    SJAVAC_SERVER_DIR=
35889  fi
35890
35891
35892
35893# Can the C/C++ compiler use precompiled headers?
35894
35895
35896  ###############################################################################
35897  #
35898  # Can the C/C++ compiler use precompiled headers?
35899  #
35900  # Check whether --enable-precompiled-headers was given.
35901if test "${enable_precompiled_headers+set}" = set; then :
35902  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
35903else
35904  ENABLE_PRECOMPH=yes
35905fi
35906
35907
35908  USE_PRECOMPILED_HEADER=1
35909  if test "x$ENABLE_PRECOMPH" = xno; then
35910    USE_PRECOMPILED_HEADER=0
35911  fi
35912
35913  if test "x$ENABLE_PRECOMPH" = xyes; then
35914    # Check that the compiler actually supports precomp headers.
35915    if test "x$GCC" = xyes; then
35916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
35917$as_echo_n "checking that precompiled headers work... " >&6; }
35918      echo "int alfa();" > conftest.h
35919      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
35920      if test ! -f conftest.hpp.gch; then
35921        USE_PRECOMPILED_HEADER=0
35922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35923$as_echo "no" >&6; }
35924      else
35925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35926$as_echo "yes" >&6; }
35927      fi
35928      rm -f conftest.h conftest.hpp.gch
35929    fi
35930  fi
35931
35932
35933
35934
35935# Setup use of ccache, if available
35936
35937  # Check whether --enable-ccache was given.
35938if test "${enable_ccache+set}" = set; then :
35939  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
35940else
35941  ENABLE_CCACHE=yes
35942fi
35943
35944  if test "x$ENABLE_CCACHE" = xyes; then
35945    OLD_PATH="$PATH"
35946    if test "x$TOOLS_DIR" != x; then
35947      PATH=$TOOLS_DIR:$PATH
35948    fi
35949    # Extract the first word of "ccache", so it can be a program name with args.
35950set dummy ccache; ac_word=$2
35951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35952$as_echo_n "checking for $ac_word... " >&6; }
35953if ${ac_cv_path_CCACHE+:} false; then :
35954  $as_echo_n "(cached) " >&6
35955else
35956  case $CCACHE in
35957  [\\/]* | ?:[\\/]*)
35958  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
35959  ;;
35960  *)
35961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35962for as_dir in $PATH
35963do
35964  IFS=$as_save_IFS
35965  test -z "$as_dir" && as_dir=.
35966    for ac_exec_ext in '' $ac_executable_extensions; do
35967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35968    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
35969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35970    break 2
35971  fi
35972done
35973  done
35974IFS=$as_save_IFS
35975
35976  ;;
35977esac
35978fi
35979CCACHE=$ac_cv_path_CCACHE
35980if test -n "$CCACHE"; then
35981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
35982$as_echo "$CCACHE" >&6; }
35983else
35984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35985$as_echo "no" >&6; }
35986fi
35987
35988
35989    PATH="$OLD_PATH"
35990  else
35991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
35992$as_echo_n "checking for ccache... " >&6; }
35993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
35994$as_echo "explicitly disabled" >&6; }
35995    CCACHE=
35996  fi
35997
35998
35999
36000# Check whether --with-ccache-dir was given.
36001if test "${with_ccache_dir+set}" = set; then :
36002  withval=$with_ccache_dir;
36003fi
36004
36005
36006  if test "x$with_ccache_dir" != x; then
36007    # When using a non home ccache directory, assume the use is to share ccache files
36008    # with other users. Thus change the umask.
36009    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36010  fi
36011  CCACHE_FOUND=""
36012  if test "x$CCACHE" != x; then
36013
36014  if test "x$CCACHE" != x; then
36015    CCACHE_FOUND="true"
36016    # Only use ccache if it is 3.1.4 or later, which supports
36017    # precompiled headers.
36018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36019$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36020    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36021    if test "x$HAS_GOOD_CCACHE" = x; then
36022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36023$as_echo "no, disabling ccache" >&6; }
36024      CCACHE=
36025    else
36026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36027$as_echo "yes" >&6; }
36028      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36029$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36030      PUSHED_FLAGS="$CXXFLAGS"
36031      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36032      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36033/* end confdefs.h.  */
36034
36035int
36036main ()
36037{
36038
36039  ;
36040  return 0;
36041}
36042_ACEOF
36043if ac_fn_cxx_try_compile "$LINENO"; then :
36044  CC_KNOWS_CCACHE_TRICK=yes
36045else
36046  CC_KNOWS_CCACHE_TRICK=no
36047fi
36048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36049      CXXFLAGS="$PUSHED_FLAGS"
36050      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36052$as_echo "yes" >&6; }
36053      else
36054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36055$as_echo "no, disabling ccaching of precompiled headers" >&6; }
36056        CCACHE=
36057      fi
36058    fi
36059  fi
36060
36061  if test "x$CCACHE" != x; then
36062    CCACHE_SLOPPINESS=time_macros
36063    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36064    CCACHE_FLAGS=-fpch-preprocess
36065
36066    if test "x$SET_CCACHE_DIR" != x; then
36067      mkdir -p $CCACHE_DIR > /dev/null 2>&1
36068      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36069    fi
36070  fi
36071
36072  fi
36073
36074
36075###############################################################################
36076#
36077# And now the finish...
36078#
36079###############################################################################
36080
36081# Check for some common pitfalls
36082
36083  if test x"$OPENJDK_BUILD_OS" = xwindows; then
36084    file_to_test="$SRC_ROOT/LICENSE"
36085    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36086      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
36087    fi
36088  fi
36089
36090
36091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36092$as_echo_n "checking if build directory is on local disk... " >&6; }
36093
36094  # df -l lists only local disks; if the given directory is not found then
36095  # a non-zero exit code is given
36096  if test "x$DF" = x; then
36097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36098      # msys does not have df; use Windows "net use" instead.
36099      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36100      if test "x$IS_NETWORK_DISK" = x; then
36101        OUTPUT_DIR_IS_LOCAL="yes"
36102      else
36103        OUTPUT_DIR_IS_LOCAL="no"
36104      fi
36105    else
36106      # No df here, say it's local
36107      OUTPUT_DIR_IS_LOCAL="yes"
36108    fi
36109  else
36110    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36111      OUTPUT_DIR_IS_LOCAL="yes"
36112    else
36113      OUTPUT_DIR_IS_LOCAL="no"
36114    fi
36115  fi
36116
36117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36118$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36119
36120
36121
36122  # Check if the user has any old-style ALT_ variables set.
36123  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36124
36125  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36126  # Since we can't properly handle the dependencies for this, warn the user about the situation
36127  if test -e $OUTPUT_ROOT/spec.gmk; then
36128    IS_RECONFIGURE=yes
36129  else
36130    IS_RECONFIGURE=no
36131  fi
36132
36133  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36134    HIDE_PERFORMANCE_HINTS=yes
36135  else
36136    HIDE_PERFORMANCE_HINTS=no
36137    # Hide it the next time around...
36138    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36139  fi
36140
36141
36142# At the end, call the custom hook. (Dummy macro if no custom sources available)
36143
36144
36145# We're messing a bit with internal autoconf variables to put the config.status
36146# in the output directory instead of the current directory.
36147CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36148
36149# Create the actual output files. Now the main work of configure is done.
36150cat >confcache <<\_ACEOF
36151# This file is a shell script that caches the results of configure
36152# tests run on this system so they can be shared between configure
36153# scripts and configure runs, see configure's option --config-cache.
36154# It is not useful on other systems.  If it contains results you don't
36155# want to keep, you may remove or edit it.
36156#
36157# config.status only pays attention to the cache file if you give it
36158# the --recheck option to rerun configure.
36159#
36160# `ac_cv_env_foo' variables (set or unset) will be overridden when
36161# loading this file, other *unset* `ac_cv_foo' will be assigned the
36162# following values.
36163
36164_ACEOF
36165
36166# The following way of writing the cache mishandles newlines in values,
36167# but we know of no workaround that is simple, portable, and efficient.
36168# So, we kill variables containing newlines.
36169# Ultrix sh set writes to stderr and can't be redirected directly,
36170# and sets the high bit in the cache file unless we assign to the vars.
36171(
36172  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36173    eval ac_val=\$$ac_var
36174    case $ac_val in #(
36175    *${as_nl}*)
36176      case $ac_var in #(
36177      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36178$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36179      esac
36180      case $ac_var in #(
36181      _ | IFS | as_nl) ;; #(
36182      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36183      *) { eval $ac_var=; unset $ac_var;} ;;
36184      esac ;;
36185    esac
36186  done
36187
36188  (set) 2>&1 |
36189    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36190    *${as_nl}ac_space=\ *)
36191      # `set' does not quote correctly, so add quotes: double-quote
36192      # substitution turns \\\\ into \\, and sed turns \\ into \.
36193      sed -n \
36194	"s/'/'\\\\''/g;
36195	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36196      ;; #(
36197    *)
36198      # `set' quotes correctly as required by POSIX, so do not add quotes.
36199      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36200      ;;
36201    esac |
36202    sort
36203) |
36204  sed '
36205     /^ac_cv_env_/b end
36206     t clear
36207     :clear
36208     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36209     t end
36210     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36211     :end' >>confcache
36212if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36213  if test -w "$cache_file"; then
36214    if test "x$cache_file" != "x/dev/null"; then
36215      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36216$as_echo "$as_me: updating cache $cache_file" >&6;}
36217      if test ! -f "$cache_file" || test -h "$cache_file"; then
36218	cat confcache >"$cache_file"
36219      else
36220        case $cache_file in #(
36221        */* | ?:*)
36222	  mv -f confcache "$cache_file"$$ &&
36223	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36224        *)
36225	  mv -f confcache "$cache_file" ;;
36226	esac
36227      fi
36228    fi
36229  else
36230    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36231$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36232  fi
36233fi
36234rm -f confcache
36235
36236test "x$prefix" = xNONE && prefix=$ac_default_prefix
36237# Let make expand exec_prefix.
36238test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36239
36240DEFS=-DHAVE_CONFIG_H
36241
36242ac_libobjs=
36243ac_ltlibobjs=
36244U=
36245for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36246  # 1. Remove the extension, and $U if already installed.
36247  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36248  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36249  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36250  #    will be set to the directory where LIBOBJS objects are built.
36251  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36252  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36253done
36254LIBOBJS=$ac_libobjs
36255
36256LTLIBOBJS=$ac_ltlibobjs
36257
36258
36259
36260: "${CONFIG_STATUS=./config.status}"
36261ac_write_fail=0
36262ac_clean_files_save=$ac_clean_files
36263ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36264{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36265$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36266as_write_fail=0
36267cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36268#! $SHELL
36269# Generated by $as_me.
36270# Run this file to recreate the current configuration.
36271# Compiler output produced by configure, useful for debugging
36272# configure, is in config.log if it exists.
36273
36274debug=false
36275ac_cs_recheck=false
36276ac_cs_silent=false
36277
36278SHELL=\${CONFIG_SHELL-$SHELL}
36279export SHELL
36280_ASEOF
36281cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36282## -------------------- ##
36283## M4sh Initialization. ##
36284## -------------------- ##
36285
36286# Be more Bourne compatible
36287DUALCASE=1; export DUALCASE # for MKS sh
36288if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36289  emulate sh
36290  NULLCMD=:
36291  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36292  # is contrary to our usage.  Disable this feature.
36293  alias -g '${1+"$@"}'='"$@"'
36294  setopt NO_GLOB_SUBST
36295else
36296  case `(set -o) 2>/dev/null` in #(
36297  *posix*) :
36298    set -o posix ;; #(
36299  *) :
36300     ;;
36301esac
36302fi
36303
36304
36305as_nl='
36306'
36307export as_nl
36308# Printing a long string crashes Solaris 7 /usr/bin/printf.
36309as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36310as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36311as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36312# Prefer a ksh shell builtin over an external printf program on Solaris,
36313# but without wasting forks for bash or zsh.
36314if test -z "$BASH_VERSION$ZSH_VERSION" \
36315    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36316  as_echo='print -r --'
36317  as_echo_n='print -rn --'
36318elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36319  as_echo='printf %s\n'
36320  as_echo_n='printf %s'
36321else
36322  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36323    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36324    as_echo_n='/usr/ucb/echo -n'
36325  else
36326    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36327    as_echo_n_body='eval
36328      arg=$1;
36329      case $arg in #(
36330      *"$as_nl"*)
36331	expr "X$arg" : "X\\(.*\\)$as_nl";
36332	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36333      esac;
36334      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36335    '
36336    export as_echo_n_body
36337    as_echo_n='sh -c $as_echo_n_body as_echo'
36338  fi
36339  export as_echo_body
36340  as_echo='sh -c $as_echo_body as_echo'
36341fi
36342
36343# The user is always right.
36344if test "${PATH_SEPARATOR+set}" != set; then
36345  PATH_SEPARATOR=:
36346  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36347    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36348      PATH_SEPARATOR=';'
36349  }
36350fi
36351
36352
36353# IFS
36354# We need space, tab and new line, in precisely that order.  Quoting is
36355# there to prevent editors from complaining about space-tab.
36356# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36357# splitting by setting IFS to empty value.)
36358IFS=" ""	$as_nl"
36359
36360# Find who we are.  Look in the path if we contain no directory separator.
36361as_myself=
36362case $0 in #((
36363  *[\\/]* ) as_myself=$0 ;;
36364  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36365for as_dir in $PATH
36366do
36367  IFS=$as_save_IFS
36368  test -z "$as_dir" && as_dir=.
36369    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36370  done
36371IFS=$as_save_IFS
36372
36373     ;;
36374esac
36375# We did not find ourselves, most probably we were run as `sh COMMAND'
36376# in which case we are not to be found in the path.
36377if test "x$as_myself" = x; then
36378  as_myself=$0
36379fi
36380if test ! -f "$as_myself"; then
36381  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36382  exit 1
36383fi
36384
36385# Unset variables that we do not need and which cause bugs (e.g. in
36386# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36387# suppresses any "Segmentation fault" message there.  '((' could
36388# trigger a bug in pdksh 5.2.14.
36389for as_var in BASH_ENV ENV MAIL MAILPATH
36390do eval test x\${$as_var+set} = xset \
36391  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36392done
36393PS1='$ '
36394PS2='> '
36395PS4='+ '
36396
36397# NLS nuisances.
36398LC_ALL=C
36399export LC_ALL
36400LANGUAGE=C
36401export LANGUAGE
36402
36403# CDPATH.
36404(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36405
36406
36407# as_fn_error STATUS ERROR [LINENO LOG_FD]
36408# ----------------------------------------
36409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36411# script with STATUS, using 1 if that was 0.
36412as_fn_error ()
36413{
36414  as_status=$1; test $as_status -eq 0 && as_status=1
36415  if test "$4"; then
36416    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36417    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36418  fi
36419  $as_echo "$as_me: error: $2" >&2
36420  as_fn_exit $as_status
36421} # as_fn_error
36422
36423
36424# as_fn_set_status STATUS
36425# -----------------------
36426# Set $? to STATUS, without forking.
36427as_fn_set_status ()
36428{
36429  return $1
36430} # as_fn_set_status
36431
36432# as_fn_exit STATUS
36433# -----------------
36434# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36435as_fn_exit ()
36436{
36437  set +e
36438  as_fn_set_status $1
36439  exit $1
36440} # as_fn_exit
36441
36442# as_fn_unset VAR
36443# ---------------
36444# Portably unset VAR.
36445as_fn_unset ()
36446{
36447  { eval $1=; unset $1;}
36448}
36449as_unset=as_fn_unset
36450# as_fn_append VAR VALUE
36451# ----------------------
36452# Append the text in VALUE to the end of the definition contained in VAR. Take
36453# advantage of any shell optimizations that allow amortized linear growth over
36454# repeated appends, instead of the typical quadratic growth present in naive
36455# implementations.
36456if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36457  eval 'as_fn_append ()
36458  {
36459    eval $1+=\$2
36460  }'
36461else
36462  as_fn_append ()
36463  {
36464    eval $1=\$$1\$2
36465  }
36466fi # as_fn_append
36467
36468# as_fn_arith ARG...
36469# ------------------
36470# Perform arithmetic evaluation on the ARGs, and store the result in the
36471# global $as_val. Take advantage of shells that can avoid forks. The arguments
36472# must be portable across $(()) and expr.
36473if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36474  eval 'as_fn_arith ()
36475  {
36476    as_val=$(( $* ))
36477  }'
36478else
36479  as_fn_arith ()
36480  {
36481    as_val=`expr "$@" || test $? -eq 1`
36482  }
36483fi # as_fn_arith
36484
36485
36486if expr a : '\(a\)' >/dev/null 2>&1 &&
36487   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36488  as_expr=expr
36489else
36490  as_expr=false
36491fi
36492
36493if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36494  as_basename=basename
36495else
36496  as_basename=false
36497fi
36498
36499if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36500  as_dirname=dirname
36501else
36502  as_dirname=false
36503fi
36504
36505as_me=`$as_basename -- "$0" ||
36506$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36507	 X"$0" : 'X\(//\)$' \| \
36508	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36509$as_echo X/"$0" |
36510    sed '/^.*\/\([^/][^/]*\)\/*$/{
36511	    s//\1/
36512	    q
36513	  }
36514	  /^X\/\(\/\/\)$/{
36515	    s//\1/
36516	    q
36517	  }
36518	  /^X\/\(\/\).*/{
36519	    s//\1/
36520	    q
36521	  }
36522	  s/.*/./; q'`
36523
36524# Avoid depending upon Character Ranges.
36525as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36526as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36527as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36528as_cr_digits='0123456789'
36529as_cr_alnum=$as_cr_Letters$as_cr_digits
36530
36531ECHO_C= ECHO_N= ECHO_T=
36532case `echo -n x` in #(((((
36533-n*)
36534  case `echo 'xy\c'` in
36535  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36536  xy)  ECHO_C='\c';;
36537  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36538       ECHO_T='	';;
36539  esac;;
36540*)
36541  ECHO_N='-n';;
36542esac
36543
36544rm -f conf$$ conf$$.exe conf$$.file
36545if test -d conf$$.dir; then
36546  rm -f conf$$.dir/conf$$.file
36547else
36548  rm -f conf$$.dir
36549  mkdir conf$$.dir 2>/dev/null
36550fi
36551if (echo >conf$$.file) 2>/dev/null; then
36552  if ln -s conf$$.file conf$$ 2>/dev/null; then
36553    as_ln_s='ln -s'
36554    # ... but there are two gotchas:
36555    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36556    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36557    # In both cases, we have to default to `cp -pR'.
36558    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36559      as_ln_s='cp -pR'
36560  elif ln conf$$.file conf$$ 2>/dev/null; then
36561    as_ln_s=ln
36562  else
36563    as_ln_s='cp -pR'
36564  fi
36565else
36566  as_ln_s='cp -pR'
36567fi
36568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36569rmdir conf$$.dir 2>/dev/null
36570
36571
36572# as_fn_mkdir_p
36573# -------------
36574# Create "$as_dir" as a directory, including parents if necessary.
36575as_fn_mkdir_p ()
36576{
36577
36578  case $as_dir in #(
36579  -*) as_dir=./$as_dir;;
36580  esac
36581  test -d "$as_dir" || eval $as_mkdir_p || {
36582    as_dirs=
36583    while :; do
36584      case $as_dir in #(
36585      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36586      *) as_qdir=$as_dir;;
36587      esac
36588      as_dirs="'$as_qdir' $as_dirs"
36589      as_dir=`$as_dirname -- "$as_dir" ||
36590$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36591	 X"$as_dir" : 'X\(//\)[^/]' \| \
36592	 X"$as_dir" : 'X\(//\)$' \| \
36593	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36594$as_echo X"$as_dir" |
36595    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36596	    s//\1/
36597	    q
36598	  }
36599	  /^X\(\/\/\)[^/].*/{
36600	    s//\1/
36601	    q
36602	  }
36603	  /^X\(\/\/\)$/{
36604	    s//\1/
36605	    q
36606	  }
36607	  /^X\(\/\).*/{
36608	    s//\1/
36609	    q
36610	  }
36611	  s/.*/./; q'`
36612      test -d "$as_dir" && break
36613    done
36614    test -z "$as_dirs" || eval "mkdir $as_dirs"
36615  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36616
36617
36618} # as_fn_mkdir_p
36619if mkdir -p . 2>/dev/null; then
36620  as_mkdir_p='mkdir -p "$as_dir"'
36621else
36622  test -d ./-p && rmdir ./-p
36623  as_mkdir_p=false
36624fi
36625
36626
36627# as_fn_executable_p FILE
36628# -----------------------
36629# Test if FILE is an executable regular file.
36630as_fn_executable_p ()
36631{
36632  test -f "$1" && test -x "$1"
36633} # as_fn_executable_p
36634as_test_x='test -x'
36635as_executable_p=as_fn_executable_p
36636
36637# Sed expression to map a string onto a valid CPP name.
36638as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36639
36640# Sed expression to map a string onto a valid variable name.
36641as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36642
36643
36644exec 6>&1
36645## ----------------------------------- ##
36646## Main body of $CONFIG_STATUS script. ##
36647## ----------------------------------- ##
36648_ASEOF
36649test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36650
36651cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36652# Save the log message, to keep $0 and so on meaningful, and to
36653# report actual input values of CONFIG_FILES etc. instead of their
36654# values after options handling.
36655ac_log="
36656This file was extended by OpenJDK $as_me jdk8, which was
36657generated by GNU Autoconf 2.69.  Invocation command line was
36658
36659  CONFIG_FILES    = $CONFIG_FILES
36660  CONFIG_HEADERS  = $CONFIG_HEADERS
36661  CONFIG_LINKS    = $CONFIG_LINKS
36662  CONFIG_COMMANDS = $CONFIG_COMMANDS
36663  $ $0 $@
36664
36665on `(hostname || uname -n) 2>/dev/null | sed 1q`
36666"
36667
36668_ACEOF
36669
36670case $ac_config_files in *"
36671"*) set x $ac_config_files; shift; ac_config_files=$*;;
36672esac
36673
36674case $ac_config_headers in *"
36675"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36676esac
36677
36678
36679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36680# Files that config.status was made for.
36681config_files="$ac_config_files"
36682config_headers="$ac_config_headers"
36683
36684_ACEOF
36685
36686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36687ac_cs_usage="\
36688\`$as_me' instantiates files and other configuration actions
36689from templates according to the current configuration.  Unless the files
36690and actions are specified as TAGs, all are instantiated by default.
36691
36692Usage: $0 [OPTION]... [TAG]...
36693
36694  -h, --help       print this help, then exit
36695  -V, --version    print version number and configuration settings, then exit
36696      --config     print configuration, then exit
36697  -q, --quiet, --silent
36698                   do not print progress messages
36699  -d, --debug      don't remove temporary files
36700      --recheck    update $as_me by reconfiguring in the same conditions
36701      --file=FILE[:TEMPLATE]
36702                   instantiate the configuration file FILE
36703      --header=FILE[:TEMPLATE]
36704                   instantiate the configuration header FILE
36705
36706Configuration files:
36707$config_files
36708
36709Configuration headers:
36710$config_headers
36711
36712Report bugs to <build-dev@openjdk.java.net>.
36713OpenJDK home page: <http://openjdk.java.net>."
36714
36715_ACEOF
36716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36717ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36718ac_cs_version="\\
36719OpenJDK config.status jdk8
36720configured by $0, generated by GNU Autoconf 2.69,
36721  with options \\"\$ac_cs_config\\"
36722
36723Copyright (C) 2012 Free Software Foundation, Inc.
36724This config.status script is free software; the Free Software Foundation
36725gives unlimited permission to copy, distribute and modify it."
36726
36727ac_pwd='$ac_pwd'
36728srcdir='$srcdir'
36729AWK='$AWK'
36730test -n "\$AWK" || AWK=awk
36731_ACEOF
36732
36733cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36734# The default lists apply if the user does not specify any file.
36735ac_need_defaults=:
36736while test $# != 0
36737do
36738  case $1 in
36739  --*=?*)
36740    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36741    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36742    ac_shift=:
36743    ;;
36744  --*=)
36745    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36746    ac_optarg=
36747    ac_shift=:
36748    ;;
36749  *)
36750    ac_option=$1
36751    ac_optarg=$2
36752    ac_shift=shift
36753    ;;
36754  esac
36755
36756  case $ac_option in
36757  # Handling of the options.
36758  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36759    ac_cs_recheck=: ;;
36760  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36761    $as_echo "$ac_cs_version"; exit ;;
36762  --config | --confi | --conf | --con | --co | --c )
36763    $as_echo "$ac_cs_config"; exit ;;
36764  --debug | --debu | --deb | --de | --d | -d )
36765    debug=: ;;
36766  --file | --fil | --fi | --f )
36767    $ac_shift
36768    case $ac_optarg in
36769    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36770    '') as_fn_error $? "missing file argument" ;;
36771    esac
36772    as_fn_append CONFIG_FILES " '$ac_optarg'"
36773    ac_need_defaults=false;;
36774  --header | --heade | --head | --hea )
36775    $ac_shift
36776    case $ac_optarg in
36777    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36778    esac
36779    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36780    ac_need_defaults=false;;
36781  --he | --h)
36782    # Conflict between --help and --header
36783    as_fn_error $? "ambiguous option: \`$1'
36784Try \`$0 --help' for more information.";;
36785  --help | --hel | -h )
36786    $as_echo "$ac_cs_usage"; exit ;;
36787  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36788  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36789    ac_cs_silent=: ;;
36790
36791  # This is an error.
36792  -*) as_fn_error $? "unrecognized option: \`$1'
36793Try \`$0 --help' for more information." ;;
36794
36795  *) as_fn_append ac_config_targets " $1"
36796     ac_need_defaults=false ;;
36797
36798  esac
36799  shift
36800done
36801
36802ac_configure_extra_args=
36803
36804if $ac_cs_silent; then
36805  exec 6>/dev/null
36806  ac_configure_extra_args="$ac_configure_extra_args --silent"
36807fi
36808
36809_ACEOF
36810cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36811if \$ac_cs_recheck; then
36812  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36813  shift
36814  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36815  CONFIG_SHELL='$SHELL'
36816  export CONFIG_SHELL
36817  exec "\$@"
36818fi
36819
36820_ACEOF
36821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36822exec 5>>config.log
36823{
36824  echo
36825  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36826## Running $as_me. ##
36827_ASBOX
36828  $as_echo "$ac_log"
36829} >&5
36830
36831_ACEOF
36832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36833_ACEOF
36834
36835cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36836
36837# Handling of arguments.
36838for ac_config_target in $ac_config_targets
36839do
36840  case $ac_config_target in
36841    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36842    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36843    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36844    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36845    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36846    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36847    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36848
36849  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36850  esac
36851done
36852
36853
36854# If the user did not use the arguments to specify the items to instantiate,
36855# then the envvar interface is used.  Set only those that are not.
36856# We use the long form for the default assignment because of an extremely
36857# bizarre bug on SunOS 4.1.3.
36858if $ac_need_defaults; then
36859  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36860  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36861fi
36862
36863# Have a temporary directory for convenience.  Make it in the build tree
36864# simply because there is no reason against having it here, and in addition,
36865# creating and moving files from /tmp can sometimes cause problems.
36866# Hook for its removal unless debugging.
36867# Note that there is a small window in which the directory will not be cleaned:
36868# after its creation but before its name has been assigned to `$tmp'.
36869$debug ||
36870{
36871  tmp= ac_tmp=
36872  trap 'exit_status=$?
36873  : "${ac_tmp:=$tmp}"
36874  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36875' 0
36876  trap 'as_fn_exit 1' 1 2 13 15
36877}
36878# Create a (secure) tmp directory for tmp files.
36879
36880{
36881  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36882  test -d "$tmp"
36883}  ||
36884{
36885  tmp=./conf$$-$RANDOM
36886  (umask 077 && mkdir "$tmp")
36887} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36888ac_tmp=$tmp
36889
36890# Set up the scripts for CONFIG_FILES section.
36891# No need to generate them if there are no CONFIG_FILES.
36892# This happens for instance with `./config.status config.h'.
36893if test -n "$CONFIG_FILES"; then
36894
36895
36896ac_cr=`echo X | tr X '\015'`
36897# On cygwin, bash can eat \r inside `` if the user requested igncr.
36898# But we know of no other shell where ac_cr would be empty at this
36899# point, so we can use a bashism as a fallback.
36900if test "x$ac_cr" = x; then
36901  eval ac_cr=\$\'\\r\'
36902fi
36903ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36904if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36905  ac_cs_awk_cr='\\r'
36906else
36907  ac_cs_awk_cr=$ac_cr
36908fi
36909
36910echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36911_ACEOF
36912
36913
36914{
36915  echo "cat >conf$$subs.awk <<_ACEOF" &&
36916  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36917  echo "_ACEOF"
36918} >conf$$subs.sh ||
36919  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36920ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36921ac_delim='%!_!# '
36922for ac_last_try in false false false false false :; do
36923  . ./conf$$subs.sh ||
36924    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36925
36926  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36927  if test $ac_delim_n = $ac_delim_num; then
36928    break
36929  elif $ac_last_try; then
36930    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36931  else
36932    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36933  fi
36934done
36935rm -f conf$$subs.sh
36936
36937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36938cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36939_ACEOF
36940sed -n '
36941h
36942s/^/S["/; s/!.*/"]=/
36943p
36944g
36945s/^[^!]*!//
36946:repl
36947t repl
36948s/'"$ac_delim"'$//
36949t delim
36950:nl
36951h
36952s/\(.\{148\}\)..*/\1/
36953t more1
36954s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36955p
36956n
36957b repl
36958:more1
36959s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36960p
36961g
36962s/.\{148\}//
36963t nl
36964:delim
36965h
36966s/\(.\{148\}\)..*/\1/
36967t more2
36968s/["\\]/\\&/g; s/^/"/; s/$/"/
36969p
36970b
36971:more2
36972s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36973p
36974g
36975s/.\{148\}//
36976t delim
36977' <conf$$subs.awk | sed '
36978/^[^""]/{
36979  N
36980  s/\n//
36981}
36982' >>$CONFIG_STATUS || ac_write_fail=1
36983rm -f conf$$subs.awk
36984cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36985_ACAWK
36986cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36987  for (key in S) S_is_set[key] = 1
36988  FS = ""
36989
36990}
36991{
36992  line = $ 0
36993  nfields = split(line, field, "@")
36994  substed = 0
36995  len = length(field[1])
36996  for (i = 2; i < nfields; i++) {
36997    key = field[i]
36998    keylen = length(key)
36999    if (S_is_set[key]) {
37000      value = S[key]
37001      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37002      len += length(value) + length(field[++i])
37003      substed = 1
37004    } else
37005      len += 1 + keylen
37006  }
37007
37008  print line
37009}
37010
37011_ACAWK
37012_ACEOF
37013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37014if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37015  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37016else
37017  cat
37018fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37019  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37020_ACEOF
37021
37022# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37023# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37024# trailing colons and then remove the whole line if VPATH becomes empty
37025# (actually we leave an empty line to preserve line numbers).
37026if test "x$srcdir" = x.; then
37027  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
37028h
37029s///
37030s/^/:/
37031s/[	 ]*$/:/
37032s/:\$(srcdir):/:/g
37033s/:\${srcdir}:/:/g
37034s/:@srcdir@:/:/g
37035s/^:*//
37036s/:*$//
37037x
37038s/\(=[	 ]*\).*/\1/
37039G
37040s/\n//
37041s/^[^=]*=[	 ]*$//
37042}'
37043fi
37044
37045cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37046fi # test -n "$CONFIG_FILES"
37047
37048# Set up the scripts for CONFIG_HEADERS section.
37049# No need to generate them if there are no CONFIG_HEADERS.
37050# This happens for instance with `./config.status Makefile'.
37051if test -n "$CONFIG_HEADERS"; then
37052cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37053BEGIN {
37054_ACEOF
37055
37056# Transform confdefs.h into an awk script `defines.awk', embedded as
37057# here-document in config.status, that substitutes the proper values into
37058# config.h.in to produce config.h.
37059
37060# Create a delimiter string that does not exist in confdefs.h, to ease
37061# handling of long lines.
37062ac_delim='%!_!# '
37063for ac_last_try in false false :; do
37064  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37065  if test -z "$ac_tt"; then
37066    break
37067  elif $ac_last_try; then
37068    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37069  else
37070    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37071  fi
37072done
37073
37074# For the awk script, D is an array of macro values keyed by name,
37075# likewise P contains macro parameters if any.  Preserve backslash
37076# newline sequences.
37077
37078ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37079sed -n '
37080s/.\{148\}/&'"$ac_delim"'/g
37081t rset
37082:rset
37083s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
37084t def
37085d
37086:def
37087s/\\$//
37088t bsnl
37089s/["\\]/\\&/g
37090s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37091D["\1"]=" \3"/p
37092s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
37093d
37094:bsnl
37095s/["\\]/\\&/g
37096s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37097D["\1"]=" \3\\\\\\n"\\/p
37098t cont
37099s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37100t cont
37101d
37102:cont
37103n
37104s/.\{148\}/&'"$ac_delim"'/g
37105t clear
37106:clear
37107s/\\$//
37108t bsnlc
37109s/["\\]/\\&/g; s/^/"/; s/$/"/p
37110d
37111:bsnlc
37112s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37113b cont
37114' <confdefs.h | sed '
37115s/'"$ac_delim"'/"\\\
37116"/g' >>$CONFIG_STATUS || ac_write_fail=1
37117
37118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37119  for (key in D) D_is_set[key] = 1
37120  FS = ""
37121}
37122/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37123  line = \$ 0
37124  split(line, arg, " ")
37125  if (arg[1] == "#") {
37126    defundef = arg[2]
37127    mac1 = arg[3]
37128  } else {
37129    defundef = substr(arg[1], 2)
37130    mac1 = arg[2]
37131  }
37132  split(mac1, mac2, "(") #)
37133  macro = mac2[1]
37134  prefix = substr(line, 1, index(line, defundef) - 1)
37135  if (D_is_set[macro]) {
37136    # Preserve the white space surrounding the "#".
37137    print prefix "define", macro P[macro] D[macro]
37138    next
37139  } else {
37140    # Replace #undef with comments.  This is necessary, for example,
37141    # in the case of _POSIX_SOURCE, which is predefined and required
37142    # on some systems where configure will not decide to define it.
37143    if (defundef == "undef") {
37144      print "/*", prefix defundef, macro, "*/"
37145      next
37146    }
37147  }
37148}
37149{ print }
37150_ACAWK
37151_ACEOF
37152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37153  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37154fi # test -n "$CONFIG_HEADERS"
37155
37156
37157eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37158shift
37159for ac_tag
37160do
37161  case $ac_tag in
37162  :[FHLC]) ac_mode=$ac_tag; continue;;
37163  esac
37164  case $ac_mode$ac_tag in
37165  :[FHL]*:*);;
37166  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37167  :[FH]-) ac_tag=-:-;;
37168  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37169  esac
37170  ac_save_IFS=$IFS
37171  IFS=:
37172  set x $ac_tag
37173  IFS=$ac_save_IFS
37174  shift
37175  ac_file=$1
37176  shift
37177
37178  case $ac_mode in
37179  :L) ac_source=$1;;
37180  :[FH])
37181    ac_file_inputs=
37182    for ac_f
37183    do
37184      case $ac_f in
37185      -) ac_f="$ac_tmp/stdin";;
37186      *) # Look for the file first in the build tree, then in the source tree
37187	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37188	 # because $ac_f cannot contain `:'.
37189	 test -f "$ac_f" ||
37190	   case $ac_f in
37191	   [\\/$]*) false;;
37192	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37193	   esac ||
37194	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37195      esac
37196      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37197      as_fn_append ac_file_inputs " '$ac_f'"
37198    done
37199
37200    # Let's still pretend it is `configure' which instantiates (i.e., don't
37201    # use $as_me), people would be surprised to read:
37202    #    /* config.h.  Generated by config.status.  */
37203    configure_input='Generated from '`
37204	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37205	`' by configure.'
37206    if test x"$ac_file" != x-; then
37207      configure_input="$ac_file.  $configure_input"
37208      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37209$as_echo "$as_me: creating $ac_file" >&6;}
37210    fi
37211    # Neutralize special characters interpreted by sed in replacement strings.
37212    case $configure_input in #(
37213    *\&* | *\|* | *\\* )
37214       ac_sed_conf_input=`$as_echo "$configure_input" |
37215       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37216    *) ac_sed_conf_input=$configure_input;;
37217    esac
37218
37219    case $ac_tag in
37220    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37221      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37222    esac
37223    ;;
37224  esac
37225
37226  ac_dir=`$as_dirname -- "$ac_file" ||
37227$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37228	 X"$ac_file" : 'X\(//\)[^/]' \| \
37229	 X"$ac_file" : 'X\(//\)$' \| \
37230	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37231$as_echo X"$ac_file" |
37232    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37233	    s//\1/
37234	    q
37235	  }
37236	  /^X\(\/\/\)[^/].*/{
37237	    s//\1/
37238	    q
37239	  }
37240	  /^X\(\/\/\)$/{
37241	    s//\1/
37242	    q
37243	  }
37244	  /^X\(\/\).*/{
37245	    s//\1/
37246	    q
37247	  }
37248	  s/.*/./; q'`
37249  as_dir="$ac_dir"; as_fn_mkdir_p
37250  ac_builddir=.
37251
37252case "$ac_dir" in
37253.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37254*)
37255  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37256  # A ".." for each directory in $ac_dir_suffix.
37257  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37258  case $ac_top_builddir_sub in
37259  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37260  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37261  esac ;;
37262esac
37263ac_abs_top_builddir=$ac_pwd
37264ac_abs_builddir=$ac_pwd$ac_dir_suffix
37265# for backward compatibility:
37266ac_top_builddir=$ac_top_build_prefix
37267
37268case $srcdir in
37269  .)  # We are building in place.
37270    ac_srcdir=.
37271    ac_top_srcdir=$ac_top_builddir_sub
37272    ac_abs_top_srcdir=$ac_pwd ;;
37273  [\\/]* | ?:[\\/]* )  # Absolute name.
37274    ac_srcdir=$srcdir$ac_dir_suffix;
37275    ac_top_srcdir=$srcdir
37276    ac_abs_top_srcdir=$srcdir ;;
37277  *) # Relative name.
37278    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37279    ac_top_srcdir=$ac_top_build_prefix$srcdir
37280    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37281esac
37282ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37283
37284
37285  case $ac_mode in
37286  :F)
37287  #
37288  # CONFIG_FILE
37289  #
37290
37291_ACEOF
37292
37293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37294# If the template does not know about datarootdir, expand it.
37295# FIXME: This hack should be removed a few years after 2.60.
37296ac_datarootdir_hack=; ac_datarootdir_seen=
37297ac_sed_dataroot='
37298/datarootdir/ {
37299  p
37300  q
37301}
37302/@datadir@/p
37303/@docdir@/p
37304/@infodir@/p
37305/@localedir@/p
37306/@mandir@/p'
37307case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37308*datarootdir*) ac_datarootdir_seen=yes;;
37309*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37310  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37311$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37312_ACEOF
37313cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37314  ac_datarootdir_hack='
37315  s&@datadir@&$datadir&g
37316  s&@docdir@&$docdir&g
37317  s&@infodir@&$infodir&g
37318  s&@localedir@&$localedir&g
37319  s&@mandir@&$mandir&g
37320  s&\\\${datarootdir}&$datarootdir&g' ;;
37321esac
37322_ACEOF
37323
37324# Neutralize VPATH when `$srcdir' = `.'.
37325# Shell code in configure.ac might set extrasub.
37326# FIXME: do we really want to maintain this feature?
37327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37328ac_sed_extra="$ac_vpsub
37329$extrasub
37330_ACEOF
37331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37332:t
37333/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37334s|@configure_input@|$ac_sed_conf_input|;t t
37335s&@top_builddir@&$ac_top_builddir_sub&;t t
37336s&@top_build_prefix@&$ac_top_build_prefix&;t t
37337s&@srcdir@&$ac_srcdir&;t t
37338s&@abs_srcdir@&$ac_abs_srcdir&;t t
37339s&@top_srcdir@&$ac_top_srcdir&;t t
37340s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37341s&@builddir@&$ac_builddir&;t t
37342s&@abs_builddir@&$ac_abs_builddir&;t t
37343s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37344$ac_datarootdir_hack
37345"
37346eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37347  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37348
37349test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37350  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37351  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37352      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37353  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37354which seems to be undefined.  Please make sure it is defined" >&5
37355$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37356which seems to be undefined.  Please make sure it is defined" >&2;}
37357
37358  rm -f "$ac_tmp/stdin"
37359  case $ac_file in
37360  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37361  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37362  esac \
37363  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37364 ;;
37365  :H)
37366  #
37367  # CONFIG_HEADER
37368  #
37369  if test x"$ac_file" != x-; then
37370    {
37371      $as_echo "/* $configure_input  */" \
37372      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37373    } >"$ac_tmp/config.h" \
37374      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37375    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37376      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37377$as_echo "$as_me: $ac_file is unchanged" >&6;}
37378    else
37379      rm -f "$ac_file"
37380      mv "$ac_tmp/config.h" "$ac_file" \
37381	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37382    fi
37383  else
37384    $as_echo "/* $configure_input  */" \
37385      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37386      || as_fn_error $? "could not create -" "$LINENO" 5
37387  fi
37388 ;;
37389
37390
37391  esac
37392
37393done # for ac_tag
37394
37395
37396as_fn_exit 0
37397_ACEOF
37398ac_clean_files=$ac_clean_files_save
37399
37400test $ac_write_fail = 0 ||
37401  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37402
37403
37404# configure is writing to config.log, and then calls config.status.
37405# config.status does its own redirection, appending to config.log.
37406# Unfortunately, on DOS this fails, as config.log is still kept open
37407# by configure, so config.status won't be able to write to it; its
37408# output is simply discarded.  So we exec the FD to /dev/null,
37409# effectively closing config.log, so it can be properly (re)opened and
37410# appended to by config.status.  When coming back to configure, we
37411# need to make the FD available again.
37412if test "$no_create" != yes; then
37413  ac_cs_success=:
37414  ac_config_status_args=
37415  test "$silent" = yes &&
37416    ac_config_status_args="$ac_config_status_args --quiet"
37417  exec 5>/dev/null
37418  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37419  exec 5>>config.log
37420  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37421  # would make configure fail if this is the last instruction.
37422  $ac_cs_success || as_fn_exit 1
37423fi
37424if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37425  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37426$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37427fi
37428
37429
37430# Try to move the config.log file to the output directory.
37431if test -e ./config.log; then
37432  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37433fi
37434
37435# Make the compare script executable
37436$CHMOD +x $OUTPUT_ROOT/compare.sh
37437
37438# Finally output some useful information to the user
37439
37440  # Finally output some useful information to the user
37441
37442  if test "x$CCACHE_FOUND" != x; then
37443    if  test "x$HAS_GOOD_CCACHE" = x; then
37444      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37445      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37446    else
37447      CCACHE_STATUS="installed and in use"
37448    fi
37449  else
37450    if test "x$GCC" = xyes; then
37451      CCACHE_STATUS="not installed (consider installing)"
37452      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37453    else
37454      CCACHE_STATUS="not available for your system"
37455    fi
37456  fi
37457
37458  printf "\n"
37459  printf "====================================================\n"
37460  printf "A new configuration has been successfully created in\n"
37461  printf "$OUTPUT_ROOT\n"
37462  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37463    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37464  else
37465    printf "using default settings.\n"
37466  fi
37467
37468  printf "\n"
37469  printf "Configuration summary:\n"
37470  printf "* Debug level:    $DEBUG_LEVEL\n"
37471  printf "* JDK variant:    $JDK_VARIANT\n"
37472  printf "* JVM variants:   $with_jvm_variants\n"
37473  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37474
37475  printf "\n"
37476  printf "Tools summary:\n"
37477  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37478    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37479  fi
37480  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37481  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37482  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37483
37484  printf "\n"
37485  printf "Build performance summary:\n"
37486  printf "* Cores to use:   $JOBS\n"
37487  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37488  printf "* ccache status:  $CCACHE_STATUS\n"
37489  printf "\n"
37490
37491  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37492    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37493    printf "$CCACHE_HELP_MSG\n"
37494
37495  # Print a helpful message on how to acquire the necessary build dependency.
37496  # ccache is the help tag: freetype, cups, pulse, alsa etc
37497  MISSING_DEPENDENCY=ccache
37498
37499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37500    cygwin_help $MISSING_DEPENDENCY
37501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37502    msys_help $MISSING_DEPENDENCY
37503  else
37504    PKGHANDLER_COMMAND=
37505
37506    case $PKGHANDLER in
37507      apt-get)
37508        apt_help     $MISSING_DEPENDENCY ;;
37509      yum)
37510        yum_help     $MISSING_DEPENDENCY ;;
37511      port)
37512        port_help    $MISSING_DEPENDENCY ;;
37513      pkgutil)
37514        pkgutil_help $MISSING_DEPENDENCY ;;
37515      pkgadd)
37516        pkgadd_help  $MISSING_DEPENDENCY ;;
37517      * )
37518        break ;;
37519    esac
37520
37521    if test "x$PKGHANDLER_COMMAND" != x; then
37522      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37523    fi
37524  fi
37525
37526    printf "$HELP_MSG\n"
37527    printf "\n"
37528  fi
37529
37530  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37531    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37532    printf "will result in longer build times.\n"
37533    printf "\n"
37534  fi
37535
37536  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37537    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37538    printf "These are not respected, and will be ignored. It is recommended\n"
37539    printf "that you clean your environment. The following variables are set:\n"
37540    printf "$FOUND_ALT_VARIABLES\n"
37541    printf "\n"
37542  fi
37543
37544  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37545    printf "WARNING: Your build output directory is not on a local disk.\n"
37546    printf "This will severely degrade build performance!\n"
37547    printf "It is recommended that you create an output directory on a local disk,\n"
37548    printf "and run the configure script again from that directory.\n"
37549    printf "\n"
37550  fi
37551
37552  if test "x$IS_RECONFIGURE" = "xyes"; then
37553    printf "WARNING: The result of this configuration has overridden an older\n"
37554    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37555    printf "proper build. Failure to do so might result in strange build problems.\n"
37556    printf "\n"
37557  fi
37558
37559