generated-configure.sh revision 951:4967c0f260dd
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
668USING_BROKEN_SUSE_LD
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719MCS
720STRIP
721GNM
722NM
723AS
724CXXCPP
725CPP
726COMPILER_TYPE
727RC_FLAGS
728DUMPBIN
729WINAR
730HOTSPOT_RC
731HOTSPOT_MT
732RC
733MT
734WINLD
735HOTSPOT_LD
736HOTSPOT_CXX
737ARFLAGS
738AR
739LDEXECXX
740LDCXX
741LDEXE
742LD
743ac_ct_OBJC
744OBJCFLAGS
745OBJC
746ac_ct_CXX
747CXXFLAGS
748CXX
749ac_ct_PROPER_COMPILER_CXX
750PROPER_COMPILER_CXX
751POTENTIAL_CXX
752TOOLS_DIR_CXX
753COMPILER_TARGET_BITS_FLAG
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761ac_ct_PROPER_COMPILER_CC
762PROPER_COMPILER_CC
763POTENTIAL_CC
764TOOLS_DIR_CC
765BUILD_LD
766BUILD_CXX
767BUILD_CC
768MSVCR_DLL
769VS_PATH
770VS_LIB
771VS_INCLUDE
772CYGWIN_LINK
773AR_OUT_OPTION
774LD_OUT_OPTION
775EXE_OUT_OPTION
776CC_OUT_OPTION
777BUILD_HOTSPOT
778HOTSPOT_DIST
779BUILD_OUTPUT
780OVERRIDE_SRC_ROOT
781ADD_SRC_ROOT
782JDK_TOPDIR
783NASHORN_TOPDIR
784HOTSPOT_TOPDIR
785JAXWS_TOPDIR
786JAXP_TOPDIR
787CORBA_TOPDIR
788LANGTOOLS_TOPDIR
789BOOT_JDK_JVMARGS
790JAVAC_FLAGS
791BOOT_JDK_SOURCETARGET
792BOOT_JDK
793BOOT_TOOLSJAR
794BOOT_RTJAR
795JAVA_CHECK
796JAVAC_CHECK
797COOKED_BUILD_NUMBER
798JDK_VERSION
799COPYRIGHT_YEAR
800MACOSX_BUNDLE_ID_BASE
801MACOSX_BUNDLE_NAME_BASE
802COMPANY_NAME
803JDK_RC_PLATFORM_NAME
804PRODUCT_SUFFIX
805PRODUCT_NAME
806LAUNCHER_NAME
807MILESTONE
808JDK_BUILD_NUMBER
809JDK_UPDATE_VERSION
810JDK_MICRO_VERSION
811JDK_MINOR_VERSION
812JDK_MAJOR_VERSION
813USER_RELEASE_SUFFIX
814COMPRESS_JARS
815UNLIMITED_CRYPTO
816CACERTS_FILE
817TEST_IN_BUILD
818BUILD_HEADLESS
819SUPPORT_HEADFUL
820SUPPORT_HEADLESS
821BDEPS_FTP
822BDEPS_UNZIP
823OS_VERSION_MICRO
824OS_VERSION_MINOR
825OS_VERSION_MAJOR
826PKG_CONFIG
827CODESIGN
828XATTR
829DSYMUTIL
830IS_GNU_TIME
831TIME
832STAT
833HG
834READELF
835OTOOL
836LDD
837ZIP
838UNZIP
839FIND_DELETE
840MAKE
841CHECK_TOOLSDIR_MAKE
842CHECK_TOOLSDIR_GMAKE
843CHECK_MAKE
844CHECK_GMAKE
845PKGHANDLER
846OUTPUT_ROOT
847CONF_NAME
848SPEC
849BUILD_VARIANT_RELEASE
850DEBUG_CLASSFILES
851FASTDEBUG
852VARIANT
853DEBUG_LEVEL
854MACOSX_UNIVERSAL
855INCLUDE_SA
856JVM_VARIANT_CORE
857JVM_VARIANT_ZEROSHARK
858JVM_VARIANT_ZERO
859JVM_VARIANT_KERNEL
860JVM_VARIANT_MINIMAL1
861JVM_VARIANT_CLIENT
862JVM_VARIANT_SERVER
863JVM_VARIANTS
864JVM_INTERPRETER
865JDK_VARIANT
866SET_OPENJDK
867BUILD_LOG_WRAPPER
868BUILD_LOG_PREVIOUS
869BUILD_LOG
870SYS_ROOT
871PATH_SEP
872SRC_ROOT
873ZERO_ARCHDEF
874DEFINE_CROSS_COMPILE_ARCH
875LP64
876OPENJDK_TARGET_OS_EXPORT_DIR
877OPENJDK_TARGET_OS_API_DIR
878OPENJDK_TARGET_CPU_JLI_CFLAGS
879OPENJDK_TARGET_CPU_OSARCH
880OPENJDK_TARGET_CPU_ISADIR
881OPENJDK_TARGET_CPU_LIBDIR
882OPENJDK_TARGET_CPU_LEGACY_LIB
883OPENJDK_TARGET_CPU_LEGACY
884REQUIRED_OS_VERSION
885REQUIRED_OS_NAME
886COMPILE_TYPE
887OPENJDK_TARGET_CPU_ENDIAN
888OPENJDK_TARGET_CPU_BITS
889OPENJDK_TARGET_CPU_ARCH
890OPENJDK_TARGET_CPU
891OPENJDK_TARGET_OS_API
892OPENJDK_TARGET_OS
893OPENJDK_BUILD_CPU_ENDIAN
894OPENJDK_BUILD_CPU_BITS
895OPENJDK_BUILD_CPU_ARCH
896OPENJDK_BUILD_CPU
897OPENJDK_BUILD_OS_API
898OPENJDK_BUILD_OS
899OPENJDK_BUILD_AUTOCONF_NAME
900OPENJDK_TARGET_AUTOCONF_NAME
901target_os
902target_vendor
903target_cpu
904target
905host_os
906host_vendor
907host_cpu
908host
909build_os
910build_vendor
911build_cpu
912build
913SETFILE
914DF
915READLINK
916CYGPATH
917NAWK
918SED
919FGREP
920EGREP
921GREP
922AWK
923XARGS
924WHICH
925WC
926UNIQ
927UNAME
928TR
929TOUCH
930TEE
931TAR
932TAIL
933SORT
934SH
935RM
936PRINTF
937MV
938MKTEMP
939MKDIR
940LS
941LN
942HEAD
943FIND
944FILE
945EXPR
946ECHO
947DIRNAME
948DIFF
949DATE
950CUT
951CPIO
952CP
953COMM
954CMP
955CHMOD
956CAT
957BASH
958BASENAME
959DATE_WHEN_CONFIGURED
960CONFIGURE_COMMAND_LINE
961CUSTOM_MAKE_DIR
962target_alias
963host_alias
964build_alias
965LIBS
966ECHO_T
967ECHO_N
968ECHO_C
969DEFS
970mandir
971localedir
972libdir
973psdir
974pdfdir
975dvidir
976htmldir
977infodir
978docdir
979oldincludedir
980includedir
981localstatedir
982sharedstatedir
983sysconfdir
984datadir
985datarootdir
986libexecdir
987sbindir
988bindir
989program_transform_name
990prefix
991exec_prefix
992PACKAGE_URL
993PACKAGE_BUGREPORT
994PACKAGE_STRING
995PACKAGE_VERSION
996PACKAGE_TARNAME
997PACKAGE_NAME
998PATH_SEPARATOR
999SHELL'
1000ac_subst_files=''
1001ac_user_opts='
1002enable_option_checking
1003with_custom_make_dir
1004with_target_bits
1005with_sys_root
1006with_tools_dir
1007with_devkit
1008enable_openjdk_only
1009with_jdk_variant
1010with_jvm_interpreter
1011with_jvm_variants
1012enable_debug
1013with_debug_level
1014with_conf_name
1015with_builddeps_conf
1016with_builddeps_server
1017with_builddeps_dir
1018with_builddeps_group
1019enable_headful
1020enable_hotspot_test_in_build
1021with_cacerts_file
1022enable_unlimited_crypto
1023with_milestone
1024with_update_version
1025with_user_release_suffix
1026with_build_number
1027with_boot_jdk
1028with_boot_jdk_jvmargs
1029with_add_source_root
1030with_override_source_root
1031with_adds_and_overrides
1032with_override_langtools
1033with_override_corba
1034with_override_jaxp
1035with_override_jaxws
1036with_override_hotspot
1037with_override_nashorn
1038with_override_jdk
1039with_import_hotspot
1040with_msvcr_dll
1041with_dxsdk
1042with_dxsdk_lib
1043with_dxsdk_include
1044with_jtreg
1045with_extra_cflags
1046with_extra_cxxflags
1047with_extra_ldflags
1048enable_debug_symbols
1049enable_zip_debug_info
1050enable_macosx_runtime_support
1051with_x
1052with_cups
1053with_cups_include
1054with_freetype
1055with_freetype_include
1056with_freetype_lib
1057enable_freetype_bundling
1058with_alsa
1059with_alsa_include
1060with_alsa_lib
1061with_giflib
1062with_zlib
1063with_stdc__lib
1064with_num_cores
1065with_memory_size
1066with_jobs
1067with_sjavac_server_java
1068enable_sjavac
1069enable_precompiled_headers
1070enable_ccache
1071with_ccache_dir
1072'
1073      ac_precious_vars='build_alias
1074host_alias
1075target_alias
1076PKG_CONFIG
1077CC
1078CFLAGS
1079LDFLAGS
1080LIBS
1081CPPFLAGS
1082CXX
1083CXXFLAGS
1084CCC
1085OBJC
1086OBJCFLAGS
1087CPP
1088CXXCPP
1089XMKMF
1090FREETYPE_CFLAGS
1091FREETYPE_LIBS
1092ALSA_CFLAGS
1093ALSA_LIBS
1094LIBFFI_CFLAGS
1095LIBFFI_LIBS'
1096
1097
1098# Initialize some variables set by options.
1099ac_init_help=
1100ac_init_version=false
1101ac_unrecognized_opts=
1102ac_unrecognized_sep=
1103# The variables have the same names as the options, with
1104# dashes changed to underlines.
1105cache_file=/dev/null
1106exec_prefix=NONE
1107no_create=
1108no_recursion=
1109prefix=NONE
1110program_prefix=NONE
1111program_suffix=NONE
1112program_transform_name=s,x,x,
1113silent=
1114site=
1115srcdir=
1116verbose=
1117x_includes=NONE
1118x_libraries=NONE
1119
1120# Installation directory options.
1121# These are left unexpanded so users can "make install exec_prefix=/foo"
1122# and all the variables that are supposed to be based on exec_prefix
1123# by default will actually change.
1124# Use braces instead of parens because sh, perl, etc. also accept them.
1125# (The list follows the same order as the GNU Coding Standards.)
1126bindir='${exec_prefix}/bin'
1127sbindir='${exec_prefix}/sbin'
1128libexecdir='${exec_prefix}/libexec'
1129datarootdir='${prefix}/share'
1130datadir='${datarootdir}'
1131sysconfdir='${prefix}/etc'
1132sharedstatedir='${prefix}/com'
1133localstatedir='${prefix}/var'
1134includedir='${prefix}/include'
1135oldincludedir='/usr/include'
1136docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1137infodir='${datarootdir}/info'
1138htmldir='${docdir}'
1139dvidir='${docdir}'
1140pdfdir='${docdir}'
1141psdir='${docdir}'
1142libdir='${exec_prefix}/lib'
1143localedir='${datarootdir}/locale'
1144mandir='${datarootdir}/man'
1145
1146ac_prev=
1147ac_dashdash=
1148for ac_option
1149do
1150  # If the previous option needs an argument, assign it.
1151  if test -n "$ac_prev"; then
1152    eval $ac_prev=\$ac_option
1153    ac_prev=
1154    continue
1155  fi
1156
1157  case $ac_option in
1158  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1159  *=)   ac_optarg= ;;
1160  *)    ac_optarg=yes ;;
1161  esac
1162
1163  # Accept the important Cygnus configure options, so we can diagnose typos.
1164
1165  case $ac_dashdash$ac_option in
1166  --)
1167    ac_dashdash=yes ;;
1168
1169  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1170    ac_prev=bindir ;;
1171  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1172    bindir=$ac_optarg ;;
1173
1174  -build | --build | --buil | --bui | --bu)
1175    ac_prev=build_alias ;;
1176  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1177    build_alias=$ac_optarg ;;
1178
1179  -cache-file | --cache-file | --cache-fil | --cache-fi \
1180  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1181    ac_prev=cache_file ;;
1182  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1183  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1184    cache_file=$ac_optarg ;;
1185
1186  --config-cache | -C)
1187    cache_file=config.cache ;;
1188
1189  -datadir | --datadir | --datadi | --datad)
1190    ac_prev=datadir ;;
1191  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1192    datadir=$ac_optarg ;;
1193
1194  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1195  | --dataroo | --dataro | --datar)
1196    ac_prev=datarootdir ;;
1197  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1198  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1199    datarootdir=$ac_optarg ;;
1200
1201  -disable-* | --disable-*)
1202    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1203    # Reject names that are not valid shell variable names.
1204    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205      as_fn_error $? "invalid feature name: $ac_useropt"
1206    ac_useropt_orig=$ac_useropt
1207    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208    case $ac_user_opts in
1209      *"
1210"enable_$ac_useropt"
1211"*) ;;
1212      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1213	 ac_unrecognized_sep=', ';;
1214    esac
1215    eval enable_$ac_useropt=no ;;
1216
1217  -docdir | --docdir | --docdi | --doc | --do)
1218    ac_prev=docdir ;;
1219  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1220    docdir=$ac_optarg ;;
1221
1222  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1223    ac_prev=dvidir ;;
1224  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1225    dvidir=$ac_optarg ;;
1226
1227  -enable-* | --enable-*)
1228    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1229    # Reject names that are not valid shell variable names.
1230    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231      as_fn_error $? "invalid feature name: $ac_useropt"
1232    ac_useropt_orig=$ac_useropt
1233    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234    case $ac_user_opts in
1235      *"
1236"enable_$ac_useropt"
1237"*) ;;
1238      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1239	 ac_unrecognized_sep=', ';;
1240    esac
1241    eval enable_$ac_useropt=\$ac_optarg ;;
1242
1243  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1244  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1245  | --exec | --exe | --ex)
1246    ac_prev=exec_prefix ;;
1247  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1248  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1249  | --exec=* | --exe=* | --ex=*)
1250    exec_prefix=$ac_optarg ;;
1251
1252  -gas | --gas | --ga | --g)
1253    # Obsolete; use --with-gas.
1254    with_gas=yes ;;
1255
1256  -help | --help | --hel | --he | -h)
1257    ac_init_help=long ;;
1258  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1259    ac_init_help=recursive ;;
1260  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1261    ac_init_help=short ;;
1262
1263  -host | --host | --hos | --ho)
1264    ac_prev=host_alias ;;
1265  -host=* | --host=* | --hos=* | --ho=*)
1266    host_alias=$ac_optarg ;;
1267
1268  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1269    ac_prev=htmldir ;;
1270  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1271  | --ht=*)
1272    htmldir=$ac_optarg ;;
1273
1274  -includedir | --includedir | --includedi | --included | --include \
1275  | --includ | --inclu | --incl | --inc)
1276    ac_prev=includedir ;;
1277  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1278  | --includ=* | --inclu=* | --incl=* | --inc=*)
1279    includedir=$ac_optarg ;;
1280
1281  -infodir | --infodir | --infodi | --infod | --info | --inf)
1282    ac_prev=infodir ;;
1283  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1284    infodir=$ac_optarg ;;
1285
1286  -libdir | --libdir | --libdi | --libd)
1287    ac_prev=libdir ;;
1288  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1289    libdir=$ac_optarg ;;
1290
1291  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1292  | --libexe | --libex | --libe)
1293    ac_prev=libexecdir ;;
1294  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1295  | --libexe=* | --libex=* | --libe=*)
1296    libexecdir=$ac_optarg ;;
1297
1298  -localedir | --localedir | --localedi | --localed | --locale)
1299    ac_prev=localedir ;;
1300  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1301    localedir=$ac_optarg ;;
1302
1303  -localstatedir | --localstatedir | --localstatedi | --localstated \
1304  | --localstate | --localstat | --localsta | --localst | --locals)
1305    ac_prev=localstatedir ;;
1306  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1307  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1308    localstatedir=$ac_optarg ;;
1309
1310  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1311    ac_prev=mandir ;;
1312  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1313    mandir=$ac_optarg ;;
1314
1315  -nfp | --nfp | --nf)
1316    # Obsolete; use --without-fp.
1317    with_fp=no ;;
1318
1319  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1320  | --no-cr | --no-c | -n)
1321    no_create=yes ;;
1322
1323  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1324  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1325    no_recursion=yes ;;
1326
1327  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1328  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1329  | --oldin | --oldi | --old | --ol | --o)
1330    ac_prev=oldincludedir ;;
1331  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1332  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1333  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1334    oldincludedir=$ac_optarg ;;
1335
1336  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1337    ac_prev=prefix ;;
1338  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1339    prefix=$ac_optarg ;;
1340
1341  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1342  | --program-pre | --program-pr | --program-p)
1343    ac_prev=program_prefix ;;
1344  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1345  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1346    program_prefix=$ac_optarg ;;
1347
1348  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1349  | --program-suf | --program-su | --program-s)
1350    ac_prev=program_suffix ;;
1351  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1352  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1353    program_suffix=$ac_optarg ;;
1354
1355  -program-transform-name | --program-transform-name \
1356  | --program-transform-nam | --program-transform-na \
1357  | --program-transform-n | --program-transform- \
1358  | --program-transform | --program-transfor \
1359  | --program-transfo | --program-transf \
1360  | --program-trans | --program-tran \
1361  | --progr-tra | --program-tr | --program-t)
1362    ac_prev=program_transform_name ;;
1363  -program-transform-name=* | --program-transform-name=* \
1364  | --program-transform-nam=* | --program-transform-na=* \
1365  | --program-transform-n=* | --program-transform-=* \
1366  | --program-transform=* | --program-transfor=* \
1367  | --program-transfo=* | --program-transf=* \
1368  | --program-trans=* | --program-tran=* \
1369  | --progr-tra=* | --program-tr=* | --program-t=*)
1370    program_transform_name=$ac_optarg ;;
1371
1372  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1373    ac_prev=pdfdir ;;
1374  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1375    pdfdir=$ac_optarg ;;
1376
1377  -psdir | --psdir | --psdi | --psd | --ps)
1378    ac_prev=psdir ;;
1379  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1380    psdir=$ac_optarg ;;
1381
1382  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1383  | -silent | --silent | --silen | --sile | --sil)
1384    silent=yes ;;
1385
1386  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1387    ac_prev=sbindir ;;
1388  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1389  | --sbi=* | --sb=*)
1390    sbindir=$ac_optarg ;;
1391
1392  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1393  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1394  | --sharedst | --shareds | --shared | --share | --shar \
1395  | --sha | --sh)
1396    ac_prev=sharedstatedir ;;
1397  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1398  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1399  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1400  | --sha=* | --sh=*)
1401    sharedstatedir=$ac_optarg ;;
1402
1403  -site | --site | --sit)
1404    ac_prev=site ;;
1405  -site=* | --site=* | --sit=*)
1406    site=$ac_optarg ;;
1407
1408  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1409    ac_prev=srcdir ;;
1410  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1411    srcdir=$ac_optarg ;;
1412
1413  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1414  | --syscon | --sysco | --sysc | --sys | --sy)
1415    ac_prev=sysconfdir ;;
1416  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1417  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1418    sysconfdir=$ac_optarg ;;
1419
1420  -target | --target | --targe | --targ | --tar | --ta | --t)
1421    ac_prev=target_alias ;;
1422  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1423    target_alias=$ac_optarg ;;
1424
1425  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1426    verbose=yes ;;
1427
1428  -version | --version | --versio | --versi | --vers | -V)
1429    ac_init_version=: ;;
1430
1431  -with-* | --with-*)
1432    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1433    # Reject names that are not valid shell variable names.
1434    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1435      as_fn_error $? "invalid package name: $ac_useropt"
1436    ac_useropt_orig=$ac_useropt
1437    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1438    case $ac_user_opts in
1439      *"
1440"with_$ac_useropt"
1441"*) ;;
1442      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1443	 ac_unrecognized_sep=', ';;
1444    esac
1445    eval with_$ac_useropt=\$ac_optarg ;;
1446
1447  -without-* | --without-*)
1448    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1449    # Reject names that are not valid shell variable names.
1450    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1451      as_fn_error $? "invalid package name: $ac_useropt"
1452    ac_useropt_orig=$ac_useropt
1453    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1454    case $ac_user_opts in
1455      *"
1456"with_$ac_useropt"
1457"*) ;;
1458      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1459	 ac_unrecognized_sep=', ';;
1460    esac
1461    eval with_$ac_useropt=no ;;
1462
1463  --x)
1464    # Obsolete; use --with-x.
1465    with_x=yes ;;
1466
1467  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1468  | --x-incl | --x-inc | --x-in | --x-i)
1469    ac_prev=x_includes ;;
1470  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1471  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1472    x_includes=$ac_optarg ;;
1473
1474  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1475  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1476    ac_prev=x_libraries ;;
1477  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1478  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1479    x_libraries=$ac_optarg ;;
1480
1481  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1482Try \`$0 --help' for more information"
1483    ;;
1484
1485  *=*)
1486    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1487    # Reject names that are not valid shell variable names.
1488    case $ac_envvar in #(
1489      '' | [0-9]* | *[!_$as_cr_alnum]* )
1490      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1491    esac
1492    eval $ac_envvar=\$ac_optarg
1493    export $ac_envvar ;;
1494
1495  *)
1496    # FIXME: should be removed in autoconf 3.0.
1497    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1498    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1499      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1500    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1501    ;;
1502
1503  esac
1504done
1505
1506if test -n "$ac_prev"; then
1507  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1508  as_fn_error $? "missing argument to $ac_option"
1509fi
1510
1511if test -n "$ac_unrecognized_opts"; then
1512  case $enable_option_checking in
1513    no) ;;
1514    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1515    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1516  esac
1517fi
1518
1519# Check all directory arguments for consistency.
1520for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1521		datadir sysconfdir sharedstatedir localstatedir includedir \
1522		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1523		libdir localedir mandir
1524do
1525  eval ac_val=\$$ac_var
1526  # Remove trailing slashes.
1527  case $ac_val in
1528    */ )
1529      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1530      eval $ac_var=\$ac_val;;
1531  esac
1532  # Be sure to have absolute directory names.
1533  case $ac_val in
1534    [\\/$]* | ?:[\\/]* )  continue;;
1535    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1536  esac
1537  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1538done
1539
1540# There might be people who depend on the old broken behavior: `$host'
1541# used to hold the argument of --host etc.
1542# FIXME: To remove some day.
1543build=$build_alias
1544host=$host_alias
1545target=$target_alias
1546
1547# FIXME: To remove some day.
1548if test "x$host_alias" != x; then
1549  if test "x$build_alias" = x; then
1550    cross_compiling=maybe
1551  elif test "x$build_alias" != "x$host_alias"; then
1552    cross_compiling=yes
1553  fi
1554fi
1555
1556ac_tool_prefix=
1557test -n "$host_alias" && ac_tool_prefix=$host_alias-
1558
1559test "$silent" = yes && exec 6>/dev/null
1560
1561
1562ac_pwd=`pwd` && test -n "$ac_pwd" &&
1563ac_ls_di=`ls -di .` &&
1564ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1565  as_fn_error $? "working directory cannot be determined"
1566test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1567  as_fn_error $? "pwd does not report name of working directory"
1568
1569
1570# Find the source files, if location was not specified.
1571if test -z "$srcdir"; then
1572  ac_srcdir_defaulted=yes
1573  # Try the directory containing this script, then the parent directory.
1574  ac_confdir=`$as_dirname -- "$as_myself" ||
1575$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1576	 X"$as_myself" : 'X\(//\)[^/]' \| \
1577	 X"$as_myself" : 'X\(//\)$' \| \
1578	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1579$as_echo X"$as_myself" |
1580    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1581	    s//\1/
1582	    q
1583	  }
1584	  /^X\(\/\/\)[^/].*/{
1585	    s//\1/
1586	    q
1587	  }
1588	  /^X\(\/\/\)$/{
1589	    s//\1/
1590	    q
1591	  }
1592	  /^X\(\/\).*/{
1593	    s//\1/
1594	    q
1595	  }
1596	  s/.*/./; q'`
1597  srcdir=$ac_confdir
1598  if test ! -r "$srcdir/$ac_unique_file"; then
1599    srcdir=..
1600  fi
1601else
1602  ac_srcdir_defaulted=no
1603fi
1604if test ! -r "$srcdir/$ac_unique_file"; then
1605  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1606  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1607fi
1608ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1609ac_abs_confdir=`(
1610	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1611	pwd)`
1612# When building in place, set srcdir=.
1613if test "$ac_abs_confdir" = "$ac_pwd"; then
1614  srcdir=.
1615fi
1616# Remove unnecessary trailing slashes from srcdir.
1617# Double slashes in file names in object file debugging info
1618# mess up M-x gdb in Emacs.
1619case $srcdir in
1620*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1621esac
1622for ac_var in $ac_precious_vars; do
1623  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1624  eval ac_env_${ac_var}_value=\$${ac_var}
1625  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1626  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1627done
1628
1629#
1630# Report the --help message.
1631#
1632if test "$ac_init_help" = "long"; then
1633  # Omit some internal or obsolete options to make the list less imposing.
1634  # This message is too long to be a string in the A/UX 3.1 sh.
1635  cat <<_ACEOF
1636\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1637
1638Usage: $0 [OPTION]... [VAR=VALUE]...
1639
1640To assign environment variables (e.g., CC, CFLAGS...), specify them as
1641VAR=VALUE.  See below for descriptions of some of the useful variables.
1642
1643Defaults for the options are specified in brackets.
1644
1645Configuration:
1646  -h, --help              display this help and exit
1647      --help=short        display options specific to this package
1648      --help=recursive    display the short help of all the included packages
1649  -V, --version           display version information and exit
1650  -q, --quiet, --silent   do not print \`checking ...' messages
1651      --cache-file=FILE   cache test results in FILE [disabled]
1652  -C, --config-cache      alias for \`--cache-file=config.cache'
1653  -n, --no-create         do not create output files
1654      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1655
1656Installation directories:
1657  --prefix=PREFIX         install architecture-independent files in PREFIX
1658                          [$ac_default_prefix]
1659  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1660                          [PREFIX]
1661
1662By default, \`make install' will install all the files in
1663\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1664an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1665for instance \`--prefix=\$HOME'.
1666
1667For better control, use the options below.
1668
1669Fine tuning of the installation directories:
1670  --bindir=DIR            user executables [EPREFIX/bin]
1671  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1672  --libexecdir=DIR        program executables [EPREFIX/libexec]
1673  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1674  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1675  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1676  --libdir=DIR            object code libraries [EPREFIX/lib]
1677  --includedir=DIR        C header files [PREFIX/include]
1678  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1679  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1680  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1681  --infodir=DIR           info documentation [DATAROOTDIR/info]
1682  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1683  --mandir=DIR            man documentation [DATAROOTDIR/man]
1684  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1685  --htmldir=DIR           html documentation [DOCDIR]
1686  --dvidir=DIR            dvi documentation [DOCDIR]
1687  --pdfdir=DIR            pdf documentation [DOCDIR]
1688  --psdir=DIR             ps documentation [DOCDIR]
1689_ACEOF
1690
1691  cat <<\_ACEOF
1692
1693X features:
1694  --x-includes=DIR    X include files are in DIR
1695  --x-libraries=DIR   X library files are in DIR
1696
1697System types:
1698  --build=BUILD     configure for building on BUILD [guessed]
1699  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1700  --target=TARGET   configure for building compilers for TARGET [HOST]
1701_ACEOF
1702fi
1703
1704if test -n "$ac_init_help"; then
1705  case $ac_init_help in
1706     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1707   esac
1708  cat <<\_ACEOF
1709
1710Optional Features:
1711  --disable-option-checking  ignore unrecognized --enable/--with options
1712  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1713  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1714  --enable-openjdk-only   suppress building custom source even if present
1715                          [disabled]
1716  --enable-debug          set the debug level to fastdebug (shorthand for
1717                          --with-debug-level=fastdebug) [disabled]
1718  --disable-headful       disable building headful support (graphical UI
1719                          support) [enabled]
1720  --enable-hotspot-test-in-build
1721                          run the Queens test after Hotspot build [disabled]
1722  --enable-unlimited-crypto
1723                          Enable unlimited crypto policy [disabled]
1724  --disable-debug-symbols disable generation of debug symbols [enabled]
1725  --disable-zip-debug-info
1726                          disable zipping of debug-info files [enabled]
1727  --enable-macosx-runtime-support
1728                          Deprecated. Option is kept for backwards
1729                          compatibility and is ignored
1730  --disable-freetype-bundling
1731                          disable bundling of the freetype library with the
1732                          build result [enabled on Windows or when using
1733                          --with-freetype, disabled otherwise]
1734  --enable-sjavac         use sjavac to do fast incremental compiles
1735                          [disabled]
1736  --disable-precompiled-headers
1737                          disable using precompiled headers when compiling C++
1738                          [enabled]
1739  --disable-ccache        disable using ccache to speed up recompilations
1740                          [enabled]
1741
1742Optional Packages:
1743  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1744  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1745  --with-custom-make-dir  use this directory for custom build/make files
1746  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1747                          support it), e.g. --with-target-bits=32 [guessed]
1748  --with-sys-root         pass this sys-root to the compilers and tools (for
1749                          cross-compiling)
1750  --with-tools-dir        search this directory for compilers and tools (for
1751                          cross-compiling)
1752  --with-devkit           use this directory as base for tools-dir and
1753                          sys-root (for cross-compiling)
1754  --with-jdk-variant      JDK variant to build (normal) [normal]
1755  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1756  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1757                          client, minimal1, kernel, zero, zeroshark, core)
1758                          [server]
1759  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1760                          [release]
1761  --with-conf-name        use this as the name of the configuration [generated
1762                          from important configuration options]
1763  --with-builddeps-conf   use this configuration file for the builddeps
1764  --with-builddeps-server download and use build dependencies from this server
1765                          url
1766  --with-builddeps-dir    store downloaded build dependencies here
1767                          [/localhome/builddeps]
1768  --with-builddeps-group  chgrp the downloaded build dependencies to this
1769                          group
1770  --with-cacerts-file     specify alternative cacerts file
1771  --with-milestone        Set milestone value for build [internal]
1772  --with-update-version   Set update version value for build [b00]
1773  --with-user-release-suffix
1774                          Add a custom string to the version string if build
1775                          number isn't set.[username_builddateb00]
1776  --with-build-number     Set build number value for build [b00]
1777  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1778  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1779                          invocations of the Boot JDK, overriding the default
1780                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1781                          -enableassertions"
1782  --with-add-source-root  for each and every source directory, look in this
1783                          additional source root for the same directory; if it
1784                          exists and have files in it, include it in the build
1785  --with-override-source-root
1786                          for each and every source directory, look in this
1787                          override source root for the same directory; if it
1788                          exists, use that directory instead and ignore the
1789                          directory in the original source root
1790  --with-adds-and-overrides
1791                          use the subdirs 'adds' and 'overrides' in the
1792                          specified directory as add-source-root and
1793                          override-source-root
1794  --with-override-langtools
1795                          use this langtools dir for the build
1796  --with-override-corba   use this corba dir for the build
1797  --with-override-jaxp    use this jaxp dir for the build
1798  --with-override-jaxws   use this jaxws dir for the build
1799  --with-override-hotspot use this hotspot dir for the build
1800  --with-override-nashorn use this nashorn dir for the build
1801  --with-override-jdk     use this jdk dir for the build
1802  --with-import-hotspot   import hotspot binaries from this jdk image or
1803                          hotspot build dist dir instead of building from
1804                          source
1805  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1806                          only) [probed]
1807  --with-dxsdk            Deprecated. Option is kept for backwards
1808                          compatibility and is ignored
1809  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1810                          compatibility and is ignored
1811  --with-dxsdk-include    Deprecated. Option is kept for backwards
1812                          compatibility and is ignored
1813  --with-jtreg            Regression Test Harness [probed]
1814  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1815  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1816  --with-extra-ldflags    extra flags to be used when linking jdk
1817  --with-x                use the X Window System
1818  --with-cups             specify prefix directory for the cups package
1819                          (expecting the headers under PATH/include)
1820  --with-cups-include     specify directory for the cups include files
1821  --with-freetype         specify prefix directory for the freetype package
1822                          (expecting the libraries under PATH/lib and the
1823                          headers under PATH/include)
1824  --with-freetype-include specify directory for the freetype include files
1825  --with-freetype-lib     specify directory for the freetype library
1826  --with-alsa             specify prefix directory for the alsa package
1827                          (expecting the libraries under PATH/lib and the
1828                          headers under PATH/include)
1829  --with-alsa-include     specify directory for the alsa include files
1830  --with-alsa-lib         specify directory for the alsa library
1831  --with-giflib           use giflib from build system or OpenJDK source
1832                          (system, bundled) [bundled]
1833  --with-zlib             use zlib from build system or OpenJDK source
1834                          (system, bundled) [bundled]
1835  --with-stdc++lib=<static>,<dynamic>,<default>
1836                          force linking of the C++ runtime on Linux to either
1837                          static or dynamic, default is static with dynamic as
1838                          fallback
1839  --with-num-cores        number of cores in the build system, e.g.
1840                          --with-num-cores=8 [probed]
1841  --with-memory-size      memory (in MB) available in the build system, e.g.
1842                          --with-memory-size=1024 [probed]
1843  --with-jobs             number of parallel jobs to let make run [calculated
1844                          based on cores and memory]
1845  --with-sjavac-server-java
1846                          use this java binary for running the sjavac
1847                          background server [Boot JDK java]
1848  --with-ccache-dir       where to store ccache files [~/.ccache]
1849
1850Some influential environment variables:
1851  PKG_CONFIG  path to pkg-config utility
1852  CC          C compiler command
1853  CFLAGS      C compiler flags
1854  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1855              nonstandard directory <lib dir>
1856  LIBS        libraries to pass to the linker, e.g. -l<library>
1857  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1858              you have headers in a nonstandard directory <include dir>
1859  CXX         C++ compiler command
1860  CXXFLAGS    C++ compiler flags
1861  OBJC        Objective C compiler command
1862  OBJCFLAGS   Objective C compiler flags
1863  CPP         C preprocessor
1864  CXXCPP      C++ preprocessor
1865  XMKMF       Path to xmkmf, Makefile generator for X Window System
1866  FREETYPE_CFLAGS
1867              C compiler flags for FREETYPE, overriding pkg-config
1868  FREETYPE_LIBS
1869              linker flags for FREETYPE, overriding pkg-config
1870  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1871  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1872  LIBFFI_CFLAGS
1873              C compiler flags for LIBFFI, overriding pkg-config
1874  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1875
1876Use these variables to override the choices made by `configure' or to help
1877it to find libraries and programs with nonstandard names/locations.
1878
1879Report bugs to <build-dev@openjdk.java.net>.
1880OpenJDK home page: <http://openjdk.java.net>.
1881_ACEOF
1882ac_status=$?
1883fi
1884
1885if test "$ac_init_help" = "recursive"; then
1886  # If there are subdirs, report their specific --help.
1887  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1888    test -d "$ac_dir" ||
1889      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1890      continue
1891    ac_builddir=.
1892
1893case "$ac_dir" in
1894.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1895*)
1896  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1897  # A ".." for each directory in $ac_dir_suffix.
1898  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1899  case $ac_top_builddir_sub in
1900  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1901  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1902  esac ;;
1903esac
1904ac_abs_top_builddir=$ac_pwd
1905ac_abs_builddir=$ac_pwd$ac_dir_suffix
1906# for backward compatibility:
1907ac_top_builddir=$ac_top_build_prefix
1908
1909case $srcdir in
1910  .)  # We are building in place.
1911    ac_srcdir=.
1912    ac_top_srcdir=$ac_top_builddir_sub
1913    ac_abs_top_srcdir=$ac_pwd ;;
1914  [\\/]* | ?:[\\/]* )  # Absolute name.
1915    ac_srcdir=$srcdir$ac_dir_suffix;
1916    ac_top_srcdir=$srcdir
1917    ac_abs_top_srcdir=$srcdir ;;
1918  *) # Relative name.
1919    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1920    ac_top_srcdir=$ac_top_build_prefix$srcdir
1921    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1922esac
1923ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1924
1925    cd "$ac_dir" || { ac_status=$?; continue; }
1926    # Check for guested configure.
1927    if test -f "$ac_srcdir/configure.gnu"; then
1928      echo &&
1929      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1930    elif test -f "$ac_srcdir/configure"; then
1931      echo &&
1932      $SHELL "$ac_srcdir/configure" --help=recursive
1933    else
1934      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1935    fi || ac_status=$?
1936    cd "$ac_pwd" || { ac_status=$?; break; }
1937  done
1938fi
1939
1940test -n "$ac_init_help" && exit $ac_status
1941if $ac_init_version; then
1942  cat <<\_ACEOF
1943OpenJDK configure jdk8
1944generated by GNU Autoconf 2.69
1945
1946Copyright (C) 2012 Free Software Foundation, Inc.
1947This configure script is free software; the Free Software Foundation
1948gives unlimited permission to copy, distribute and modify it.
1949_ACEOF
1950  exit
1951fi
1952
1953## ------------------------ ##
1954## Autoconf initialization. ##
1955## ------------------------ ##
1956
1957# ac_fn_c_try_compile LINENO
1958# --------------------------
1959# Try to compile conftest.$ac_ext, and return whether this succeeded.
1960ac_fn_c_try_compile ()
1961{
1962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963  rm -f conftest.$ac_objext
1964  if { { ac_try="$ac_compile"
1965case "(($ac_try" in
1966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967  *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971  (eval "$ac_compile") 2>conftest.err
1972  ac_status=$?
1973  if test -s conftest.err; then
1974    grep -v '^ *+' conftest.err >conftest.er1
1975    cat conftest.er1 >&5
1976    mv -f conftest.er1 conftest.err
1977  fi
1978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979  test $ac_status = 0; } && {
1980	 test -z "$ac_c_werror_flag" ||
1981	 test ! -s conftest.err
1982       } && test -s conftest.$ac_objext; then :
1983  ac_retval=0
1984else
1985  $as_echo "$as_me: failed program was:" >&5
1986sed 's/^/| /' conftest.$ac_ext >&5
1987
1988	ac_retval=1
1989fi
1990  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1991  as_fn_set_status $ac_retval
1992
1993} # ac_fn_c_try_compile
1994
1995# ac_fn_cxx_try_compile LINENO
1996# ----------------------------
1997# Try to compile conftest.$ac_ext, and return whether this succeeded.
1998ac_fn_cxx_try_compile ()
1999{
2000  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001  rm -f conftest.$ac_objext
2002  if { { ac_try="$ac_compile"
2003case "(($ac_try" in
2004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2005  *) ac_try_echo=$ac_try;;
2006esac
2007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2008$as_echo "$ac_try_echo"; } >&5
2009  (eval "$ac_compile") 2>conftest.err
2010  ac_status=$?
2011  if test -s conftest.err; then
2012    grep -v '^ *+' conftest.err >conftest.er1
2013    cat conftest.er1 >&5
2014    mv -f conftest.er1 conftest.err
2015  fi
2016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2017  test $ac_status = 0; } && {
2018	 test -z "$ac_cxx_werror_flag" ||
2019	 test ! -s conftest.err
2020       } && test -s conftest.$ac_objext; then :
2021  ac_retval=0
2022else
2023  $as_echo "$as_me: failed program was:" >&5
2024sed 's/^/| /' conftest.$ac_ext >&5
2025
2026	ac_retval=1
2027fi
2028  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029  as_fn_set_status $ac_retval
2030
2031} # ac_fn_cxx_try_compile
2032
2033# ac_fn_objc_try_compile LINENO
2034# -----------------------------
2035# Try to compile conftest.$ac_ext, and return whether this succeeded.
2036ac_fn_objc_try_compile ()
2037{
2038  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039  rm -f conftest.$ac_objext
2040  if { { ac_try="$ac_compile"
2041case "(($ac_try" in
2042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2043  *) ac_try_echo=$ac_try;;
2044esac
2045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2046$as_echo "$ac_try_echo"; } >&5
2047  (eval "$ac_compile") 2>conftest.err
2048  ac_status=$?
2049  if test -s conftest.err; then
2050    grep -v '^ *+' conftest.err >conftest.er1
2051    cat conftest.er1 >&5
2052    mv -f conftest.er1 conftest.err
2053  fi
2054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2055  test $ac_status = 0; } && {
2056	 test -z "$ac_objc_werror_flag" ||
2057	 test ! -s conftest.err
2058       } && test -s conftest.$ac_objext; then :
2059  ac_retval=0
2060else
2061  $as_echo "$as_me: failed program was:" >&5
2062sed 's/^/| /' conftest.$ac_ext >&5
2063
2064	ac_retval=1
2065fi
2066  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067  as_fn_set_status $ac_retval
2068
2069} # ac_fn_objc_try_compile
2070
2071# ac_fn_c_try_cpp LINENO
2072# ----------------------
2073# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2074ac_fn_c_try_cpp ()
2075{
2076  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2077  if { { ac_try="$ac_cpp conftest.$ac_ext"
2078case "(($ac_try" in
2079  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2080  *) ac_try_echo=$ac_try;;
2081esac
2082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2083$as_echo "$ac_try_echo"; } >&5
2084  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2085  ac_status=$?
2086  if test -s conftest.err; then
2087    grep -v '^ *+' conftest.err >conftest.er1
2088    cat conftest.er1 >&5
2089    mv -f conftest.er1 conftest.err
2090  fi
2091  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2092  test $ac_status = 0; } > conftest.i && {
2093	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2094	 test ! -s conftest.err
2095       }; then :
2096  ac_retval=0
2097else
2098  $as_echo "$as_me: failed program was:" >&5
2099sed 's/^/| /' conftest.$ac_ext >&5
2100
2101    ac_retval=1
2102fi
2103  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2104  as_fn_set_status $ac_retval
2105
2106} # ac_fn_c_try_cpp
2107
2108# ac_fn_cxx_try_cpp LINENO
2109# ------------------------
2110# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2111ac_fn_cxx_try_cpp ()
2112{
2113  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114  if { { ac_try="$ac_cpp conftest.$ac_ext"
2115case "(($ac_try" in
2116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2117  *) ac_try_echo=$ac_try;;
2118esac
2119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2120$as_echo "$ac_try_echo"; } >&5
2121  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2122  ac_status=$?
2123  if test -s conftest.err; then
2124    grep -v '^ *+' conftest.err >conftest.er1
2125    cat conftest.er1 >&5
2126    mv -f conftest.er1 conftest.err
2127  fi
2128  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2129  test $ac_status = 0; } > conftest.i && {
2130	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2131	 test ! -s conftest.err
2132       }; then :
2133  ac_retval=0
2134else
2135  $as_echo "$as_me: failed program was:" >&5
2136sed 's/^/| /' conftest.$ac_ext >&5
2137
2138    ac_retval=1
2139fi
2140  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141  as_fn_set_status $ac_retval
2142
2143} # ac_fn_cxx_try_cpp
2144
2145# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2146# ---------------------------------------------------------
2147# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2148# the include files in INCLUDES and setting the cache variable VAR
2149# accordingly.
2150ac_fn_cxx_check_header_mongrel ()
2151{
2152  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153  if eval \${$3+:} false; then :
2154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2155$as_echo_n "checking for $2... " >&6; }
2156if eval \${$3+:} false; then :
2157  $as_echo_n "(cached) " >&6
2158fi
2159eval ac_res=\$$3
2160	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2161$as_echo "$ac_res" >&6; }
2162else
2163  # Is the header compilable?
2164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2165$as_echo_n "checking $2 usability... " >&6; }
2166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h.  */
2168$4
2169#include <$2>
2170_ACEOF
2171if ac_fn_cxx_try_compile "$LINENO"; then :
2172  ac_header_compiler=yes
2173else
2174  ac_header_compiler=no
2175fi
2176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2178$as_echo "$ac_header_compiler" >&6; }
2179
2180# Is the header present?
2181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2182$as_echo_n "checking $2 presence... " >&6; }
2183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h.  */
2185#include <$2>
2186_ACEOF
2187if ac_fn_cxx_try_cpp "$LINENO"; then :
2188  ac_header_preproc=yes
2189else
2190  ac_header_preproc=no
2191fi
2192rm -f conftest.err conftest.i conftest.$ac_ext
2193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2194$as_echo "$ac_header_preproc" >&6; }
2195
2196# So?  What about this header?
2197case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2198  yes:no: )
2199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2200$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2201    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2202$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2203    ;;
2204  no:yes:* )
2205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2206$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2208$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2209    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2210$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2212$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2214$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2215( $as_echo "## ----------------------------------------- ##
2216## Report this to build-dev@openjdk.java.net ##
2217## ----------------------------------------- ##"
2218     ) | sed "s/^/$as_me: WARNING:     /" >&2
2219    ;;
2220esac
2221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2222$as_echo_n "checking for $2... " >&6; }
2223if eval \${$3+:} false; then :
2224  $as_echo_n "(cached) " >&6
2225else
2226  eval "$3=\$ac_header_compiler"
2227fi
2228eval ac_res=\$$3
2229	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
2231fi
2232  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233
2234} # ac_fn_cxx_check_header_mongrel
2235
2236# ac_fn_cxx_try_run LINENO
2237# ------------------------
2238# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2239# that executables *can* be run.
2240ac_fn_cxx_try_run ()
2241{
2242  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243  if { { ac_try="$ac_link"
2244case "(($ac_try" in
2245  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2246  *) ac_try_echo=$ac_try;;
2247esac
2248eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2249$as_echo "$ac_try_echo"; } >&5
2250  (eval "$ac_link") 2>&5
2251  ac_status=$?
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2254  { { case "(($ac_try" in
2255  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2256  *) ac_try_echo=$ac_try;;
2257esac
2258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2259$as_echo "$ac_try_echo"; } >&5
2260  (eval "$ac_try") 2>&5
2261  ac_status=$?
2262  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2263  test $ac_status = 0; }; }; then :
2264  ac_retval=0
2265else
2266  $as_echo "$as_me: program exited with status $ac_status" >&5
2267       $as_echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270       ac_retval=$ac_status
2271fi
2272  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2273  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274  as_fn_set_status $ac_retval
2275
2276} # ac_fn_cxx_try_run
2277
2278# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2279# ---------------------------------------------------------
2280# Tests whether HEADER exists and can be compiled using the include files in
2281# INCLUDES, setting the cache variable VAR accordingly.
2282ac_fn_cxx_check_header_compile ()
2283{
2284  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286$as_echo_n "checking for $2... " >&6; }
2287if eval \${$3+:} false; then :
2288  $as_echo_n "(cached) " >&6
2289else
2290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293#include <$2>
2294_ACEOF
2295if ac_fn_cxx_try_compile "$LINENO"; then :
2296  eval "$3=yes"
2297else
2298  eval "$3=no"
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301fi
2302eval ac_res=\$$3
2303	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304$as_echo "$ac_res" >&6; }
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306
2307} # ac_fn_cxx_check_header_compile
2308
2309# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2310# ----------------------------------------------
2311# Tries to find the compile-time value of EXPR in a program that includes
2312# INCLUDES, setting VAR accordingly. Returns whether the value could be
2313# computed
2314ac_fn_cxx_compute_int ()
2315{
2316  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317  if test "$cross_compiling" = yes; then
2318    # Depending upon the size, compute the lo and hi bounds.
2319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h.  */
2321$4
2322int
2323main ()
2324{
2325static int test_array [1 - 2 * !(($2) >= 0)];
2326test_array [0] = 0;
2327return test_array [0];
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_lo=0 ac_mid=0
2335  while :; do
2336    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337/* end confdefs.h.  */
2338$4
2339int
2340main ()
2341{
2342static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2343test_array [0] = 0;
2344return test_array [0];
2345
2346  ;
2347  return 0;
2348}
2349_ACEOF
2350if ac_fn_cxx_try_compile "$LINENO"; then :
2351  ac_hi=$ac_mid; break
2352else
2353  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2354			if test $ac_lo -le $ac_mid; then
2355			  ac_lo= ac_hi=
2356			  break
2357			fi
2358			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361  done
2362else
2363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369static int test_array [1 - 2 * !(($2) < 0)];
2370test_array [0] = 0;
2371return test_array [0];
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_hi=-1 ac_mid=-1
2379  while :; do
2380    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h.  */
2382$4
2383int
2384main ()
2385{
2386static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2387test_array [0] = 0;
2388return test_array [0];
2389
2390  ;
2391  return 0;
2392}
2393_ACEOF
2394if ac_fn_cxx_try_compile "$LINENO"; then :
2395  ac_lo=$ac_mid; break
2396else
2397  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2398			if test $ac_mid -le $ac_hi; then
2399			  ac_lo= ac_hi=
2400			  break
2401			fi
2402			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405  done
2406else
2407  ac_lo= ac_hi=
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412# Binary search between lo and hi bounds.
2413while test "x$ac_lo" != "x$ac_hi"; do
2414  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h.  */
2417$4
2418int
2419main ()
2420{
2421static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2422test_array [0] = 0;
2423return test_array [0];
2424
2425  ;
2426  return 0;
2427}
2428_ACEOF
2429if ac_fn_cxx_try_compile "$LINENO"; then :
2430  ac_hi=$ac_mid
2431else
2432  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2433fi
2434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435done
2436case $ac_lo in #((
2437?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2438'') ac_retval=1 ;;
2439esac
2440  else
2441    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442/* end confdefs.h.  */
2443$4
2444static long int longval () { return $2; }
2445static unsigned long int ulongval () { return $2; }
2446#include <stdio.h>
2447#include <stdlib.h>
2448int
2449main ()
2450{
2451
2452  FILE *f = fopen ("conftest.val", "w");
2453  if (! f)
2454    return 1;
2455  if (($2) < 0)
2456    {
2457      long int i = longval ();
2458      if (i != ($2))
2459	return 1;
2460      fprintf (f, "%ld", i);
2461    }
2462  else
2463    {
2464      unsigned long int i = ulongval ();
2465      if (i != ($2))
2466	return 1;
2467      fprintf (f, "%lu", i);
2468    }
2469  /* Do not output a trailing newline, as this causes \r\n confusion
2470     on some platforms.  */
2471  return ferror (f) || fclose (f) != 0;
2472
2473  ;
2474  return 0;
2475}
2476_ACEOF
2477if ac_fn_cxx_try_run "$LINENO"; then :
2478  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2479else
2480  ac_retval=1
2481fi
2482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2483  conftest.$ac_objext conftest.beam conftest.$ac_ext
2484rm -f conftest.val
2485
2486  fi
2487  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488  as_fn_set_status $ac_retval
2489
2490} # ac_fn_cxx_compute_int
2491
2492# ac_fn_cxx_try_link LINENO
2493# -------------------------
2494# Try to link conftest.$ac_ext, and return whether this succeeded.
2495ac_fn_cxx_try_link ()
2496{
2497  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2498  rm -f conftest.$ac_objext conftest$ac_exeext
2499  if { { ac_try="$ac_link"
2500case "(($ac_try" in
2501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502  *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506  (eval "$ac_link") 2>conftest.err
2507  ac_status=$?
2508  if test -s conftest.err; then
2509    grep -v '^ *+' conftest.err >conftest.er1
2510    cat conftest.er1 >&5
2511    mv -f conftest.er1 conftest.err
2512  fi
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; } && {
2515	 test -z "$ac_cxx_werror_flag" ||
2516	 test ! -s conftest.err
2517       } && test -s conftest$ac_exeext && {
2518	 test "$cross_compiling" = yes ||
2519	 test -x conftest$ac_exeext
2520       }; then :
2521  ac_retval=0
2522else
2523  $as_echo "$as_me: failed program was:" >&5
2524sed 's/^/| /' conftest.$ac_ext >&5
2525
2526	ac_retval=1
2527fi
2528  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2529  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2530  # interfere with the next link command; also delete a directory that is
2531  # left behind by Apple's compiler.  We do this before executing the actions.
2532  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2533  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534  as_fn_set_status $ac_retval
2535
2536} # ac_fn_cxx_try_link
2537
2538# ac_fn_cxx_check_func LINENO FUNC VAR
2539# ------------------------------------
2540# Tests whether FUNC exists, setting the cache variable VAR accordingly
2541ac_fn_cxx_check_func ()
2542{
2543  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550/* end confdefs.h.  */
2551/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2552   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2553#define $2 innocuous_$2
2554
2555/* System header to define __stub macros and hopefully few prototypes,
2556    which can conflict with char $2 (); below.
2557    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2558    <limits.h> exists even on freestanding compilers.  */
2559
2560#ifdef __STDC__
2561# include <limits.h>
2562#else
2563# include <assert.h>
2564#endif
2565
2566#undef $2
2567
2568/* Override any GCC internal prototype to avoid an error.
2569   Use char because int might match the return type of a GCC
2570   builtin and then its argument prototype would still apply.  */
2571#ifdef __cplusplus
2572extern "C"
2573#endif
2574char $2 ();
2575/* The GNU C library defines this for functions which it implements
2576    to always fail with ENOSYS.  Some functions are actually named
2577    something starting with __ and the normal name is an alias.  */
2578#if defined __stub_$2 || defined __stub___$2
2579choke me
2580#endif
2581
2582int
2583main ()
2584{
2585return $2 ();
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_link "$LINENO"; then :
2591  eval "$3=yes"
2592else
2593  eval "$3=no"
2594fi
2595rm -f core conftest.err conftest.$ac_objext \
2596    conftest$ac_exeext conftest.$ac_ext
2597fi
2598eval ac_res=\$$3
2599	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600$as_echo "$ac_res" >&6; }
2601  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602
2603} # ac_fn_cxx_check_func
2604
2605# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2606# -------------------------------------------------------
2607# Tests whether HEADER exists and can be compiled using the include files in
2608# INCLUDES, setting the cache variable VAR accordingly.
2609ac_fn_c_check_header_compile ()
2610{
2611  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613$as_echo_n "checking for $2... " >&6; }
2614if eval \${$3+:} false; then :
2615  $as_echo_n "(cached) " >&6
2616else
2617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620#include <$2>
2621_ACEOF
2622if ac_fn_c_try_compile "$LINENO"; then :
2623  eval "$3=yes"
2624else
2625  eval "$3=no"
2626fi
2627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2628fi
2629eval ac_res=\$$3
2630	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2631$as_echo "$ac_res" >&6; }
2632  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2633
2634} # ac_fn_c_check_header_compile
2635cat >config.log <<_ACEOF
2636This file contains any messages produced by compilers while
2637running configure, to aid debugging if configure makes a mistake.
2638
2639It was created by OpenJDK $as_me jdk8, which was
2640generated by GNU Autoconf 2.69.  Invocation command line was
2641
2642  $ $0 $@
2643
2644_ACEOF
2645exec 5>>config.log
2646{
2647cat <<_ASUNAME
2648## --------- ##
2649## Platform. ##
2650## --------- ##
2651
2652hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2653uname -m = `(uname -m) 2>/dev/null || echo unknown`
2654uname -r = `(uname -r) 2>/dev/null || echo unknown`
2655uname -s = `(uname -s) 2>/dev/null || echo unknown`
2656uname -v = `(uname -v) 2>/dev/null || echo unknown`
2657
2658/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2659/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2660
2661/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2662/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2663/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2664/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2665/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2666/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2667/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2668
2669_ASUNAME
2670
2671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2672for as_dir in $PATH
2673do
2674  IFS=$as_save_IFS
2675  test -z "$as_dir" && as_dir=.
2676    $as_echo "PATH: $as_dir"
2677  done
2678IFS=$as_save_IFS
2679
2680} >&5
2681
2682cat >&5 <<_ACEOF
2683
2684
2685## ----------- ##
2686## Core tests. ##
2687## ----------- ##
2688
2689_ACEOF
2690
2691
2692# Keep a trace of the command line.
2693# Strip out --no-create and --no-recursion so they do not pile up.
2694# Strip out --silent because we don't want to record it for future runs.
2695# Also quote any args containing shell meta-characters.
2696# Make two passes to allow for proper duplicate-argument suppression.
2697ac_configure_args=
2698ac_configure_args0=
2699ac_configure_args1=
2700ac_must_keep_next=false
2701for ac_pass in 1 2
2702do
2703  for ac_arg
2704  do
2705    case $ac_arg in
2706    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2707    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2708    | -silent | --silent | --silen | --sile | --sil)
2709      continue ;;
2710    *\'*)
2711      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2712    esac
2713    case $ac_pass in
2714    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2715    2)
2716      as_fn_append ac_configure_args1 " '$ac_arg'"
2717      if test $ac_must_keep_next = true; then
2718	ac_must_keep_next=false # Got value, back to normal.
2719      else
2720	case $ac_arg in
2721	  *=* | --config-cache | -C | -disable-* | --disable-* \
2722	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2723	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2724	  | -with-* | --with-* | -without-* | --without-* | --x)
2725	    case "$ac_configure_args0 " in
2726	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2727	    esac
2728	    ;;
2729	  -* ) ac_must_keep_next=true ;;
2730	esac
2731      fi
2732      as_fn_append ac_configure_args " '$ac_arg'"
2733      ;;
2734    esac
2735  done
2736done
2737{ ac_configure_args0=; unset ac_configure_args0;}
2738{ ac_configure_args1=; unset ac_configure_args1;}
2739
2740# When interrupted or exit'd, cleanup temporary files, and complete
2741# config.log.  We remove comments because anyway the quotes in there
2742# would cause problems or look ugly.
2743# WARNING: Use '\'' to represent an apostrophe within the trap.
2744# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2745trap 'exit_status=$?
2746  # Save into config.log some information that might help in debugging.
2747  {
2748    echo
2749
2750    $as_echo "## ---------------- ##
2751## Cache variables. ##
2752## ---------------- ##"
2753    echo
2754    # The following way of writing the cache mishandles newlines in values,
2755(
2756  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2757    eval ac_val=\$$ac_var
2758    case $ac_val in #(
2759    *${as_nl}*)
2760      case $ac_var in #(
2761      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2762$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2763      esac
2764      case $ac_var in #(
2765      _ | IFS | as_nl) ;; #(
2766      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2767      *) { eval $ac_var=; unset $ac_var;} ;;
2768      esac ;;
2769    esac
2770  done
2771  (set) 2>&1 |
2772    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2773    *${as_nl}ac_space=\ *)
2774      sed -n \
2775	"s/'\''/'\''\\\\'\'''\''/g;
2776	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2777      ;; #(
2778    *)
2779      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2780      ;;
2781    esac |
2782    sort
2783)
2784    echo
2785
2786    $as_echo "## ----------------- ##
2787## Output variables. ##
2788## ----------------- ##"
2789    echo
2790    for ac_var in $ac_subst_vars
2791    do
2792      eval ac_val=\$$ac_var
2793      case $ac_val in
2794      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2795      esac
2796      $as_echo "$ac_var='\''$ac_val'\''"
2797    done | sort
2798    echo
2799
2800    if test -n "$ac_subst_files"; then
2801      $as_echo "## ------------------- ##
2802## File substitutions. ##
2803## ------------------- ##"
2804      echo
2805      for ac_var in $ac_subst_files
2806      do
2807	eval ac_val=\$$ac_var
2808	case $ac_val in
2809	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2810	esac
2811	$as_echo "$ac_var='\''$ac_val'\''"
2812      done | sort
2813      echo
2814    fi
2815
2816    if test -s confdefs.h; then
2817      $as_echo "## ----------- ##
2818## confdefs.h. ##
2819## ----------- ##"
2820      echo
2821      cat confdefs.h
2822      echo
2823    fi
2824    test "$ac_signal" != 0 &&
2825      $as_echo "$as_me: caught signal $ac_signal"
2826    $as_echo "$as_me: exit $exit_status"
2827  } >&5
2828  rm -f core *.core core.conftest.* &&
2829    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2830    exit $exit_status
2831' 0
2832for ac_signal in 1 2 13 15; do
2833  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2834done
2835ac_signal=0
2836
2837# confdefs.h avoids OS command line length limits that DEFS can exceed.
2838rm -f -r conftest* confdefs.h
2839
2840$as_echo "/* confdefs.h */" > confdefs.h
2841
2842# Predefined preprocessor variables.
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_NAME "$PACKAGE_NAME"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2850_ACEOF
2851
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_VERSION "$PACKAGE_VERSION"
2854_ACEOF
2855
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_STRING "$PACKAGE_STRING"
2858_ACEOF
2859
2860cat >>confdefs.h <<_ACEOF
2861#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2862_ACEOF
2863
2864cat >>confdefs.h <<_ACEOF
2865#define PACKAGE_URL "$PACKAGE_URL"
2866_ACEOF
2867
2868
2869# Let the site file select an alternate cache file if it wants to.
2870# Prefer an explicitly selected file to automatically selected ones.
2871ac_site_file1=NONE
2872ac_site_file2=NONE
2873if test -n "$CONFIG_SITE"; then
2874  # We do not want a PATH search for config.site.
2875  case $CONFIG_SITE in #((
2876    -*)  ac_site_file1=./$CONFIG_SITE;;
2877    */*) ac_site_file1=$CONFIG_SITE;;
2878    *)   ac_site_file1=./$CONFIG_SITE;;
2879  esac
2880elif test "x$prefix" != xNONE; then
2881  ac_site_file1=$prefix/share/config.site
2882  ac_site_file2=$prefix/etc/config.site
2883else
2884  ac_site_file1=$ac_default_prefix/share/config.site
2885  ac_site_file2=$ac_default_prefix/etc/config.site
2886fi
2887for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2888do
2889  test "x$ac_site_file" = xNONE && continue
2890  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2891    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2892$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2893    sed 's/^/| /' "$ac_site_file" >&5
2894    . "$ac_site_file" \
2895      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2897as_fn_error $? "failed to load site script $ac_site_file
2898See \`config.log' for more details" "$LINENO" 5; }
2899  fi
2900done
2901
2902if test -r "$cache_file"; then
2903  # Some versions of bash will fail to source /dev/null (special files
2904  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2905  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2906    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2907$as_echo "$as_me: loading cache $cache_file" >&6;}
2908    case $cache_file in
2909      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2910      *)                      . "./$cache_file";;
2911    esac
2912  fi
2913else
2914  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2915$as_echo "$as_me: creating cache $cache_file" >&6;}
2916  >$cache_file
2917fi
2918
2919# Check that the precious variables saved in the cache have kept the same
2920# value.
2921ac_cache_corrupted=false
2922for ac_var in $ac_precious_vars; do
2923  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2924  eval ac_new_set=\$ac_env_${ac_var}_set
2925  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2926  eval ac_new_val=\$ac_env_${ac_var}_value
2927  case $ac_old_set,$ac_new_set in
2928    set,)
2929      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2930$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2931      ac_cache_corrupted=: ;;
2932    ,set)
2933      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2934$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2935      ac_cache_corrupted=: ;;
2936    ,);;
2937    *)
2938      if test "x$ac_old_val" != "x$ac_new_val"; then
2939	# differences in whitespace do not lead to failure.
2940	ac_old_val_w=`echo x $ac_old_val`
2941	ac_new_val_w=`echo x $ac_new_val`
2942	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2943	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2944$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2945	  ac_cache_corrupted=:
2946	else
2947	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2948$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2949	  eval $ac_var=\$ac_old_val
2950	fi
2951	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2952$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2953	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2954$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2955      fi;;
2956  esac
2957  # Pass precious variables to config.status.
2958  if test "$ac_new_set" = set; then
2959    case $ac_new_val in
2960    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2961    *) ac_arg=$ac_var=$ac_new_val ;;
2962    esac
2963    case " $ac_configure_args " in
2964      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2965      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2966    esac
2967  fi
2968done
2969if $ac_cache_corrupted; then
2970  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2972  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2973$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2974  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2975fi
2976## -------------------- ##
2977## Main body of script. ##
2978## -------------------- ##
2979
2980ac_ext=c
2981ac_cpp='$CPP $CPPFLAGS'
2982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2984ac_compiler_gnu=$ac_cv_c_compiler_gnu
2985
2986
2987
2988ac_aux_dir=
2989for ac_dir in build-aux "$srcdir"/build-aux; do
2990  if test -f "$ac_dir/install-sh"; then
2991    ac_aux_dir=$ac_dir
2992    ac_install_sh="$ac_aux_dir/install-sh -c"
2993    break
2994  elif test -f "$ac_dir/install.sh"; then
2995    ac_aux_dir=$ac_dir
2996    ac_install_sh="$ac_aux_dir/install.sh -c"
2997    break
2998  elif test -f "$ac_dir/shtool"; then
2999    ac_aux_dir=$ac_dir
3000    ac_install_sh="$ac_aux_dir/shtool install -c"
3001    break
3002  fi
3003done
3004if test -z "$ac_aux_dir"; then
3005  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3006fi
3007
3008# These three variables are undocumented and unsupported,
3009# and are intended to be withdrawn in a future Autoconf release.
3010# They can cause serious problems if a builder's source tree is in a directory
3011# whose full name contains unusual characters.
3012ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3013ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3014ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3015
3016
3017# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3018
3019#
3020# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3021# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3022#
3023# This code is free software; you can redistribute it and/or modify it
3024# under the terms of the GNU General Public License version 2 only, as
3025# published by the Free Software Foundation.  Oracle designates this
3026# particular file as subject to the "Classpath" exception as provided
3027# by Oracle in the LICENSE file that accompanied this code.
3028#
3029# This code is distributed in the hope that it will be useful, but WITHOUT
3030# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3031# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3032# version 2 for more details (a copy is included in the LICENSE file that
3033# accompanied this code).
3034#
3035# You should have received a copy of the GNU General Public License version
3036# 2 along with this work; if not, write to the Free Software Foundation,
3037# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3038#
3039# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3040# or visit www.oracle.com if you need additional information or have any
3041# questions.
3042#
3043
3044#
3045# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3046#
3047# This program is free software; you can redistribute it and/or modify
3048# it under the terms of the GNU General Public License as published by
3049# the Free Software Foundation; either version 2 of the License, or
3050# (at your option) any later version.
3051#
3052# This program is distributed in the hope that it will be useful, but
3053# WITHOUT ANY WARRANTY; without even the implied warranty of
3054# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3055# General Public License for more details.
3056#
3057# You should have received a copy of the GNU General Public License
3058# along with this program; if not, write to the Free Software
3059# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3060#
3061# As a special exception to the GNU General Public License, if you
3062# distribute this file as part of a program that contains a
3063# configuration script generated by Autoconf, you may include it under
3064# the same distribution terms that you use for the rest of that program.
3065
3066# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3067# ----------------------------------
3068# PKG_PROG_PKG_CONFIG
3069
3070# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3071#
3072# Check to see whether a particular set of modules exists.  Similar
3073# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3074#
3075#
3076# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3077# this or PKG_CHECK_MODULES is called, or make sure to call
3078# PKG_CHECK_EXISTS manually
3079# --------------------------------------------------------------
3080
3081
3082
3083# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3084# ---------------------------------------------
3085# _PKG_CONFIG
3086
3087# _PKG_SHORT_ERRORS_SUPPORTED
3088# -----------------------------
3089# _PKG_SHORT_ERRORS_SUPPORTED
3090
3091
3092# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3093# [ACTION-IF-NOT-FOUND])
3094#
3095#
3096# Note that if there is a possibility the first call to
3097# PKG_CHECK_MODULES might not happen, you should be sure to include an
3098# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3099#
3100#
3101# --------------------------------------------------------------
3102# PKG_CHECK_MODULES
3103
3104
3105# Include these first...
3106#
3107# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3108# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3109#
3110# This code is free software; you can redistribute it and/or modify it
3111# under the terms of the GNU General Public License version 2 only, as
3112# published by the Free Software Foundation.  Oracle designates this
3113# particular file as subject to the "Classpath" exception as provided
3114# by Oracle in the LICENSE file that accompanied this code.
3115#
3116# This code is distributed in the hope that it will be useful, but WITHOUT
3117# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3118# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3119# version 2 for more details (a copy is included in the LICENSE file that
3120# accompanied this code).
3121#
3122# You should have received a copy of the GNU General Public License version
3123# 2 along with this work; if not, write to the Free Software Foundation,
3124# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3125#
3126# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3127# or visit www.oracle.com if you need additional information or have any
3128# questions.
3129#
3130
3131# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3132# If so, then append $1 to $2 \
3133# Also set JVM_ARG_OK to true/false depending on outcome.
3134
3135
3136# Appends a string to a path variable, only adding the : when needed.
3137
3138
3139# This will make sure the given variable points to a full and proper
3140# path. This means:
3141# 1) There will be no spaces in the path. On posix platforms,
3142#    spaces in the path will result in an error. On Windows,
3143#    the path will be rewritten using short-style to be space-free.
3144# 2) The path will be absolute, and it will be in unix-style (on
3145#     cygwin).
3146# $1: The name of the variable to fix
3147
3148
3149# This will make sure the given variable points to a executable
3150# with a full and proper path. This means:
3151# 1) There will be no spaces in the path. On posix platforms,
3152#    spaces in the path will result in an error. On Windows,
3153#    the path will be rewritten using short-style to be space-free.
3154# 2) The path will be absolute, and it will be in unix-style (on
3155#     cygwin).
3156# Any arguments given to the executable is preserved.
3157# If the input variable does not have a directory specification, then
3158# it need to be in the PATH.
3159# $1: The name of the variable to fix
3160
3161
3162
3163
3164# Register a --with argument but mark it as deprecated
3165# $1: The name of the with argument to deprecate, not including --with-
3166
3167
3168# Register a --enable argument but mark it as deprecated
3169# $1: The name of the with argument to deprecate, not including --enable-
3170# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3171
3172
3173
3174
3175# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3176# $1: variable to check
3177# $2: executable name to print in warning (optional)
3178
3179
3180# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3181# Arguments as AC_PATH_PROG:
3182# $1: variable to set
3183# $2: executable name to look for
3184
3185
3186# Setup the most fundamental tools that relies on not much else to set up,
3187# but is used by much of the early bootstrap code.
3188
3189
3190# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3191
3192
3193
3194
3195
3196
3197
3198#%%% Simple tools %%%
3199
3200# Check if we have found a usable version of make
3201# $1: the path to a potential make binary (or empty)
3202# $2: the description on how we found this
3203
3204
3205# Goes looking for a usable version of GNU make.
3206
3207
3208
3209
3210
3211
3212# Check if build directory is on local disk. If not possible to determine,
3213# we prefer to claim it's local.
3214# Argument 1: directory to test
3215# Argument 2: what to do if it is on local disk
3216# Argument 3: what to do otherwise (remote disk or failure)
3217
3218
3219# Check that source files have basic read permissions set. This might
3220# not be the case in cygwin in certain conditions.
3221
3222
3223
3224
3225#
3226# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3228#
3229# This code is free software; you can redistribute it and/or modify it
3230# under the terms of the GNU General Public License version 2 only, as
3231# published by the Free Software Foundation.  Oracle designates this
3232# particular file as subject to the "Classpath" exception as provided
3233# by Oracle in the LICENSE file that accompanied this code.
3234#
3235# This code is distributed in the hope that it will be useful, but WITHOUT
3236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3238# version 2 for more details (a copy is included in the LICENSE file that
3239# accompanied this code).
3240#
3241# You should have received a copy of the GNU General Public License version
3242# 2 along with this work; if not, write to the Free Software Foundation,
3243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3244#
3245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3246# or visit www.oracle.com if you need additional information or have any
3247# questions.
3248#
3249
3250
3251
3252
3253
3254# Helper function which possibly converts a path using DOS-style short mode.
3255# If so, the updated path is stored in $new_path.
3256# $1: The path to check
3257
3258
3259# Helper function which possibly converts a path using DOS-style short mode.
3260# If so, the updated path is stored in $new_path.
3261# $1: The path to check
3262
3263
3264# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3265# and could probably be heavily simplified. However, all changes in this
3266# area tend to need lot of testing in different scenarios, and in lack of
3267# proper unit testing, cleaning this up has not been deemed worth the effort
3268# at the moment.
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3279
3280
3281
3282
3283#
3284# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3285# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3286#
3287# This code is free software; you can redistribute it and/or modify it
3288# under the terms of the GNU General Public License version 2 only, as
3289# published by the Free Software Foundation.  Oracle designates this
3290# particular file as subject to the "Classpath" exception as provided
3291# by Oracle in the LICENSE file that accompanied this code.
3292#
3293# This code is distributed in the hope that it will be useful, but WITHOUT
3294# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3295# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3296# version 2 for more details (a copy is included in the LICENSE file that
3297# accompanied this code).
3298#
3299# You should have received a copy of the GNU General Public License version
3300# 2 along with this work; if not, write to the Free Software Foundation,
3301# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3302#
3303# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3304# or visit www.oracle.com if you need additional information or have any
3305# questions.
3306#
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318# ... then the rest
3319#
3320# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3321# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3322#
3323# This code is free software; you can redistribute it and/or modify it
3324# under the terms of the GNU General Public License version 2 only, as
3325# published by the Free Software Foundation.  Oracle designates this
3326# particular file as subject to the "Classpath" exception as provided
3327# by Oracle in the LICENSE file that accompanied this code.
3328#
3329# This code is distributed in the hope that it will be useful, but WITHOUT
3330# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3331# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3332# version 2 for more details (a copy is included in the LICENSE file that
3333# accompanied this code).
3334#
3335# You should have received a copy of the GNU General Public License version
3336# 2 along with this work; if not, write to the Free Software Foundation,
3337# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3338#
3339# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3340# or visit www.oracle.com if you need additional information or have any
3341# questions.
3342#
3343
3344# Execute the check given as argument, and verify the result
3345# If the Boot JDK was previously found, do nothing
3346# $1 A command line (typically autoconf macro) to execute
3347
3348
3349# Test: Is bootjdk explicitely set by command line arguments?
3350
3351
3352# Test: Is bootjdk available from builddeps?
3353
3354
3355# Test: Is $JAVA_HOME set?
3356
3357
3358# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3359
3360
3361# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3362
3363
3364# Look for a jdk in the given path. If there are multiple, try to select the newest.
3365# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3366# $1 = Path to directory containing jdk installations.
3367# $2 = String to append to the found JDK directory to get the proper JDK home
3368
3369
3370# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3371# environmental variable as base for where to look.
3372# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3373
3374
3375# Test: Is there a JDK installed in default, well-known locations?
3376
3377
3378# Check that a command-line tool in the Boot JDK is correct
3379# $1 = name of variable to assign
3380# $2 = name of binary
3381
3382
3383###############################################################################
3384#
3385# We need a Boot JDK to bootstrap the build.
3386#
3387
3388
3389
3390
3391
3392#
3393# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3394# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3395#
3396# This code is free software; you can redistribute it and/or modify it
3397# under the terms of the GNU General Public License version 2 only, as
3398# published by the Free Software Foundation.  Oracle designates this
3399# particular file as subject to the "Classpath" exception as provided
3400# by Oracle in the LICENSE file that accompanied this code.
3401#
3402# This code is distributed in the hope that it will be useful, but WITHOUT
3403# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3404# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3405# version 2 for more details (a copy is included in the LICENSE file that
3406# accompanied this code).
3407#
3408# You should have received a copy of the GNU General Public License version
3409# 2 along with this work; if not, write to the Free Software Foundation,
3410# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3411#
3412# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3413# or visit www.oracle.com if you need additional information or have any
3414# questions.
3415#
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436#
3437# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3438# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3439#
3440# This code is free software; you can redistribute it and/or modify it
3441# under the terms of the GNU General Public License version 2 only, as
3442# published by the Free Software Foundation.  Oracle designates this
3443# particular file as subject to the "Classpath" exception as provided
3444# by Oracle in the LICENSE file that accompanied this code.
3445#
3446# This code is distributed in the hope that it will be useful, but WITHOUT
3447# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3448# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3449# version 2 for more details (a copy is included in the LICENSE file that
3450# accompanied this code).
3451#
3452# You should have received a copy of the GNU General Public License version
3453# 2 along with this work; if not, write to the Free Software Foundation,
3454# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3455#
3456# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3457# or visit www.oracle.com if you need additional information or have any
3458# questions.
3459#
3460
3461
3462
3463
3464
3465cygwin_help() {
3466  case $1 in
3467    unzip)
3468      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3469      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3470      ;;
3471    zip)
3472      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3473      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3474      ;;
3475    make)
3476      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3478      ;;
3479    freetype)
3480      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3481        HELP_MSG="To install freetype, run:
3482wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3483chmod +x /tmp/freetype-setup.exe
3484/tmp/freetype-setup.exe
3485Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3486After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3487      else
3488        HELP_MSG="You need to build a 64-bit version of freetype.
3489This is not readily available.
3490You can find source code and build instructions on
3491http://www.freetype.org/
3492If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3493      fi
3494      ;;
3495  esac
3496}
3497
3498msys_help() {
3499  PKGHANDLER_COMMAND=""
3500}
3501
3502apt_help() {
3503  case $1 in
3504    devkit)
3505      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3506    openjdk)
3507      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3508    alsa)
3509      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3510    cups)
3511      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3512    freetype)
3513      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3514    pulse)
3515      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3516    x11)
3517      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3518    ccache)
3519      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3520  esac
3521}
3522
3523yum_help() {
3524  case $1 in
3525    devkit)
3526      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3527    openjdk)
3528      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3529    alsa)
3530      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3531    cups)
3532      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3533    freetype)
3534      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3535    pulse)
3536      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3537    x11)
3538      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3539    ccache)
3540      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3541  esac
3542}
3543
3544port_help() {
3545  PKGHANDLER_COMMAND=""
3546}
3547
3548pkgutil_help() {
3549  PKGHANDLER_COMMAND=""
3550}
3551
3552pkgadd_help() {
3553  PKGHANDLER_COMMAND=""
3554}
3555
3556
3557
3558#
3559# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3560# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561#
3562# This code is free software; you can redistribute it and/or modify it
3563# under the terms of the GNU General Public License version 2 only, as
3564# published by the Free Software Foundation.  Oracle designates this
3565# particular file as subject to the "Classpath" exception as provided
3566# by Oracle in the LICENSE file that accompanied this code.
3567#
3568# This code is distributed in the hope that it will be useful, but WITHOUT
3569# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571# version 2 for more details (a copy is included in the LICENSE file that
3572# accompanied this code).
3573#
3574# You should have received a copy of the GNU General Public License version
3575# 2 along with this work; if not, write to the Free Software Foundation,
3576# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577#
3578# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579# or visit www.oracle.com if you need additional information or have any
3580# questions.
3581#
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592###############################################################################
3593#
3594# Should we build only OpenJDK even if closed sources are present?
3595#
3596
3597
3598
3599
3600###############################################################################
3601#
3602# Setup version numbers
3603#
3604
3605
3606
3607
3608
3609
3610# Support for customization of the build process. Some build files
3611# will include counterparts from this location, if they exist. This allows
3612# for a degree of customization of the build targets and the rules/recipes
3613# to create them
3614
3615# Check whether --with-custom-make-dir was given.
3616if test "${with_custom_make_dir+set}" = set; then :
3617  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3618fi
3619
3620
3621
3622#
3623# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3625#
3626# This code is free software; you can redistribute it and/or modify it
3627# under the terms of the GNU General Public License version 2 only, as
3628# published by the Free Software Foundation.  Oracle designates this
3629# particular file as subject to the "Classpath" exception as provided
3630# by Oracle in the LICENSE file that accompanied this code.
3631#
3632# This code is distributed in the hope that it will be useful, but WITHOUT
3633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3635# version 2 for more details (a copy is included in the LICENSE file that
3636# accompanied this code).
3637#
3638# You should have received a copy of the GNU General Public License version
3639# 2 along with this work; if not, write to the Free Software Foundation,
3640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3641#
3642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3643# or visit www.oracle.com if you need additional information or have any
3644# questions.
3645#
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663#
3664# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3665# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3666#
3667# This code is free software; you can redistribute it and/or modify it
3668# under the terms of the GNU General Public License version 2 only, as
3669# published by the Free Software Foundation.  Oracle designates this
3670# particular file as subject to the "Classpath" exception as provided
3671# by Oracle in the LICENSE file that accompanied this code.
3672#
3673# This code is distributed in the hope that it will be useful, but WITHOUT
3674# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3675# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3676# version 2 for more details (a copy is included in the LICENSE file that
3677# accompanied this code).
3678#
3679# You should have received a copy of the GNU General Public License version
3680# 2 along with this work; if not, write to the Free Software Foundation,
3681# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3682#
3683# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3684# or visit www.oracle.com if you need additional information or have any
3685# questions.
3686#
3687
3688# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3689# Converts autoconf style CPU name to OpenJDK style, into
3690# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3691
3692
3693# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3694# Converts autoconf style OS name to OpenJDK style, into
3695# VAR_OS and VAR_OS_API.
3696
3697
3698# Expects $host_os $host_cpu $build_os and $build_cpu
3699# and $with_target_bits to have been setup!
3700#
3701# Translate the standard triplet(quadruplet) definition
3702# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3703# OPENJDK_BUILD_OS, etc.
3704
3705
3706# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3707# accordingly. Must be done after setting up build and target system, but before
3708# doing anything else with these values.
3709
3710
3711# Setup the legacy variables, for controlling the old makefiles.
3712#
3713
3714
3715
3716
3717#%%% Build and target systems %%%
3718
3719
3720
3721
3722# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3723# Add -mX to various FLAGS variables.
3724
3725
3726
3727
3728
3729
3730#
3731# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759
3760
3761
3762#
3763# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787# $1 = compiler to test (CC or CXX)
3788# $2 = human readable name of compiler (C or C++)
3789
3790
3791
3792
3793
3794# $1 = compiler to test (CC or CXX)
3795# $2 = human readable name of compiler (C or C++)
3796# $3 = list of compiler names to search for
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3811#                                   [RUN-IF-FALSE])
3812# ------------------------------------------------------------
3813# Check that the c and c++ compilers support an argument
3814
3815
3816
3817
3818# Setup the JTREG paths
3819
3820
3821#
3822# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824#
3825# This code is free software; you can redistribute it and/or modify it
3826# under the terms of the GNU General Public License version 2 only, as
3827# published by the Free Software Foundation.  Oracle designates this
3828# particular file as subject to the "Classpath" exception as provided
3829# by Oracle in the LICENSE file that accompanied this code.
3830#
3831# This code is distributed in the hope that it will be useful, but WITHOUT
3832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834# version 2 for more details (a copy is included in the LICENSE file that
3835# accompanied this code).
3836#
3837# You should have received a copy of the GNU General Public License version
3838# 2 along with this work; if not, write to the Free Software Foundation,
3839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840#
3841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842# or visit www.oracle.com if you need additional information or have any
3843# questions.
3844#
3845
3846
3847
3848
3849
3850
3851
3852# Check if the VS env variables were setup prior to running configure.
3853# If not, then find vcvarsall.bat and run it automatically, and integrate
3854# the set env variables into the spec file.
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865# This line needs to be here, verbatim, after all includes and the dummy hook
3866# definitions. It is replaced with custom functionality when building
3867# custom sources.
3868#CUSTOM_AUTOCONF_INCLUDE
3869
3870# Do not change or remove the following line, it is needed for consistency checks:
3871DATE_WHEN_GENERATED=1390429099
3872
3873###############################################################################
3874#
3875# Initialization / Boot-strapping
3876#
3877# The bootstrapping process needs to solve the "chicken or the egg" problem,
3878# thus it jumps back and forth, each time gaining something needed later on.
3879#
3880###############################################################################
3881
3882# Basic initialization that must happen first of all
3883
3884  # Save the original command line. This is passed to us by the wrapper configure script.
3885
3886  DATE_WHEN_CONFIGURED=`LANG=C date`
3887
3888  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3889$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3890  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3891$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3892
3893
3894
3895  # Start with tools that do not need have cross compilation support
3896  # and can be expected to be found in the default PATH. These tools are
3897  # used by configure. Nor are these tools expected to be found in the
3898  # devkit from the builddeps server either, since they are
3899  # needed to download the devkit.
3900
3901  # First are all the simple required tools.
3902
3903  for ac_prog in basename
3904do
3905  # Extract the first word of "$ac_prog", so it can be a program name with args.
3906set dummy $ac_prog; ac_word=$2
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908$as_echo_n "checking for $ac_word... " >&6; }
3909if ${ac_cv_path_BASENAME+:} false; then :
3910  $as_echo_n "(cached) " >&6
3911else
3912  case $BASENAME in
3913  [\\/]* | ?:[\\/]*)
3914  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3915  ;;
3916  *)
3917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3918for as_dir in $PATH
3919do
3920  IFS=$as_save_IFS
3921  test -z "$as_dir" && as_dir=.
3922    for ac_exec_ext in '' $ac_executable_extensions; do
3923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3924    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3926    break 2
3927  fi
3928done
3929  done
3930IFS=$as_save_IFS
3931
3932  ;;
3933esac
3934fi
3935BASENAME=$ac_cv_path_BASENAME
3936if test -n "$BASENAME"; then
3937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3938$as_echo "$BASENAME" >&6; }
3939else
3940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941$as_echo "no" >&6; }
3942fi
3943
3944
3945  test -n "$BASENAME" && break
3946done
3947
3948
3949  if test "x$BASENAME" = x; then
3950    if test "xbasename" = x; then
3951      PROG_NAME=basename
3952    else
3953      PROG_NAME=basename
3954    fi
3955    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3956$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3957    as_fn_error $? "Cannot continue" "$LINENO" 5
3958  fi
3959
3960
3961
3962  for ac_prog in bash
3963do
3964  # Extract the first word of "$ac_prog", so it can be a program name with args.
3965set dummy $ac_prog; ac_word=$2
3966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967$as_echo_n "checking for $ac_word... " >&6; }
3968if ${ac_cv_path_BASH+:} false; then :
3969  $as_echo_n "(cached) " >&6
3970else
3971  case $BASH in
3972  [\\/]* | ?:[\\/]*)
3973  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3974  ;;
3975  *)
3976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3977for as_dir in $PATH
3978do
3979  IFS=$as_save_IFS
3980  test -z "$as_dir" && as_dir=.
3981    for ac_exec_ext in '' $ac_executable_extensions; do
3982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3983    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3985    break 2
3986  fi
3987done
3988  done
3989IFS=$as_save_IFS
3990
3991  ;;
3992esac
3993fi
3994BASH=$ac_cv_path_BASH
3995if test -n "$BASH"; then
3996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3997$as_echo "$BASH" >&6; }
3998else
3999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000$as_echo "no" >&6; }
4001fi
4002
4003
4004  test -n "$BASH" && break
4005done
4006
4007
4008  if test "x$BASH" = x; then
4009    if test "xbash" = x; then
4010      PROG_NAME=bash
4011    else
4012      PROG_NAME=bash
4013    fi
4014    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4015$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4016    as_fn_error $? "Cannot continue" "$LINENO" 5
4017  fi
4018
4019
4020
4021  for ac_prog in cat
4022do
4023  # Extract the first word of "$ac_prog", so it can be a program name with args.
4024set dummy $ac_prog; ac_word=$2
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026$as_echo_n "checking for $ac_word... " >&6; }
4027if ${ac_cv_path_CAT+:} false; then :
4028  $as_echo_n "(cached) " >&6
4029else
4030  case $CAT in
4031  [\\/]* | ?:[\\/]*)
4032  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4033  ;;
4034  *)
4035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4036for as_dir in $PATH
4037do
4038  IFS=$as_save_IFS
4039  test -z "$as_dir" && as_dir=.
4040    for ac_exec_ext in '' $ac_executable_extensions; do
4041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4042    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4044    break 2
4045  fi
4046done
4047  done
4048IFS=$as_save_IFS
4049
4050  ;;
4051esac
4052fi
4053CAT=$ac_cv_path_CAT
4054if test -n "$CAT"; then
4055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4056$as_echo "$CAT" >&6; }
4057else
4058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059$as_echo "no" >&6; }
4060fi
4061
4062
4063  test -n "$CAT" && break
4064done
4065
4066
4067  if test "x$CAT" = x; then
4068    if test "xcat" = x; then
4069      PROG_NAME=cat
4070    else
4071      PROG_NAME=cat
4072    fi
4073    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4075    as_fn_error $? "Cannot continue" "$LINENO" 5
4076  fi
4077
4078
4079
4080  for ac_prog in chmod
4081do
4082  # Extract the first word of "$ac_prog", so it can be a program name with args.
4083set dummy $ac_prog; ac_word=$2
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4085$as_echo_n "checking for $ac_word... " >&6; }
4086if ${ac_cv_path_CHMOD+:} false; then :
4087  $as_echo_n "(cached) " >&6
4088else
4089  case $CHMOD in
4090  [\\/]* | ?:[\\/]*)
4091  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4092  ;;
4093  *)
4094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4095for as_dir in $PATH
4096do
4097  IFS=$as_save_IFS
4098  test -z "$as_dir" && as_dir=.
4099    for ac_exec_ext in '' $ac_executable_extensions; do
4100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4101    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4103    break 2
4104  fi
4105done
4106  done
4107IFS=$as_save_IFS
4108
4109  ;;
4110esac
4111fi
4112CHMOD=$ac_cv_path_CHMOD
4113if test -n "$CHMOD"; then
4114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4115$as_echo "$CHMOD" >&6; }
4116else
4117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4118$as_echo "no" >&6; }
4119fi
4120
4121
4122  test -n "$CHMOD" && break
4123done
4124
4125
4126  if test "x$CHMOD" = x; then
4127    if test "xchmod" = x; then
4128      PROG_NAME=chmod
4129    else
4130      PROG_NAME=chmod
4131    fi
4132    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4134    as_fn_error $? "Cannot continue" "$LINENO" 5
4135  fi
4136
4137
4138
4139  for ac_prog in cmp
4140do
4141  # Extract the first word of "$ac_prog", so it can be a program name with args.
4142set dummy $ac_prog; ac_word=$2
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144$as_echo_n "checking for $ac_word... " >&6; }
4145if ${ac_cv_path_CMP+:} false; then :
4146  $as_echo_n "(cached) " >&6
4147else
4148  case $CMP in
4149  [\\/]* | ?:[\\/]*)
4150  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4151  ;;
4152  *)
4153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154for as_dir in $PATH
4155do
4156  IFS=$as_save_IFS
4157  test -z "$as_dir" && as_dir=.
4158    for ac_exec_ext in '' $ac_executable_extensions; do
4159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4160    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4162    break 2
4163  fi
4164done
4165  done
4166IFS=$as_save_IFS
4167
4168  ;;
4169esac
4170fi
4171CMP=$ac_cv_path_CMP
4172if test -n "$CMP"; then
4173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4174$as_echo "$CMP" >&6; }
4175else
4176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4177$as_echo "no" >&6; }
4178fi
4179
4180
4181  test -n "$CMP" && break
4182done
4183
4184
4185  if test "x$CMP" = x; then
4186    if test "xcmp" = x; then
4187      PROG_NAME=cmp
4188    else
4189      PROG_NAME=cmp
4190    fi
4191    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4193    as_fn_error $? "Cannot continue" "$LINENO" 5
4194  fi
4195
4196
4197
4198  for ac_prog in comm
4199do
4200  # Extract the first word of "$ac_prog", so it can be a program name with args.
4201set dummy $ac_prog; ac_word=$2
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4203$as_echo_n "checking for $ac_word... " >&6; }
4204if ${ac_cv_path_COMM+:} false; then :
4205  $as_echo_n "(cached) " >&6
4206else
4207  case $COMM in
4208  [\\/]* | ?:[\\/]*)
4209  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4210  ;;
4211  *)
4212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215  IFS=$as_save_IFS
4216  test -z "$as_dir" && as_dir=.
4217    for ac_exec_ext in '' $ac_executable_extensions; do
4218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4219    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4221    break 2
4222  fi
4223done
4224  done
4225IFS=$as_save_IFS
4226
4227  ;;
4228esac
4229fi
4230COMM=$ac_cv_path_COMM
4231if test -n "$COMM"; then
4232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4233$as_echo "$COMM" >&6; }
4234else
4235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4236$as_echo "no" >&6; }
4237fi
4238
4239
4240  test -n "$COMM" && break
4241done
4242
4243
4244  if test "x$COMM" = x; then
4245    if test "xcomm" = x; then
4246      PROG_NAME=comm
4247    else
4248      PROG_NAME=comm
4249    fi
4250    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4251$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4252    as_fn_error $? "Cannot continue" "$LINENO" 5
4253  fi
4254
4255
4256
4257  for ac_prog in cp
4258do
4259  # Extract the first word of "$ac_prog", so it can be a program name with args.
4260set dummy $ac_prog; ac_word=$2
4261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4262$as_echo_n "checking for $ac_word... " >&6; }
4263if ${ac_cv_path_CP+:} false; then :
4264  $as_echo_n "(cached) " >&6
4265else
4266  case $CP in
4267  [\\/]* | ?:[\\/]*)
4268  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4269  ;;
4270  *)
4271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274  IFS=$as_save_IFS
4275  test -z "$as_dir" && as_dir=.
4276    for ac_exec_ext in '' $ac_executable_extensions; do
4277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4278    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4280    break 2
4281  fi
4282done
4283  done
4284IFS=$as_save_IFS
4285
4286  ;;
4287esac
4288fi
4289CP=$ac_cv_path_CP
4290if test -n "$CP"; then
4291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4292$as_echo "$CP" >&6; }
4293else
4294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4295$as_echo "no" >&6; }
4296fi
4297
4298
4299  test -n "$CP" && break
4300done
4301
4302
4303  if test "x$CP" = x; then
4304    if test "xcp" = x; then
4305      PROG_NAME=cp
4306    else
4307      PROG_NAME=cp
4308    fi
4309    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4310$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4311    as_fn_error $? "Cannot continue" "$LINENO" 5
4312  fi
4313
4314
4315
4316  for ac_prog in cpio
4317do
4318  # Extract the first word of "$ac_prog", so it can be a program name with args.
4319set dummy $ac_prog; ac_word=$2
4320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4321$as_echo_n "checking for $ac_word... " >&6; }
4322if ${ac_cv_path_CPIO+:} false; then :
4323  $as_echo_n "(cached) " >&6
4324else
4325  case $CPIO in
4326  [\\/]* | ?:[\\/]*)
4327  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4328  ;;
4329  *)
4330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4331for as_dir in $PATH
4332do
4333  IFS=$as_save_IFS
4334  test -z "$as_dir" && as_dir=.
4335    for ac_exec_ext in '' $ac_executable_extensions; do
4336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4337    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4339    break 2
4340  fi
4341done
4342  done
4343IFS=$as_save_IFS
4344
4345  ;;
4346esac
4347fi
4348CPIO=$ac_cv_path_CPIO
4349if test -n "$CPIO"; then
4350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4351$as_echo "$CPIO" >&6; }
4352else
4353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4354$as_echo "no" >&6; }
4355fi
4356
4357
4358  test -n "$CPIO" && break
4359done
4360
4361
4362  if test "x$CPIO" = x; then
4363    if test "xcpio" = x; then
4364      PROG_NAME=cpio
4365    else
4366      PROG_NAME=cpio
4367    fi
4368    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4369$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4370    as_fn_error $? "Cannot continue" "$LINENO" 5
4371  fi
4372
4373
4374
4375  for ac_prog in cut
4376do
4377  # Extract the first word of "$ac_prog", so it can be a program name with args.
4378set dummy $ac_prog; ac_word=$2
4379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4380$as_echo_n "checking for $ac_word... " >&6; }
4381if ${ac_cv_path_CUT+:} false; then :
4382  $as_echo_n "(cached) " >&6
4383else
4384  case $CUT in
4385  [\\/]* | ?:[\\/]*)
4386  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4387  ;;
4388  *)
4389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH
4391do
4392  IFS=$as_save_IFS
4393  test -z "$as_dir" && as_dir=.
4394    for ac_exec_ext in '' $ac_executable_extensions; do
4395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4396    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4398    break 2
4399  fi
4400done
4401  done
4402IFS=$as_save_IFS
4403
4404  ;;
4405esac
4406fi
4407CUT=$ac_cv_path_CUT
4408if test -n "$CUT"; then
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4410$as_echo "$CUT" >&6; }
4411else
4412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4413$as_echo "no" >&6; }
4414fi
4415
4416
4417  test -n "$CUT" && break
4418done
4419
4420
4421  if test "x$CUT" = x; then
4422    if test "xcut" = x; then
4423      PROG_NAME=cut
4424    else
4425      PROG_NAME=cut
4426    fi
4427    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4428$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4429    as_fn_error $? "Cannot continue" "$LINENO" 5
4430  fi
4431
4432
4433
4434  for ac_prog in date
4435do
4436  # Extract the first word of "$ac_prog", so it can be a program name with args.
4437set dummy $ac_prog; ac_word=$2
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439$as_echo_n "checking for $ac_word... " >&6; }
4440if ${ac_cv_path_DATE+:} false; then :
4441  $as_echo_n "(cached) " >&6
4442else
4443  case $DATE in
4444  [\\/]* | ?:[\\/]*)
4445  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4446  ;;
4447  *)
4448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449for as_dir in $PATH
4450do
4451  IFS=$as_save_IFS
4452  test -z "$as_dir" && as_dir=.
4453    for ac_exec_ext in '' $ac_executable_extensions; do
4454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4455    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4457    break 2
4458  fi
4459done
4460  done
4461IFS=$as_save_IFS
4462
4463  ;;
4464esac
4465fi
4466DATE=$ac_cv_path_DATE
4467if test -n "$DATE"; then
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4469$as_echo "$DATE" >&6; }
4470else
4471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4472$as_echo "no" >&6; }
4473fi
4474
4475
4476  test -n "$DATE" && break
4477done
4478
4479
4480  if test "x$DATE" = x; then
4481    if test "xdate" = x; then
4482      PROG_NAME=date
4483    else
4484      PROG_NAME=date
4485    fi
4486    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4487$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4488    as_fn_error $? "Cannot continue" "$LINENO" 5
4489  fi
4490
4491
4492
4493  for ac_prog in gdiff diff
4494do
4495  # Extract the first word of "$ac_prog", so it can be a program name with args.
4496set dummy $ac_prog; ac_word=$2
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498$as_echo_n "checking for $ac_word... " >&6; }
4499if ${ac_cv_path_DIFF+:} false; then :
4500  $as_echo_n "(cached) " >&6
4501else
4502  case $DIFF in
4503  [\\/]* | ?:[\\/]*)
4504  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4505  ;;
4506  *)
4507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH
4509do
4510  IFS=$as_save_IFS
4511  test -z "$as_dir" && as_dir=.
4512    for ac_exec_ext in '' $ac_executable_extensions; do
4513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4514    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4516    break 2
4517  fi
4518done
4519  done
4520IFS=$as_save_IFS
4521
4522  ;;
4523esac
4524fi
4525DIFF=$ac_cv_path_DIFF
4526if test -n "$DIFF"; then
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4528$as_echo "$DIFF" >&6; }
4529else
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4531$as_echo "no" >&6; }
4532fi
4533
4534
4535  test -n "$DIFF" && break
4536done
4537
4538
4539  if test "x$DIFF" = x; then
4540    if test "xgdiff diff" = x; then
4541      PROG_NAME=diff
4542    else
4543      PROG_NAME=gdiff diff
4544    fi
4545    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4546$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4547    as_fn_error $? "Cannot continue" "$LINENO" 5
4548  fi
4549
4550
4551
4552  for ac_prog in dirname
4553do
4554  # Extract the first word of "$ac_prog", so it can be a program name with args.
4555set dummy $ac_prog; ac_word=$2
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557$as_echo_n "checking for $ac_word... " >&6; }
4558if ${ac_cv_path_DIRNAME+:} false; then :
4559  $as_echo_n "(cached) " >&6
4560else
4561  case $DIRNAME in
4562  [\\/]* | ?:[\\/]*)
4563  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4564  ;;
4565  *)
4566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in $PATH
4568do
4569  IFS=$as_save_IFS
4570  test -z "$as_dir" && as_dir=.
4571    for ac_exec_ext in '' $ac_executable_extensions; do
4572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4573    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575    break 2
4576  fi
4577done
4578  done
4579IFS=$as_save_IFS
4580
4581  ;;
4582esac
4583fi
4584DIRNAME=$ac_cv_path_DIRNAME
4585if test -n "$DIRNAME"; then
4586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4587$as_echo "$DIRNAME" >&6; }
4588else
4589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590$as_echo "no" >&6; }
4591fi
4592
4593
4594  test -n "$DIRNAME" && break
4595done
4596
4597
4598  if test "x$DIRNAME" = x; then
4599    if test "xdirname" = x; then
4600      PROG_NAME=dirname
4601    else
4602      PROG_NAME=dirname
4603    fi
4604    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4605$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4606    as_fn_error $? "Cannot continue" "$LINENO" 5
4607  fi
4608
4609
4610
4611  for ac_prog in echo
4612do
4613  # Extract the first word of "$ac_prog", so it can be a program name with args.
4614set dummy $ac_prog; ac_word=$2
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
4617if ${ac_cv_path_ECHO+:} false; then :
4618  $as_echo_n "(cached) " >&6
4619else
4620  case $ECHO in
4621  [\\/]* | ?:[\\/]*)
4622  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4623  ;;
4624  *)
4625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626for as_dir in $PATH
4627do
4628  IFS=$as_save_IFS
4629  test -z "$as_dir" && as_dir=.
4630    for ac_exec_ext in '' $ac_executable_extensions; do
4631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634    break 2
4635  fi
4636done
4637  done
4638IFS=$as_save_IFS
4639
4640  ;;
4641esac
4642fi
4643ECHO=$ac_cv_path_ECHO
4644if test -n "$ECHO"; then
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4646$as_echo "$ECHO" >&6; }
4647else
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649$as_echo "no" >&6; }
4650fi
4651
4652
4653  test -n "$ECHO" && break
4654done
4655
4656
4657  if test "x$ECHO" = x; then
4658    if test "xecho" = x; then
4659      PROG_NAME=echo
4660    else
4661      PROG_NAME=echo
4662    fi
4663    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4664$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4665    as_fn_error $? "Cannot continue" "$LINENO" 5
4666  fi
4667
4668
4669
4670  for ac_prog in expr
4671do
4672  # Extract the first word of "$ac_prog", so it can be a program name with args.
4673set dummy $ac_prog; ac_word=$2
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
4676if ${ac_cv_path_EXPR+:} false; then :
4677  $as_echo_n "(cached) " >&6
4678else
4679  case $EXPR in
4680  [\\/]* | ?:[\\/]*)
4681  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4682  ;;
4683  *)
4684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in $PATH
4686do
4687  IFS=$as_save_IFS
4688  test -z "$as_dir" && as_dir=.
4689    for ac_exec_ext in '' $ac_executable_extensions; do
4690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693    break 2
4694  fi
4695done
4696  done
4697IFS=$as_save_IFS
4698
4699  ;;
4700esac
4701fi
4702EXPR=$ac_cv_path_EXPR
4703if test -n "$EXPR"; then
4704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4705$as_echo "$EXPR" >&6; }
4706else
4707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711
4712  test -n "$EXPR" && break
4713done
4714
4715
4716  if test "x$EXPR" = x; then
4717    if test "xexpr" = x; then
4718      PROG_NAME=expr
4719    else
4720      PROG_NAME=expr
4721    fi
4722    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4723$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4724    as_fn_error $? "Cannot continue" "$LINENO" 5
4725  fi
4726
4727
4728
4729  for ac_prog in file
4730do
4731  # Extract the first word of "$ac_prog", so it can be a program name with args.
4732set dummy $ac_prog; ac_word=$2
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734$as_echo_n "checking for $ac_word... " >&6; }
4735if ${ac_cv_path_FILE+:} false; then :
4736  $as_echo_n "(cached) " >&6
4737else
4738  case $FILE in
4739  [\\/]* | ?:[\\/]*)
4740  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4741  ;;
4742  *)
4743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746  IFS=$as_save_IFS
4747  test -z "$as_dir" && as_dir=.
4748    for ac_exec_ext in '' $ac_executable_extensions; do
4749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4750    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4752    break 2
4753  fi
4754done
4755  done
4756IFS=$as_save_IFS
4757
4758  ;;
4759esac
4760fi
4761FILE=$ac_cv_path_FILE
4762if test -n "$FILE"; then
4763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4764$as_echo "$FILE" >&6; }
4765else
4766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767$as_echo "no" >&6; }
4768fi
4769
4770
4771  test -n "$FILE" && break
4772done
4773
4774
4775  if test "x$FILE" = x; then
4776    if test "xfile" = x; then
4777      PROG_NAME=file
4778    else
4779      PROG_NAME=file
4780    fi
4781    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4782$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4783    as_fn_error $? "Cannot continue" "$LINENO" 5
4784  fi
4785
4786
4787
4788  for ac_prog in find
4789do
4790  # Extract the first word of "$ac_prog", so it can be a program name with args.
4791set dummy $ac_prog; ac_word=$2
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793$as_echo_n "checking for $ac_word... " >&6; }
4794if ${ac_cv_path_FIND+:} false; then :
4795  $as_echo_n "(cached) " >&6
4796else
4797  case $FIND in
4798  [\\/]* | ?:[\\/]*)
4799  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4800  ;;
4801  *)
4802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4803for as_dir in $PATH
4804do
4805  IFS=$as_save_IFS
4806  test -z "$as_dir" && as_dir=.
4807    for ac_exec_ext in '' $ac_executable_extensions; do
4808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4809    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4811    break 2
4812  fi
4813done
4814  done
4815IFS=$as_save_IFS
4816
4817  ;;
4818esac
4819fi
4820FIND=$ac_cv_path_FIND
4821if test -n "$FIND"; then
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4823$as_echo "$FIND" >&6; }
4824else
4825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828
4829
4830  test -n "$FIND" && break
4831done
4832
4833
4834  if test "x$FIND" = x; then
4835    if test "xfind" = x; then
4836      PROG_NAME=find
4837    else
4838      PROG_NAME=find
4839    fi
4840    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4841$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4842    as_fn_error $? "Cannot continue" "$LINENO" 5
4843  fi
4844
4845
4846
4847  for ac_prog in head
4848do
4849  # Extract the first word of "$ac_prog", so it can be a program name with args.
4850set dummy $ac_prog; ac_word=$2
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4852$as_echo_n "checking for $ac_word... " >&6; }
4853if ${ac_cv_path_HEAD+:} false; then :
4854  $as_echo_n "(cached) " >&6
4855else
4856  case $HEAD in
4857  [\\/]* | ?:[\\/]*)
4858  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4859  ;;
4860  *)
4861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862for as_dir in $PATH
4863do
4864  IFS=$as_save_IFS
4865  test -z "$as_dir" && as_dir=.
4866    for ac_exec_ext in '' $ac_executable_extensions; do
4867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4868    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4870    break 2
4871  fi
4872done
4873  done
4874IFS=$as_save_IFS
4875
4876  ;;
4877esac
4878fi
4879HEAD=$ac_cv_path_HEAD
4880if test -n "$HEAD"; then
4881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4882$as_echo "$HEAD" >&6; }
4883else
4884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885$as_echo "no" >&6; }
4886fi
4887
4888
4889  test -n "$HEAD" && break
4890done
4891
4892
4893  if test "x$HEAD" = x; then
4894    if test "xhead" = x; then
4895      PROG_NAME=head
4896    else
4897      PROG_NAME=head
4898    fi
4899    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4901    as_fn_error $? "Cannot continue" "$LINENO" 5
4902  fi
4903
4904
4905
4906  for ac_prog in ln
4907do
4908  # Extract the first word of "$ac_prog", so it can be a program name with args.
4909set dummy $ac_prog; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if ${ac_cv_path_LN+:} false; then :
4913  $as_echo_n "(cached) " >&6
4914else
4915  case $LN in
4916  [\\/]* | ?:[\\/]*)
4917  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4918  ;;
4919  *)
4920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in $PATH
4922do
4923  IFS=$as_save_IFS
4924  test -z "$as_dir" && as_dir=.
4925    for ac_exec_ext in '' $ac_executable_extensions; do
4926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4927    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929    break 2
4930  fi
4931done
4932  done
4933IFS=$as_save_IFS
4934
4935  ;;
4936esac
4937fi
4938LN=$ac_cv_path_LN
4939if test -n "$LN"; then
4940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4941$as_echo "$LN" >&6; }
4942else
4943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947
4948  test -n "$LN" && break
4949done
4950
4951
4952  if test "x$LN" = x; then
4953    if test "xln" = x; then
4954      PROG_NAME=ln
4955    else
4956      PROG_NAME=ln
4957    fi
4958    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4959$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4960    as_fn_error $? "Cannot continue" "$LINENO" 5
4961  fi
4962
4963
4964
4965  for ac_prog in ls
4966do
4967  # Extract the first word of "$ac_prog", so it can be a program name with args.
4968set dummy $ac_prog; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_LS+:} false; then :
4972  $as_echo_n "(cached) " >&6
4973else
4974  case $LS in
4975  [\\/]* | ?:[\\/]*)
4976  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4977  ;;
4978  *)
4979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982  IFS=$as_save_IFS
4983  test -z "$as_dir" && as_dir=.
4984    for ac_exec_ext in '' $ac_executable_extensions; do
4985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988    break 2
4989  fi
4990done
4991  done
4992IFS=$as_save_IFS
4993
4994  ;;
4995esac
4996fi
4997LS=$ac_cv_path_LS
4998if test -n "$LS"; then
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5000$as_echo "$LS" >&6; }
5001else
5002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006
5007  test -n "$LS" && break
5008done
5009
5010
5011  if test "x$LS" = x; then
5012    if test "xls" = x; then
5013      PROG_NAME=ls
5014    else
5015      PROG_NAME=ls
5016    fi
5017    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5018$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5019    as_fn_error $? "Cannot continue" "$LINENO" 5
5020  fi
5021
5022
5023
5024  for ac_prog in mkdir
5025do
5026  # Extract the first word of "$ac_prog", so it can be a program name with args.
5027set dummy $ac_prog; ac_word=$2
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if ${ac_cv_path_MKDIR+:} false; then :
5031  $as_echo_n "(cached) " >&6
5032else
5033  case $MKDIR in
5034  [\\/]* | ?:[\\/]*)
5035  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5036  ;;
5037  *)
5038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041  IFS=$as_save_IFS
5042  test -z "$as_dir" && as_dir=.
5043    for ac_exec_ext in '' $ac_executable_extensions; do
5044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047    break 2
5048  fi
5049done
5050  done
5051IFS=$as_save_IFS
5052
5053  ;;
5054esac
5055fi
5056MKDIR=$ac_cv_path_MKDIR
5057if test -n "$MKDIR"; then
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5059$as_echo "$MKDIR" >&6; }
5060else
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065
5066  test -n "$MKDIR" && break
5067done
5068
5069
5070  if test "x$MKDIR" = x; then
5071    if test "xmkdir" = x; then
5072      PROG_NAME=mkdir
5073    else
5074      PROG_NAME=mkdir
5075    fi
5076    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5077$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5078    as_fn_error $? "Cannot continue" "$LINENO" 5
5079  fi
5080
5081
5082
5083  for ac_prog in mktemp
5084do
5085  # Extract the first word of "$ac_prog", so it can be a program name with args.
5086set dummy $ac_prog; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if ${ac_cv_path_MKTEMP+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092  case $MKTEMP in
5093  [\\/]* | ?:[\\/]*)
5094  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5095  ;;
5096  *)
5097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100  IFS=$as_save_IFS
5101  test -z "$as_dir" && as_dir=.
5102    for ac_exec_ext in '' $ac_executable_extensions; do
5103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106    break 2
5107  fi
5108done
5109  done
5110IFS=$as_save_IFS
5111
5112  ;;
5113esac
5114fi
5115MKTEMP=$ac_cv_path_MKTEMP
5116if test -n "$MKTEMP"; then
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5118$as_echo "$MKTEMP" >&6; }
5119else
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125  test -n "$MKTEMP" && break
5126done
5127
5128
5129  if test "x$MKTEMP" = x; then
5130    if test "xmktemp" = x; then
5131      PROG_NAME=mktemp
5132    else
5133      PROG_NAME=mktemp
5134    fi
5135    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5136$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5137    as_fn_error $? "Cannot continue" "$LINENO" 5
5138  fi
5139
5140
5141
5142  for ac_prog in mv
5143do
5144  # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_path_MV+:} false; then :
5149  $as_echo_n "(cached) " >&6
5150else
5151  case $MV in
5152  [\\/]* | ?:[\\/]*)
5153  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5154  ;;
5155  *)
5156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159  IFS=$as_save_IFS
5160  test -z "$as_dir" && as_dir=.
5161    for ac_exec_ext in '' $ac_executable_extensions; do
5162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5163    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165    break 2
5166  fi
5167done
5168  done
5169IFS=$as_save_IFS
5170
5171  ;;
5172esac
5173fi
5174MV=$ac_cv_path_MV
5175if test -n "$MV"; then
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5177$as_echo "$MV" >&6; }
5178else
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
5181fi
5182
5183
5184  test -n "$MV" && break
5185done
5186
5187
5188  if test "x$MV" = x; then
5189    if test "xmv" = x; then
5190      PROG_NAME=mv
5191    else
5192      PROG_NAME=mv
5193    fi
5194    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5196    as_fn_error $? "Cannot continue" "$LINENO" 5
5197  fi
5198
5199
5200
5201  for ac_prog in printf
5202do
5203  # Extract the first word of "$ac_prog", so it can be a program name with args.
5204set dummy $ac_prog; ac_word=$2
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206$as_echo_n "checking for $ac_word... " >&6; }
5207if ${ac_cv_path_PRINTF+:} false; then :
5208  $as_echo_n "(cached) " >&6
5209else
5210  case $PRINTF in
5211  [\\/]* | ?:[\\/]*)
5212  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5213  ;;
5214  *)
5215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
5218  IFS=$as_save_IFS
5219  test -z "$as_dir" && as_dir=.
5220    for ac_exec_ext in '' $ac_executable_extensions; do
5221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224    break 2
5225  fi
5226done
5227  done
5228IFS=$as_save_IFS
5229
5230  ;;
5231esac
5232fi
5233PRINTF=$ac_cv_path_PRINTF
5234if test -n "$PRINTF"; then
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5236$as_echo "$PRINTF" >&6; }
5237else
5238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239$as_echo "no" >&6; }
5240fi
5241
5242
5243  test -n "$PRINTF" && break
5244done
5245
5246
5247  if test "x$PRINTF" = x; then
5248    if test "xprintf" = x; then
5249      PROG_NAME=printf
5250    else
5251      PROG_NAME=printf
5252    fi
5253    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5254$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5255    as_fn_error $? "Cannot continue" "$LINENO" 5
5256  fi
5257
5258
5259
5260  for ac_prog in rm
5261do
5262  # Extract the first word of "$ac_prog", so it can be a program name with args.
5263set dummy $ac_prog; ac_word=$2
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265$as_echo_n "checking for $ac_word... " >&6; }
5266if ${ac_cv_path_RM+:} false; then :
5267  $as_echo_n "(cached) " >&6
5268else
5269  case $RM in
5270  [\\/]* | ?:[\\/]*)
5271  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5272  ;;
5273  *)
5274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275for as_dir in $PATH
5276do
5277  IFS=$as_save_IFS
5278  test -z "$as_dir" && as_dir=.
5279    for ac_exec_ext in '' $ac_executable_extensions; do
5280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5281    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5283    break 2
5284  fi
5285done
5286  done
5287IFS=$as_save_IFS
5288
5289  ;;
5290esac
5291fi
5292RM=$ac_cv_path_RM
5293if test -n "$RM"; then
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5295$as_echo "$RM" >&6; }
5296else
5297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298$as_echo "no" >&6; }
5299fi
5300
5301
5302  test -n "$RM" && break
5303done
5304
5305
5306  if test "x$RM" = x; then
5307    if test "xrm" = x; then
5308      PROG_NAME=rm
5309    else
5310      PROG_NAME=rm
5311    fi
5312    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5313$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5314    as_fn_error $? "Cannot continue" "$LINENO" 5
5315  fi
5316
5317
5318
5319  for ac_prog in sh
5320do
5321  # Extract the first word of "$ac_prog", so it can be a program name with args.
5322set dummy $ac_prog; ac_word=$2
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5324$as_echo_n "checking for $ac_word... " >&6; }
5325if ${ac_cv_path_SH+:} false; then :
5326  $as_echo_n "(cached) " >&6
5327else
5328  case $SH in
5329  [\\/]* | ?:[\\/]*)
5330  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5331  ;;
5332  *)
5333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5334for as_dir in $PATH
5335do
5336  IFS=$as_save_IFS
5337  test -z "$as_dir" && as_dir=.
5338    for ac_exec_ext in '' $ac_executable_extensions; do
5339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5340    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5342    break 2
5343  fi
5344done
5345  done
5346IFS=$as_save_IFS
5347
5348  ;;
5349esac
5350fi
5351SH=$ac_cv_path_SH
5352if test -n "$SH"; then
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5354$as_echo "$SH" >&6; }
5355else
5356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359
5360
5361  test -n "$SH" && break
5362done
5363
5364
5365  if test "x$SH" = x; then
5366    if test "xsh" = x; then
5367      PROG_NAME=sh
5368    else
5369      PROG_NAME=sh
5370    fi
5371    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5372$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5373    as_fn_error $? "Cannot continue" "$LINENO" 5
5374  fi
5375
5376
5377
5378  for ac_prog in sort
5379do
5380  # Extract the first word of "$ac_prog", so it can be a program name with args.
5381set dummy $ac_prog; ac_word=$2
5382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5383$as_echo_n "checking for $ac_word... " >&6; }
5384if ${ac_cv_path_SORT+:} false; then :
5385  $as_echo_n "(cached) " >&6
5386else
5387  case $SORT in
5388  [\\/]* | ?:[\\/]*)
5389  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5390  ;;
5391  *)
5392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH
5394do
5395  IFS=$as_save_IFS
5396  test -z "$as_dir" && as_dir=.
5397    for ac_exec_ext in '' $ac_executable_extensions; do
5398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5399    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5401    break 2
5402  fi
5403done
5404  done
5405IFS=$as_save_IFS
5406
5407  ;;
5408esac
5409fi
5410SORT=$ac_cv_path_SORT
5411if test -n "$SORT"; then
5412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5413$as_echo "$SORT" >&6; }
5414else
5415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5416$as_echo "no" >&6; }
5417fi
5418
5419
5420  test -n "$SORT" && break
5421done
5422
5423
5424  if test "x$SORT" = x; then
5425    if test "xsort" = x; then
5426      PROG_NAME=sort
5427    else
5428      PROG_NAME=sort
5429    fi
5430    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5431$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5432    as_fn_error $? "Cannot continue" "$LINENO" 5
5433  fi
5434
5435
5436
5437  for ac_prog in tail
5438do
5439  # Extract the first word of "$ac_prog", so it can be a program name with args.
5440set dummy $ac_prog; ac_word=$2
5441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442$as_echo_n "checking for $ac_word... " >&6; }
5443if ${ac_cv_path_TAIL+:} false; then :
5444  $as_echo_n "(cached) " >&6
5445else
5446  case $TAIL in
5447  [\\/]* | ?:[\\/]*)
5448  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5449  ;;
5450  *)
5451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
5454  IFS=$as_save_IFS
5455  test -z "$as_dir" && as_dir=.
5456    for ac_exec_ext in '' $ac_executable_extensions; do
5457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460    break 2
5461  fi
5462done
5463  done
5464IFS=$as_save_IFS
5465
5466  ;;
5467esac
5468fi
5469TAIL=$ac_cv_path_TAIL
5470if test -n "$TAIL"; then
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5472$as_echo "$TAIL" >&6; }
5473else
5474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475$as_echo "no" >&6; }
5476fi
5477
5478
5479  test -n "$TAIL" && break
5480done
5481
5482
5483  if test "x$TAIL" = x; then
5484    if test "xtail" = x; then
5485      PROG_NAME=tail
5486    else
5487      PROG_NAME=tail
5488    fi
5489    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5490$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5491    as_fn_error $? "Cannot continue" "$LINENO" 5
5492  fi
5493
5494
5495
5496  for ac_prog in tar
5497do
5498  # Extract the first word of "$ac_prog", so it can be a program name with args.
5499set dummy $ac_prog; ac_word=$2
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5501$as_echo_n "checking for $ac_word... " >&6; }
5502if ${ac_cv_path_TAR+:} false; then :
5503  $as_echo_n "(cached) " >&6
5504else
5505  case $TAR in
5506  [\\/]* | ?:[\\/]*)
5507  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5508  ;;
5509  *)
5510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5511for as_dir in $PATH
5512do
5513  IFS=$as_save_IFS
5514  test -z "$as_dir" && as_dir=.
5515    for ac_exec_ext in '' $ac_executable_extensions; do
5516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5517    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5519    break 2
5520  fi
5521done
5522  done
5523IFS=$as_save_IFS
5524
5525  ;;
5526esac
5527fi
5528TAR=$ac_cv_path_TAR
5529if test -n "$TAR"; then
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5531$as_echo "$TAR" >&6; }
5532else
5533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534$as_echo "no" >&6; }
5535fi
5536
5537
5538  test -n "$TAR" && break
5539done
5540
5541
5542  if test "x$TAR" = x; then
5543    if test "xtar" = x; then
5544      PROG_NAME=tar
5545    else
5546      PROG_NAME=tar
5547    fi
5548    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5549$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5550    as_fn_error $? "Cannot continue" "$LINENO" 5
5551  fi
5552
5553
5554
5555  for ac_prog in tee
5556do
5557  # Extract the first word of "$ac_prog", so it can be a program name with args.
5558set dummy $ac_prog; ac_word=$2
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560$as_echo_n "checking for $ac_word... " >&6; }
5561if ${ac_cv_path_TEE+:} false; then :
5562  $as_echo_n "(cached) " >&6
5563else
5564  case $TEE in
5565  [\\/]* | ?:[\\/]*)
5566  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5567  ;;
5568  *)
5569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5570for as_dir in $PATH
5571do
5572  IFS=$as_save_IFS
5573  test -z "$as_dir" && as_dir=.
5574    for ac_exec_ext in '' $ac_executable_extensions; do
5575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5576    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5578    break 2
5579  fi
5580done
5581  done
5582IFS=$as_save_IFS
5583
5584  ;;
5585esac
5586fi
5587TEE=$ac_cv_path_TEE
5588if test -n "$TEE"; then
5589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5590$as_echo "$TEE" >&6; }
5591else
5592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593$as_echo "no" >&6; }
5594fi
5595
5596
5597  test -n "$TEE" && break
5598done
5599
5600
5601  if test "x$TEE" = x; then
5602    if test "xtee" = x; then
5603      PROG_NAME=tee
5604    else
5605      PROG_NAME=tee
5606    fi
5607    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5608$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5609    as_fn_error $? "Cannot continue" "$LINENO" 5
5610  fi
5611
5612
5613
5614  for ac_prog in touch
5615do
5616  # Extract the first word of "$ac_prog", so it can be a program name with args.
5617set dummy $ac_prog; ac_word=$2
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
5620if ${ac_cv_path_TOUCH+:} false; then :
5621  $as_echo_n "(cached) " >&6
5622else
5623  case $TOUCH in
5624  [\\/]* | ?:[\\/]*)
5625  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5626  ;;
5627  *)
5628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5629for as_dir in $PATH
5630do
5631  IFS=$as_save_IFS
5632  test -z "$as_dir" && as_dir=.
5633    for ac_exec_ext in '' $ac_executable_extensions; do
5634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5635    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5637    break 2
5638  fi
5639done
5640  done
5641IFS=$as_save_IFS
5642
5643  ;;
5644esac
5645fi
5646TOUCH=$ac_cv_path_TOUCH
5647if test -n "$TOUCH"; then
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5649$as_echo "$TOUCH" >&6; }
5650else
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5652$as_echo "no" >&6; }
5653fi
5654
5655
5656  test -n "$TOUCH" && break
5657done
5658
5659
5660  if test "x$TOUCH" = x; then
5661    if test "xtouch" = x; then
5662      PROG_NAME=touch
5663    else
5664      PROG_NAME=touch
5665    fi
5666    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5667$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5668    as_fn_error $? "Cannot continue" "$LINENO" 5
5669  fi
5670
5671
5672
5673  for ac_prog in tr
5674do
5675  # Extract the first word of "$ac_prog", so it can be a program name with args.
5676set dummy $ac_prog; ac_word=$2
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5678$as_echo_n "checking for $ac_word... " >&6; }
5679if ${ac_cv_path_TR+:} false; then :
5680  $as_echo_n "(cached) " >&6
5681else
5682  case $TR in
5683  [\\/]* | ?:[\\/]*)
5684  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5685  ;;
5686  *)
5687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5688for as_dir in $PATH
5689do
5690  IFS=$as_save_IFS
5691  test -z "$as_dir" && as_dir=.
5692    for ac_exec_ext in '' $ac_executable_extensions; do
5693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5694    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5696    break 2
5697  fi
5698done
5699  done
5700IFS=$as_save_IFS
5701
5702  ;;
5703esac
5704fi
5705TR=$ac_cv_path_TR
5706if test -n "$TR"; then
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5708$as_echo "$TR" >&6; }
5709else
5710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
5712fi
5713
5714
5715  test -n "$TR" && break
5716done
5717
5718
5719  if test "x$TR" = x; then
5720    if test "xtr" = x; then
5721      PROG_NAME=tr
5722    else
5723      PROG_NAME=tr
5724    fi
5725    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5726$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5727    as_fn_error $? "Cannot continue" "$LINENO" 5
5728  fi
5729
5730
5731
5732  for ac_prog in uname
5733do
5734  # Extract the first word of "$ac_prog", so it can be a program name with args.
5735set dummy $ac_prog; ac_word=$2
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737$as_echo_n "checking for $ac_word... " >&6; }
5738if ${ac_cv_path_UNAME+:} false; then :
5739  $as_echo_n "(cached) " >&6
5740else
5741  case $UNAME in
5742  [\\/]* | ?:[\\/]*)
5743  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5744  ;;
5745  *)
5746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749  IFS=$as_save_IFS
5750  test -z "$as_dir" && as_dir=.
5751    for ac_exec_ext in '' $ac_executable_extensions; do
5752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5753    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5755    break 2
5756  fi
5757done
5758  done
5759IFS=$as_save_IFS
5760
5761  ;;
5762esac
5763fi
5764UNAME=$ac_cv_path_UNAME
5765if test -n "$UNAME"; then
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5767$as_echo "$UNAME" >&6; }
5768else
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5770$as_echo "no" >&6; }
5771fi
5772
5773
5774  test -n "$UNAME" && break
5775done
5776
5777
5778  if test "x$UNAME" = x; then
5779    if test "xuname" = x; then
5780      PROG_NAME=uname
5781    else
5782      PROG_NAME=uname
5783    fi
5784    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5785$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5786    as_fn_error $? "Cannot continue" "$LINENO" 5
5787  fi
5788
5789
5790
5791  for ac_prog in uniq
5792do
5793  # Extract the first word of "$ac_prog", so it can be a program name with args.
5794set dummy $ac_prog; ac_word=$2
5795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796$as_echo_n "checking for $ac_word... " >&6; }
5797if ${ac_cv_path_UNIQ+:} false; then :
5798  $as_echo_n "(cached) " >&6
5799else
5800  case $UNIQ in
5801  [\\/]* | ?:[\\/]*)
5802  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5803  ;;
5804  *)
5805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5806for as_dir in $PATH
5807do
5808  IFS=$as_save_IFS
5809  test -z "$as_dir" && as_dir=.
5810    for ac_exec_ext in '' $ac_executable_extensions; do
5811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5812    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5814    break 2
5815  fi
5816done
5817  done
5818IFS=$as_save_IFS
5819
5820  ;;
5821esac
5822fi
5823UNIQ=$ac_cv_path_UNIQ
5824if test -n "$UNIQ"; then
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5826$as_echo "$UNIQ" >&6; }
5827else
5828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829$as_echo "no" >&6; }
5830fi
5831
5832
5833  test -n "$UNIQ" && break
5834done
5835
5836
5837  if test "x$UNIQ" = x; then
5838    if test "xuniq" = x; then
5839      PROG_NAME=uniq
5840    else
5841      PROG_NAME=uniq
5842    fi
5843    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5844$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5845    as_fn_error $? "Cannot continue" "$LINENO" 5
5846  fi
5847
5848
5849
5850  for ac_prog in wc
5851do
5852  # Extract the first word of "$ac_prog", so it can be a program name with args.
5853set dummy $ac_prog; ac_word=$2
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855$as_echo_n "checking for $ac_word... " >&6; }
5856if ${ac_cv_path_WC+:} false; then :
5857  $as_echo_n "(cached) " >&6
5858else
5859  case $WC in
5860  [\\/]* | ?:[\\/]*)
5861  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5862  ;;
5863  *)
5864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5865for as_dir in $PATH
5866do
5867  IFS=$as_save_IFS
5868  test -z "$as_dir" && as_dir=.
5869    for ac_exec_ext in '' $ac_executable_extensions; do
5870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5871    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5873    break 2
5874  fi
5875done
5876  done
5877IFS=$as_save_IFS
5878
5879  ;;
5880esac
5881fi
5882WC=$ac_cv_path_WC
5883if test -n "$WC"; then
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5885$as_echo "$WC" >&6; }
5886else
5887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888$as_echo "no" >&6; }
5889fi
5890
5891
5892  test -n "$WC" && break
5893done
5894
5895
5896  if test "x$WC" = x; then
5897    if test "xwc" = x; then
5898      PROG_NAME=wc
5899    else
5900      PROG_NAME=wc
5901    fi
5902    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5903$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5904    as_fn_error $? "Cannot continue" "$LINENO" 5
5905  fi
5906
5907
5908
5909  for ac_prog in which
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_WHICH+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $WHICH in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941WHICH=$ac_cv_path_WHICH
5942if test -n "$WHICH"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5944$as_echo "$WHICH" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$WHICH" && break
5952done
5953
5954
5955  if test "x$WHICH" = x; then
5956    if test "xwhich" = x; then
5957      PROG_NAME=which
5958    else
5959      PROG_NAME=which
5960    fi
5961    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5962$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5963    as_fn_error $? "Cannot continue" "$LINENO" 5
5964  fi
5965
5966
5967
5968  for ac_prog in xargs
5969do
5970  # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if ${ac_cv_path_XARGS+:} false; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  case $XARGS in
5978  [\\/]* | ?:[\\/]*)
5979  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5980  ;;
5981  *)
5982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985  IFS=$as_save_IFS
5986  test -z "$as_dir" && as_dir=.
5987    for ac_exec_ext in '' $ac_executable_extensions; do
5988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991    break 2
5992  fi
5993done
5994  done
5995IFS=$as_save_IFS
5996
5997  ;;
5998esac
5999fi
6000XARGS=$ac_cv_path_XARGS
6001if test -n "$XARGS"; then
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6003$as_echo "$XARGS" >&6; }
6004else
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010  test -n "$XARGS" && break
6011done
6012
6013
6014  if test "x$XARGS" = x; then
6015    if test "xxargs" = x; then
6016      PROG_NAME=xargs
6017    else
6018      PROG_NAME=xargs
6019    fi
6020    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6021$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6022    as_fn_error $? "Cannot continue" "$LINENO" 5
6023  fi
6024
6025
6026
6027  # Then required tools that require some special treatment.
6028  for ac_prog in gawk mawk nawk awk
6029do
6030  # Extract the first word of "$ac_prog", so it can be a program name with args.
6031set dummy $ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_prog_AWK+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  if test -n "$AWK"; then
6038  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6039else
6040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_prog_AWK="$ac_prog"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055fi
6056fi
6057AWK=$ac_cv_prog_AWK
6058if test -n "$AWK"; then
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6060$as_echo "$AWK" >&6; }
6061else
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064fi
6065
6066
6067  test -n "$AWK" && break
6068done
6069
6070
6071  if test "x$AWK" = x; then
6072    if test "x" = x; then
6073      PROG_NAME=awk
6074    else
6075      PROG_NAME=
6076    fi
6077    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6078$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6079    as_fn_error $? "Cannot continue" "$LINENO" 5
6080  fi
6081
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6083$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6084if ${ac_cv_path_GREP+:} false; then :
6085  $as_echo_n "(cached) " >&6
6086else
6087  if test -z "$GREP"; then
6088  ac_path_GREP_found=false
6089  # Loop through the user's path and test for each of PROGNAME-LIST
6090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6092do
6093  IFS=$as_save_IFS
6094  test -z "$as_dir" && as_dir=.
6095    for ac_prog in grep ggrep; do
6096    for ac_exec_ext in '' $ac_executable_extensions; do
6097      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6098      as_fn_executable_p "$ac_path_GREP" || continue
6099# Check for GNU ac_path_GREP and select it if it is found.
6100  # Check for GNU $ac_path_GREP
6101case `"$ac_path_GREP" --version 2>&1` in
6102*GNU*)
6103  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6104*)
6105  ac_count=0
6106  $as_echo_n 0123456789 >"conftest.in"
6107  while :
6108  do
6109    cat "conftest.in" "conftest.in" >"conftest.tmp"
6110    mv "conftest.tmp" "conftest.in"
6111    cp "conftest.in" "conftest.nl"
6112    $as_echo 'GREP' >> "conftest.nl"
6113    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6114    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6115    as_fn_arith $ac_count + 1 && ac_count=$as_val
6116    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6117      # Best one so far, save it but keep looking for a better one
6118      ac_cv_path_GREP="$ac_path_GREP"
6119      ac_path_GREP_max=$ac_count
6120    fi
6121    # 10*(2^10) chars as input seems more than enough
6122    test $ac_count -gt 10 && break
6123  done
6124  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6125esac
6126
6127      $ac_path_GREP_found && break 3
6128    done
6129  done
6130  done
6131IFS=$as_save_IFS
6132  if test -z "$ac_cv_path_GREP"; then
6133    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6134  fi
6135else
6136  ac_cv_path_GREP=$GREP
6137fi
6138
6139fi
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6141$as_echo "$ac_cv_path_GREP" >&6; }
6142 GREP="$ac_cv_path_GREP"
6143
6144
6145
6146  if test "x$GREP" = x; then
6147    if test "x" = x; then
6148      PROG_NAME=grep
6149    else
6150      PROG_NAME=
6151    fi
6152    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6153$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6154    as_fn_error $? "Cannot continue" "$LINENO" 5
6155  fi
6156
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6158$as_echo_n "checking for egrep... " >&6; }
6159if ${ac_cv_path_EGREP+:} false; then :
6160  $as_echo_n "(cached) " >&6
6161else
6162  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6163   then ac_cv_path_EGREP="$GREP -E"
6164   else
6165     if test -z "$EGREP"; then
6166  ac_path_EGREP_found=false
6167  # Loop through the user's path and test for each of PROGNAME-LIST
6168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6170do
6171  IFS=$as_save_IFS
6172  test -z "$as_dir" && as_dir=.
6173    for ac_prog in egrep; do
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6176      as_fn_executable_p "$ac_path_EGREP" || continue
6177# Check for GNU ac_path_EGREP and select it if it is found.
6178  # Check for GNU $ac_path_EGREP
6179case `"$ac_path_EGREP" --version 2>&1` in
6180*GNU*)
6181  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6182*)
6183  ac_count=0
6184  $as_echo_n 0123456789 >"conftest.in"
6185  while :
6186  do
6187    cat "conftest.in" "conftest.in" >"conftest.tmp"
6188    mv "conftest.tmp" "conftest.in"
6189    cp "conftest.in" "conftest.nl"
6190    $as_echo 'EGREP' >> "conftest.nl"
6191    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6192    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6193    as_fn_arith $ac_count + 1 && ac_count=$as_val
6194    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6195      # Best one so far, save it but keep looking for a better one
6196      ac_cv_path_EGREP="$ac_path_EGREP"
6197      ac_path_EGREP_max=$ac_count
6198    fi
6199    # 10*(2^10) chars as input seems more than enough
6200    test $ac_count -gt 10 && break
6201  done
6202  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6203esac
6204
6205      $ac_path_EGREP_found && break 3
6206    done
6207  done
6208  done
6209IFS=$as_save_IFS
6210  if test -z "$ac_cv_path_EGREP"; then
6211    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6212  fi
6213else
6214  ac_cv_path_EGREP=$EGREP
6215fi
6216
6217   fi
6218fi
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6220$as_echo "$ac_cv_path_EGREP" >&6; }
6221 EGREP="$ac_cv_path_EGREP"
6222
6223
6224
6225  if test "x$EGREP" = x; then
6226    if test "x" = x; then
6227      PROG_NAME=egrep
6228    else
6229      PROG_NAME=
6230    fi
6231    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6233    as_fn_error $? "Cannot continue" "$LINENO" 5
6234  fi
6235
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6237$as_echo_n "checking for fgrep... " >&6; }
6238if ${ac_cv_path_FGREP+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6242   then ac_cv_path_FGREP="$GREP -F"
6243   else
6244     if test -z "$FGREP"; then
6245  ac_path_FGREP_found=false
6246  # Loop through the user's path and test for each of PROGNAME-LIST
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_prog in fgrep; do
6253    for ac_exec_ext in '' $ac_executable_extensions; do
6254      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6255      as_fn_executable_p "$ac_path_FGREP" || continue
6256# Check for GNU ac_path_FGREP and select it if it is found.
6257  # Check for GNU $ac_path_FGREP
6258case `"$ac_path_FGREP" --version 2>&1` in
6259*GNU*)
6260  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6261*)
6262  ac_count=0
6263  $as_echo_n 0123456789 >"conftest.in"
6264  while :
6265  do
6266    cat "conftest.in" "conftest.in" >"conftest.tmp"
6267    mv "conftest.tmp" "conftest.in"
6268    cp "conftest.in" "conftest.nl"
6269    $as_echo 'FGREP' >> "conftest.nl"
6270    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6272    as_fn_arith $ac_count + 1 && ac_count=$as_val
6273    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6274      # Best one so far, save it but keep looking for a better one
6275      ac_cv_path_FGREP="$ac_path_FGREP"
6276      ac_path_FGREP_max=$ac_count
6277    fi
6278    # 10*(2^10) chars as input seems more than enough
6279    test $ac_count -gt 10 && break
6280  done
6281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6282esac
6283
6284      $ac_path_FGREP_found && break 3
6285    done
6286  done
6287  done
6288IFS=$as_save_IFS
6289  if test -z "$ac_cv_path_FGREP"; then
6290    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6291  fi
6292else
6293  ac_cv_path_FGREP=$FGREP
6294fi
6295
6296   fi
6297fi
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6299$as_echo "$ac_cv_path_FGREP" >&6; }
6300 FGREP="$ac_cv_path_FGREP"
6301
6302
6303
6304  if test "x$FGREP" = x; then
6305    if test "x" = x; then
6306      PROG_NAME=fgrep
6307    else
6308      PROG_NAME=
6309    fi
6310    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6311$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6312    as_fn_error $? "Cannot continue" "$LINENO" 5
6313  fi
6314
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6316$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6317if ${ac_cv_path_SED+:} false; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6321     for ac_i in 1 2 3 4 5 6 7; do
6322       ac_script="$ac_script$as_nl$ac_script"
6323     done
6324     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6325     { ac_script=; unset ac_script;}
6326     if test -z "$SED"; then
6327  ac_path_SED_found=false
6328  # Loop through the user's path and test for each of PROGNAME-LIST
6329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332  IFS=$as_save_IFS
6333  test -z "$as_dir" && as_dir=.
6334    for ac_prog in sed gsed; do
6335    for ac_exec_ext in '' $ac_executable_extensions; do
6336      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6337      as_fn_executable_p "$ac_path_SED" || continue
6338# Check for GNU ac_path_SED and select it if it is found.
6339  # Check for GNU $ac_path_SED
6340case `"$ac_path_SED" --version 2>&1` in
6341*GNU*)
6342  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6343*)
6344  ac_count=0
6345  $as_echo_n 0123456789 >"conftest.in"
6346  while :
6347  do
6348    cat "conftest.in" "conftest.in" >"conftest.tmp"
6349    mv "conftest.tmp" "conftest.in"
6350    cp "conftest.in" "conftest.nl"
6351    $as_echo '' >> "conftest.nl"
6352    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6353    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6354    as_fn_arith $ac_count + 1 && ac_count=$as_val
6355    if test $ac_count -gt ${ac_path_SED_max-0}; then
6356      # Best one so far, save it but keep looking for a better one
6357      ac_cv_path_SED="$ac_path_SED"
6358      ac_path_SED_max=$ac_count
6359    fi
6360    # 10*(2^10) chars as input seems more than enough
6361    test $ac_count -gt 10 && break
6362  done
6363  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6364esac
6365
6366      $ac_path_SED_found && break 3
6367    done
6368  done
6369  done
6370IFS=$as_save_IFS
6371  if test -z "$ac_cv_path_SED"; then
6372    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6373  fi
6374else
6375  ac_cv_path_SED=$SED
6376fi
6377
6378fi
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6380$as_echo "$ac_cv_path_SED" >&6; }
6381 SED="$ac_cv_path_SED"
6382  rm -f conftest.sed
6383
6384
6385  if test "x$SED" = x; then
6386    if test "x" = x; then
6387      PROG_NAME=sed
6388    else
6389      PROG_NAME=
6390    fi
6391    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6392$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6393    as_fn_error $? "Cannot continue" "$LINENO" 5
6394  fi
6395
6396
6397  for ac_prog in nawk gawk awk
6398do
6399  # Extract the first word of "$ac_prog", so it can be a program name with args.
6400set dummy $ac_prog; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_path_NAWK+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $NAWK in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429NAWK=$ac_cv_path_NAWK
6430if test -n "$NAWK"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6432$as_echo "$NAWK" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439  test -n "$NAWK" && break
6440done
6441
6442
6443  if test "x$NAWK" = x; then
6444    if test "x" = x; then
6445      PROG_NAME=nawk
6446    else
6447      PROG_NAME=
6448    fi
6449    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6450$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6451    as_fn_error $? "Cannot continue" "$LINENO" 5
6452  fi
6453
6454
6455  # Always force rm.
6456  RM="$RM -f"
6457
6458  # pwd behaves differently on various platforms and some don't support the -L flag.
6459  # Always use the bash builtin pwd to get uniform behavior.
6460  THEPWDCMD=pwd
6461
6462  # These are not required on all platforms
6463  # Extract the first word of "cygpath", so it can be a program name with args.
6464set dummy cygpath; ac_word=$2
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466$as_echo_n "checking for $ac_word... " >&6; }
6467if ${ac_cv_path_CYGPATH+:} false; then :
6468  $as_echo_n "(cached) " >&6
6469else
6470  case $CYGPATH in
6471  [\\/]* | ?:[\\/]*)
6472  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6473  ;;
6474  *)
6475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476for as_dir in $PATH
6477do
6478  IFS=$as_save_IFS
6479  test -z "$as_dir" && as_dir=.
6480    for ac_exec_ext in '' $ac_executable_extensions; do
6481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6482    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484    break 2
6485  fi
6486done
6487  done
6488IFS=$as_save_IFS
6489
6490  ;;
6491esac
6492fi
6493CYGPATH=$ac_cv_path_CYGPATH
6494if test -n "$CYGPATH"; then
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6496$as_echo "$CYGPATH" >&6; }
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502
6503  # Extract the first word of "readlink", so it can be a program name with args.
6504set dummy readlink; ac_word=$2
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506$as_echo_n "checking for $ac_word... " >&6; }
6507if ${ac_cv_path_READLINK+:} false; then :
6508  $as_echo_n "(cached) " >&6
6509else
6510  case $READLINK in
6511  [\\/]* | ?:[\\/]*)
6512  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6513  ;;
6514  *)
6515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518  IFS=$as_save_IFS
6519  test -z "$as_dir" && as_dir=.
6520    for ac_exec_ext in '' $ac_executable_extensions; do
6521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524    break 2
6525  fi
6526done
6527  done
6528IFS=$as_save_IFS
6529
6530  ;;
6531esac
6532fi
6533READLINK=$ac_cv_path_READLINK
6534if test -n "$READLINK"; then
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6536$as_echo "$READLINK" >&6; }
6537else
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543  # Extract the first word of "df", so it can be a program name with args.
6544set dummy df; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_path_DF+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $DF in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6553  ;;
6554  *)
6555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in $PATH
6557do
6558  IFS=$as_save_IFS
6559  test -z "$as_dir" && as_dir=.
6560    for ac_exec_ext in '' $ac_executable_extensions; do
6561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564    break 2
6565  fi
6566done
6567  done
6568IFS=$as_save_IFS
6569
6570  ;;
6571esac
6572fi
6573DF=$ac_cv_path_DF
6574if test -n "$DF"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6576$as_echo "$DF" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583  # Extract the first word of "SetFile", so it can be a program name with args.
6584set dummy SetFile; ac_word=$2
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586$as_echo_n "checking for $ac_word... " >&6; }
6587if ${ac_cv_path_SETFILE+:} false; then :
6588  $as_echo_n "(cached) " >&6
6589else
6590  case $SETFILE in
6591  [\\/]* | ?:[\\/]*)
6592  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6593  ;;
6594  *)
6595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596for as_dir in $PATH
6597do
6598  IFS=$as_save_IFS
6599  test -z "$as_dir" && as_dir=.
6600    for ac_exec_ext in '' $ac_executable_extensions; do
6601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604    break 2
6605  fi
6606done
6607  done
6608IFS=$as_save_IFS
6609
6610  ;;
6611esac
6612fi
6613SETFILE=$ac_cv_path_SETFILE
6614if test -n "$SETFILE"; then
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6616$as_echo "$SETFILE" >&6; }
6617else
6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619$as_echo "no" >&6; }
6620fi
6621
6622
6623
6624
6625# Now we can determine OpenJDK build and target platforms. This is required to
6626# have early on.
6627# Make sure we can run config.sub.
6628$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6629  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6630
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6632$as_echo_n "checking build system type... " >&6; }
6633if ${ac_cv_build+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  ac_build_alias=$build_alias
6637test "x$ac_build_alias" = x &&
6638  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6639test "x$ac_build_alias" = x &&
6640  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6641ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6642  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6643
6644fi
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6646$as_echo "$ac_cv_build" >&6; }
6647case $ac_cv_build in
6648*-*-*) ;;
6649*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6650esac
6651build=$ac_cv_build
6652ac_save_IFS=$IFS; IFS='-'
6653set x $ac_cv_build
6654shift
6655build_cpu=$1
6656build_vendor=$2
6657shift; shift
6658# Remember, the first character of IFS is used to create $*,
6659# except with old shells:
6660build_os=$*
6661IFS=$ac_save_IFS
6662case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6663
6664
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6666$as_echo_n "checking host system type... " >&6; }
6667if ${ac_cv_host+:} false; then :
6668  $as_echo_n "(cached) " >&6
6669else
6670  if test "x$host_alias" = x; then
6671  ac_cv_host=$ac_cv_build
6672else
6673  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6674    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6675fi
6676
6677fi
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6679$as_echo "$ac_cv_host" >&6; }
6680case $ac_cv_host in
6681*-*-*) ;;
6682*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6683esac
6684host=$ac_cv_host
6685ac_save_IFS=$IFS; IFS='-'
6686set x $ac_cv_host
6687shift
6688host_cpu=$1
6689host_vendor=$2
6690shift; shift
6691# Remember, the first character of IFS is used to create $*,
6692# except with old shells:
6693host_os=$*
6694IFS=$ac_save_IFS
6695case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6696
6697
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6699$as_echo_n "checking target system type... " >&6; }
6700if ${ac_cv_target+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  if test "x$target_alias" = x; then
6704  ac_cv_target=$ac_cv_host
6705else
6706  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6707    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6708fi
6709
6710fi
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6712$as_echo "$ac_cv_target" >&6; }
6713case $ac_cv_target in
6714*-*-*) ;;
6715*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6716esac
6717target=$ac_cv_target
6718ac_save_IFS=$IFS; IFS='-'
6719set x $ac_cv_target
6720shift
6721target_cpu=$1
6722target_vendor=$2
6723shift; shift
6724# Remember, the first character of IFS is used to create $*,
6725# except with old shells:
6726target_os=$*
6727IFS=$ac_save_IFS
6728case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6729
6730
6731# The aliases save the names the user supplied, while $host etc.
6732# will get canonicalized.
6733test -n "$target_alias" &&
6734  test "$program_prefix$program_suffix$program_transform_name" = \
6735    NONENONEs,x,x, &&
6736  program_prefix=${target_alias}-
6737
6738  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6739  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6740  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6741  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6742  # to use the configure naming style.
6743
6744
6745
6746
6747
6748  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6749  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6750  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6751  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6752  OPENJDK_TARGET_AUTOCONF_NAME="$host"
6753  OPENJDK_BUILD_AUTOCONF_NAME="$build"
6754
6755
6756
6757  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6758
6759  case "$build_os" in
6760    *linux*)
6761      VAR_OS=linux
6762      VAR_OS_API=posix
6763      VAR_OS_ENV=linux
6764      ;;
6765    *solaris*)
6766      VAR_OS=solaris
6767      VAR_OS_API=posix
6768      VAR_OS_ENV=solaris
6769      ;;
6770    *darwin*)
6771      VAR_OS=macosx
6772      VAR_OS_API=posix
6773      VAR_OS_ENV=macosx
6774      ;;
6775    *bsd*)
6776      VAR_OS=bsd
6777      VAR_OS_API=posix
6778      VAR_OS_ENV=bsd
6779      ;;
6780    *cygwin*)
6781      VAR_OS=windows
6782      VAR_OS_API=winapi
6783      VAR_OS_ENV=windows.cygwin
6784      ;;
6785    *mingw*)
6786      VAR_OS=windows
6787      VAR_OS_API=winapi
6788      VAR_OS_ENV=windows.msys
6789      ;;
6790    *aix*)
6791      VAR_OS=aix
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=aix
6794      ;;
6795    *)
6796      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6797      ;;
6798  esac
6799
6800
6801  # First argument is the cpu name from the trip/quad
6802  case "$build_cpu" in
6803    x86_64)
6804      VAR_CPU=x86_64
6805      VAR_CPU_ARCH=x86
6806      VAR_CPU_BITS=64
6807      VAR_CPU_ENDIAN=little
6808      ;;
6809    i?86)
6810      VAR_CPU=x86
6811      VAR_CPU_ARCH=x86
6812      VAR_CPU_BITS=32
6813      VAR_CPU_ENDIAN=little
6814      ;;
6815    arm*)
6816      VAR_CPU=arm
6817      VAR_CPU_ARCH=arm
6818      VAR_CPU_BITS=32
6819      VAR_CPU_ENDIAN=little
6820      ;;
6821    powerpc)
6822      VAR_CPU=ppc
6823      VAR_CPU_ARCH=ppc
6824      VAR_CPU_BITS=32
6825      VAR_CPU_ENDIAN=big
6826      ;;
6827    powerpc64)
6828      VAR_CPU=ppc64
6829      VAR_CPU_ARCH=ppc
6830      VAR_CPU_BITS=64
6831      VAR_CPU_ENDIAN=big
6832      ;;
6833    s390)
6834      VAR_CPU=s390
6835      VAR_CPU_ARCH=s390
6836      VAR_CPU_BITS=32
6837      VAR_CPU_ENDIAN=big
6838      ;;
6839    s390x)
6840      VAR_CPU=s390x
6841      VAR_CPU_ARCH=s390
6842      VAR_CPU_BITS=64
6843      VAR_CPU_ENDIAN=big
6844      ;;
6845    sparc)
6846      VAR_CPU=sparc
6847      VAR_CPU_ARCH=sparc
6848      VAR_CPU_BITS=32
6849      VAR_CPU_ENDIAN=big
6850      ;;
6851    sparcv9)
6852      VAR_CPU=sparcv9
6853      VAR_CPU_ARCH=sparc
6854      VAR_CPU_BITS=64
6855      VAR_CPU_ENDIAN=big
6856      ;;
6857    *)
6858      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6859      ;;
6860  esac
6861
6862  # ..and setup our own variables. (Do this explicitely to facilitate searching)
6863  OPENJDK_BUILD_OS="$VAR_OS"
6864  OPENJDK_BUILD_OS_API="$VAR_OS_API"
6865  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6866  OPENJDK_BUILD_CPU="$VAR_CPU"
6867  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6868  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6869  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6870
6871
6872
6873
6874
6875
6876
6877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6878$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6880$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6881
6882  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6883
6884  case "$host_os" in
6885    *linux*)
6886      VAR_OS=linux
6887      VAR_OS_API=posix
6888      VAR_OS_ENV=linux
6889      ;;
6890    *solaris*)
6891      VAR_OS=solaris
6892      VAR_OS_API=posix
6893      VAR_OS_ENV=solaris
6894      ;;
6895    *darwin*)
6896      VAR_OS=macosx
6897      VAR_OS_API=posix
6898      VAR_OS_ENV=macosx
6899      ;;
6900    *bsd*)
6901      VAR_OS=bsd
6902      VAR_OS_API=posix
6903      VAR_OS_ENV=bsd
6904      ;;
6905    *cygwin*)
6906      VAR_OS=windows
6907      VAR_OS_API=winapi
6908      VAR_OS_ENV=windows.cygwin
6909      ;;
6910    *mingw*)
6911      VAR_OS=windows
6912      VAR_OS_API=winapi
6913      VAR_OS_ENV=windows.msys
6914      ;;
6915    *aix*)
6916      VAR_OS=aix
6917      VAR_OS_API=posix
6918      VAR_OS_ENV=aix
6919      ;;
6920    *)
6921      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6922      ;;
6923  esac
6924
6925
6926  # First argument is the cpu name from the trip/quad
6927  case "$host_cpu" in
6928    x86_64)
6929      VAR_CPU=x86_64
6930      VAR_CPU_ARCH=x86
6931      VAR_CPU_BITS=64
6932      VAR_CPU_ENDIAN=little
6933      ;;
6934    i?86)
6935      VAR_CPU=x86
6936      VAR_CPU_ARCH=x86
6937      VAR_CPU_BITS=32
6938      VAR_CPU_ENDIAN=little
6939      ;;
6940    arm*)
6941      VAR_CPU=arm
6942      VAR_CPU_ARCH=arm
6943      VAR_CPU_BITS=32
6944      VAR_CPU_ENDIAN=little
6945      ;;
6946    powerpc)
6947      VAR_CPU=ppc
6948      VAR_CPU_ARCH=ppc
6949      VAR_CPU_BITS=32
6950      VAR_CPU_ENDIAN=big
6951      ;;
6952    powerpc64)
6953      VAR_CPU=ppc64
6954      VAR_CPU_ARCH=ppc
6955      VAR_CPU_BITS=64
6956      VAR_CPU_ENDIAN=big
6957      ;;
6958    s390)
6959      VAR_CPU=s390
6960      VAR_CPU_ARCH=s390
6961      VAR_CPU_BITS=32
6962      VAR_CPU_ENDIAN=big
6963      ;;
6964    s390x)
6965      VAR_CPU=s390x
6966      VAR_CPU_ARCH=s390
6967      VAR_CPU_BITS=64
6968      VAR_CPU_ENDIAN=big
6969      ;;
6970    sparc)
6971      VAR_CPU=sparc
6972      VAR_CPU_ARCH=sparc
6973      VAR_CPU_BITS=32
6974      VAR_CPU_ENDIAN=big
6975      ;;
6976    sparcv9)
6977      VAR_CPU=sparcv9
6978      VAR_CPU_ARCH=sparc
6979      VAR_CPU_BITS=64
6980      VAR_CPU_ENDIAN=big
6981      ;;
6982    *)
6983      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6984      ;;
6985  esac
6986
6987  # ... and setup our own variables. (Do this explicitely to facilitate searching)
6988  OPENJDK_TARGET_OS="$VAR_OS"
6989  OPENJDK_TARGET_OS_API="$VAR_OS_API"
6990  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6991  OPENJDK_TARGET_CPU="$VAR_CPU"
6992  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6993  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6994  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6995
6996
6997
6998
6999
7000
7001
7002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7003$as_echo_n "checking openjdk-target os-cpu... " >&6; }
7004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7005$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7006
7007
7008
7009# Check whether --with-target-bits was given.
7010if test "${with_target_bits+set}" = set; then :
7011  withval=$with_target_bits;
7012fi
7013
7014
7015  # We have three types of compiles:
7016  # native  == normal compilation, target system == build system
7017  # cross   == traditional cross compilation, target system != build system; special toolchain needed
7018  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7019  #
7020  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7021    # We're doing a proper cross-compilation
7022    COMPILE_TYPE="cross"
7023  else
7024    COMPILE_TYPE="native"
7025  fi
7026
7027  if test "x$with_target_bits" != x; then
7028    if test "x$COMPILE_TYPE" = "xcross"; then
7029      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7030    fi
7031
7032    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7033      # A reduced build is requested
7034      COMPILE_TYPE="reduced"
7035      OPENJDK_TARGET_CPU_BITS=32
7036      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7037        OPENJDK_TARGET_CPU=x86
7038      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7039        OPENJDK_TARGET_CPU=sparc
7040      else
7041        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7042      fi
7043    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7044      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
7045    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7046      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7047$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7048    else
7049      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7050    fi
7051  fi
7052
7053
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7055$as_echo_n "checking compilation type... " >&6; }
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7057$as_echo "$COMPILE_TYPE" >&6; }
7058
7059
7060  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7061    REQUIRED_OS_NAME=SunOS
7062    REQUIRED_OS_VERSION=5.10
7063  fi
7064  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7065    REQUIRED_OS_NAME=Linux
7066    REQUIRED_OS_VERSION=2.6
7067  fi
7068  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7069    REQUIRED_OS_NAME=Windows
7070    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7071      REQUIRED_OS_VERSION=5.2
7072    else
7073      REQUIRED_OS_VERSION=5.1
7074    fi
7075  fi
7076  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7077    REQUIRED_OS_NAME=Darwin
7078    REQUIRED_OS_VERSION=11.2
7079  fi
7080
7081
7082
7083
7084
7085  # Also store the legacy naming of the cpu.
7086  # Ie i586 and amd64 instead of x86 and x86_64
7087  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7088  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7089    OPENJDK_TARGET_CPU_LEGACY="i586"
7090  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7091    # On all platforms except MacOSX replace x86_64 with amd64.
7092    OPENJDK_TARGET_CPU_LEGACY="amd64"
7093  fi
7094
7095
7096  # And the second legacy naming of the cpu.
7097  # Ie i386 and amd64 instead of x86 and x86_64.
7098  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7099  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7100    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7101  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7102    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7103  fi
7104
7105
7106  # This is the name of the cpu (but using i386 and amd64 instead of
7107  # x86 and x86_64, respectively), preceeded by a /, to be used when
7108  # locating libraries. On macosx, it's empty, though.
7109  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111    OPENJDK_TARGET_CPU_LIBDIR=""
7112  fi
7113
7114
7115  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7116  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7117  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7118  OPENJDK_TARGET_CPU_ISADIR=""
7119  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7120    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7121      OPENJDK_TARGET_CPU_ISADIR="/amd64"
7122    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7123      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7124    fi
7125  fi
7126
7127
7128  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7129  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7130  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7131    # On linux only, we replace x86 with i386.
7132    OPENJDK_TARGET_CPU_OSARCH="i386"
7133  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7134    # On all platforms except macosx, we replace x86_64 with amd64.
7135    OPENJDK_TARGET_CPU_OSARCH="amd64"
7136  fi
7137
7138
7139  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7140  if test "x$OPENJDK_TARGET_CPU" = xx86; then
7141    OPENJDK_TARGET_CPU_JLI="i386"
7142  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7143    # On all platforms except macosx, we replace x86_64 with amd64.
7144    OPENJDK_TARGET_CPU_JLI="amd64"
7145  fi
7146  # Now setup the -D flags for building libjli.
7147  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7148  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7149    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7150      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7151    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7152      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7153    fi
7154  fi
7155
7156
7157  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7158  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7159    OPENJDK_TARGET_OS_API_DIR="solaris"
7160  fi
7161  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7162    OPENJDK_TARGET_OS_API_DIR="windows"
7163  fi
7164
7165
7166  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7167      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7168  else
7169      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7170  fi
7171
7172
7173  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7174    A_LP64="LP64:="
7175    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7176    # unpack200.exe
7177    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7178      ADD_LP64="-D_LP64=1"
7179    fi
7180  fi
7181  LP64=$A_LP64
7182
7183
7184  if test "x$COMPILE_TYPE" = "xcross"; then
7185    # FIXME: ... or should this include reduced builds..?
7186    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7187  else
7188    DEFINE_CROSS_COMPILE_ARCH=""
7189  fi
7190
7191
7192  # ZERO_ARCHDEF is used to enable architecture-specific code
7193  case "${OPENJDK_TARGET_CPU}" in
7194    ppc*)    ZERO_ARCHDEF=PPC   ;;
7195    s390*)   ZERO_ARCHDEF=S390  ;;
7196    sparc*)  ZERO_ARCHDEF=SPARC ;;
7197    x86_64*) ZERO_ARCHDEF=AMD64 ;;
7198    x86)     ZERO_ARCHDEF=IA32  ;;
7199    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7200  esac
7201
7202
7203
7204
7205# Continue setting up basic stuff. Most remaining code require fundamental tools.
7206
7207  # Locate the directory of this script.
7208  SCRIPT="$0"
7209  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7210
7211  # Where is the source? It is located two levels above the configure script.
7212  CURDIR="$PWD"
7213  cd "$AUTOCONF_DIR/../.."
7214  SRC_ROOT="`$THEPWDCMD -L`"
7215
7216  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7217    PATH_SEP=";"
7218
7219  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7220  if test $SRC_ROOT_LENGTH -gt 100; then
7221    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7222  fi
7223
7224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7226$as_echo_n "checking cygwin release... " >&6; }
7227    CYGWIN_VERSION=`$UNAME -r`
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7229$as_echo "$CYGWIN_VERSION" >&6; }
7230    WINDOWS_ENV_VENDOR='cygwin'
7231    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7232
7233    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7234    if test "x$CYGWIN_VERSION_OK" = x; then
7235      { $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
7236$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;}
7237      as_fn_error $? "Cannot continue" "$LINENO" 5
7238    fi
7239    if test "x$CYGPATH" = x; then
7240      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7241    fi
7242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7243$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7244    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7245    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7246    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7247    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7249$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7250    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7251    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7252    if test "x$test_cygdrive_prefix" = x; then
7253      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7254    fi
7255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7257$as_echo_n "checking msys release... " >&6; }
7258    MSYS_VERSION=`$UNAME -r`
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7260$as_echo "$MSYS_VERSION" >&6; }
7261
7262    WINDOWS_ENV_VENDOR='msys'
7263    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7264
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7266$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7267    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7268    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7269
7270  windows_path="$MSYS_ROOT_PATH"
7271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7272    unix_path=`$CYGPATH -u "$windows_path"`
7273    MSYS_ROOT_PATH="$unix_path"
7274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7276    MSYS_ROOT_PATH="$unix_path"
7277  fi
7278
7279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7280$as_echo "$MSYS_ROOT_PATH" >&6; }
7281    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7282  else
7283    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7284  fi
7285
7286  # Test if windows or unix (cygwin/msys) find is first in path.
7287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7288$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7289  FIND_BINARY_OUTPUT=`find --version 2>&1`
7290  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7292$as_echo "unix style" >&6; }
7293  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7295$as_echo "Windows" >&6; }
7296    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7297$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7298    { $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
7299$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7300    as_fn_error $? "Cannot continue" "$LINENO" 5
7301  else
7302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7303$as_echo "unknown" >&6; }
7304    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7305$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7306  fi
7307
7308  else
7309    PATH_SEP=":"
7310  fi
7311
7312
7313
7314  cd "$CURDIR"
7315
7316
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318
7319  # Input might be given as Windows format, start by converting to
7320  # unix format.
7321  path="$SRC_ROOT"
7322  new_path=`$CYGPATH -u "$path"`
7323
7324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327  # "foo.exe" is OK but "foo" is an error.
7328  #
7329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330  # It is also a way to make sure we got the proper file name for the real test later on.
7331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332  if test "x$test_shortpath" = x; then
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7334$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7335    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7336  fi
7337
7338  # Call helper function which possibly converts this using DOS-style short mode.
7339  # If so, the updated path is stored in $new_path.
7340
7341  input_path="$new_path"
7342  # Check if we need to convert this using DOS-style short mode. If the path
7343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344  # take no chances and rewrite it.
7345  # Note: m4 eats our [], so we need to use [ and ] instead.
7346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347  if test "x$has_forbidden_chars" != x; then
7348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352      # Going to short mode and back again did indeed matter. Since short mode is
7353      # case insensitive, let's make it lowercase to improve readability.
7354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355      # Now convert it back to Unix-stile (cygpath)
7356      input_path=`$CYGPATH -u "$shortmode_path"`
7357      new_path="$input_path"
7358    fi
7359  fi
7360
7361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362  if test "x$test_cygdrive_prefix" = x; then
7363    # As a simple fix, exclude /usr/bin since it's not a real path.
7364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366      # a path prefixed by /cygdrive for fixpath to work.
7367      new_path="$CYGWIN_ROOT_PATH$input_path"
7368    fi
7369  fi
7370
7371
7372  if test "x$path" != "x$new_path"; then
7373    SRC_ROOT="$new_path"
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7375$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7376  fi
7377
7378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379
7380  path="$SRC_ROOT"
7381  has_colon=`$ECHO $path | $GREP ^.:`
7382  new_path="$path"
7383  if test "x$has_colon" = x; then
7384    # Not in mixed or Windows style, start by that.
7385    new_path=`cmd //c echo $path`
7386  fi
7387
7388
7389  input_path="$new_path"
7390  # Check if we need to convert this using DOS-style short mode. If the path
7391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392  # take no chances and rewrite it.
7393  # Note: m4 eats our [], so we need to use [ and ] instead.
7394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395  if test "x$has_forbidden_chars" != x; then
7396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398  fi
7399
7400
7401  windows_path="$new_path"
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403    unix_path=`$CYGPATH -u "$windows_path"`
7404    new_path="$unix_path"
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407    new_path="$unix_path"
7408  fi
7409
7410  if test "x$path" != "x$new_path"; then
7411    SRC_ROOT="$new_path"
7412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7413$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7414  fi
7415
7416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418
7419  else
7420    # We're on a posix platform. Hooray! :)
7421    path="$SRC_ROOT"
7422    has_space=`$ECHO "$path" | $GREP " "`
7423    if test "x$has_space" != x; then
7424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7425$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7427    fi
7428
7429    # Use eval to expand a potential ~
7430    eval path="$path"
7431    if test ! -f "$path" && test ! -d "$path"; then
7432      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7433    fi
7434
7435    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7436  fi
7437
7438
7439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7440
7441  # Input might be given as Windows format, start by converting to
7442  # unix format.
7443  path="$CURDIR"
7444  new_path=`$CYGPATH -u "$path"`
7445
7446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7449  # "foo.exe" is OK but "foo" is an error.
7450  #
7451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7452  # It is also a way to make sure we got the proper file name for the real test later on.
7453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7454  if test "x$test_shortpath" = x; then
7455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7456$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7457    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7458  fi
7459
7460  # Call helper function which possibly converts this using DOS-style short mode.
7461  # If so, the updated path is stored in $new_path.
7462
7463  input_path="$new_path"
7464  # Check if we need to convert this using DOS-style short mode. If the path
7465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7466  # take no chances and rewrite it.
7467  # Note: m4 eats our [], so we need to use [ and ] instead.
7468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7469  if test "x$has_forbidden_chars" != x; then
7470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7474      # Going to short mode and back again did indeed matter. Since short mode is
7475      # case insensitive, let's make it lowercase to improve readability.
7476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7477      # Now convert it back to Unix-stile (cygpath)
7478      input_path=`$CYGPATH -u "$shortmode_path"`
7479      new_path="$input_path"
7480    fi
7481  fi
7482
7483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7484  if test "x$test_cygdrive_prefix" = x; then
7485    # As a simple fix, exclude /usr/bin since it's not a real path.
7486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7488      # a path prefixed by /cygdrive for fixpath to work.
7489      new_path="$CYGWIN_ROOT_PATH$input_path"
7490    fi
7491  fi
7492
7493
7494  if test "x$path" != "x$new_path"; then
7495    CURDIR="$new_path"
7496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7497$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7498  fi
7499
7500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7501
7502  path="$CURDIR"
7503  has_colon=`$ECHO $path | $GREP ^.:`
7504  new_path="$path"
7505  if test "x$has_colon" = x; then
7506    # Not in mixed or Windows style, start by that.
7507    new_path=`cmd //c echo $path`
7508  fi
7509
7510
7511  input_path="$new_path"
7512  # Check if we need to convert this using DOS-style short mode. If the path
7513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7514  # take no chances and rewrite it.
7515  # Note: m4 eats our [], so we need to use [ and ] instead.
7516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7517  if test "x$has_forbidden_chars" != x; then
7518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7520  fi
7521
7522
7523  windows_path="$new_path"
7524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7525    unix_path=`$CYGPATH -u "$windows_path"`
7526    new_path="$unix_path"
7527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7529    new_path="$unix_path"
7530  fi
7531
7532  if test "x$path" != "x$new_path"; then
7533    CURDIR="$new_path"
7534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7535$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7536  fi
7537
7538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7540
7541  else
7542    # We're on a posix platform. Hooray! :)
7543    path="$CURDIR"
7544    has_space=`$ECHO "$path" | $GREP " "`
7545    if test "x$has_space" != x; then
7546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7547$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7549    fi
7550
7551    # Use eval to expand a potential ~
7552    eval path="$path"
7553    if test ! -f "$path" && test ! -d "$path"; then
7554      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7555    fi
7556
7557    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7558  fi
7559
7560
7561  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7562    # Add extra search paths on solaris for utilities like ar and as etc...
7563    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7564  fi
7565
7566  # You can force the sys-root if the sys-root encoded into the cross compiler tools
7567  # is not correct.
7568
7569# Check whether --with-sys-root was given.
7570if test "${with_sys_root+set}" = set; then :
7571  withval=$with_sys_root;
7572fi
7573
7574
7575  if test "x$with_sys_root" != x; then
7576    SYS_ROOT=$with_sys_root
7577  else
7578    SYS_ROOT=/
7579  fi
7580
7581
7582
7583# Check whether --with-tools-dir was given.
7584if test "${with_tools_dir+set}" = set; then :
7585  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7586
7587fi
7588
7589
7590
7591# Check whether --with-devkit was given.
7592if test "${with_devkit+set}" = set; then :
7593  withval=$with_devkit;
7594        if test "x$with_sys_root" != x; then
7595          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7596        fi
7597
7598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7599
7600  # Input might be given as Windows format, start by converting to
7601  # unix format.
7602  path="$with_devkit"
7603  new_path=`$CYGPATH -u "$path"`
7604
7605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7608  # "foo.exe" is OK but "foo" is an error.
7609  #
7610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7611  # It is also a way to make sure we got the proper file name for the real test later on.
7612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7613  if test "x$test_shortpath" = x; then
7614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7615$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7616    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7617  fi
7618
7619  # Call helper function which possibly converts this using DOS-style short mode.
7620  # If so, the updated path is stored in $new_path.
7621
7622  input_path="$new_path"
7623  # Check if we need to convert this using DOS-style short mode. If the path
7624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7625  # take no chances and rewrite it.
7626  # Note: m4 eats our [], so we need to use [ and ] instead.
7627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7628  if test "x$has_forbidden_chars" != x; then
7629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7633      # Going to short mode and back again did indeed matter. Since short mode is
7634      # case insensitive, let's make it lowercase to improve readability.
7635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7636      # Now convert it back to Unix-stile (cygpath)
7637      input_path=`$CYGPATH -u "$shortmode_path"`
7638      new_path="$input_path"
7639    fi
7640  fi
7641
7642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7643  if test "x$test_cygdrive_prefix" = x; then
7644    # As a simple fix, exclude /usr/bin since it's not a real path.
7645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7647      # a path prefixed by /cygdrive for fixpath to work.
7648      new_path="$CYGWIN_ROOT_PATH$input_path"
7649    fi
7650  fi
7651
7652
7653  if test "x$path" != "x$new_path"; then
7654    with_devkit="$new_path"
7655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7656$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7657  fi
7658
7659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7660
7661  path="$with_devkit"
7662  has_colon=`$ECHO $path | $GREP ^.:`
7663  new_path="$path"
7664  if test "x$has_colon" = x; then
7665    # Not in mixed or Windows style, start by that.
7666    new_path=`cmd //c echo $path`
7667  fi
7668
7669
7670  input_path="$new_path"
7671  # Check if we need to convert this using DOS-style short mode. If the path
7672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7673  # take no chances and rewrite it.
7674  # Note: m4 eats our [], so we need to use [ and ] instead.
7675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7676  if test "x$has_forbidden_chars" != x; then
7677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7679  fi
7680
7681
7682  windows_path="$new_path"
7683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7684    unix_path=`$CYGPATH -u "$windows_path"`
7685    new_path="$unix_path"
7686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7688    new_path="$unix_path"
7689  fi
7690
7691  if test "x$path" != "x$new_path"; then
7692    with_devkit="$new_path"
7693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7694$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7695  fi
7696
7697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7699
7700  else
7701    # We're on a posix platform. Hooray! :)
7702    path="$with_devkit"
7703    has_space=`$ECHO "$path" | $GREP " "`
7704    if test "x$has_space" != x; then
7705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7706$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7707      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7708    fi
7709
7710    # Use eval to expand a potential ~
7711    eval path="$path"
7712    if test ! -f "$path" && test ! -d "$path"; then
7713      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7714    fi
7715
7716    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7717  fi
7718
7719
7720  if test "x$TOOLS_DIR" = x; then
7721    TOOLS_DIR="$with_devkit/bin"
7722  else
7723    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7724  fi
7725
7726        if test -d "$with_devkit/$host_alias/libc"; then
7727          SYS_ROOT=$with_devkit/$host_alias/libc
7728        elif test -d "$with_devkit/$host/sys-root"; then
7729          SYS_ROOT=$with_devkit/$host/sys-root
7730        fi
7731
7732fi
7733
7734
7735
7736  # Setup default logging of stdout and stderr to build.log in the output root.
7737  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7738  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7739  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7740
7741
7742
7743
7744
7745# Check if it's a pure open build or if custom sources are to be used.
7746
7747  # Check whether --enable-openjdk-only was given.
7748if test "${enable_openjdk_only+set}" = set; then :
7749  enableval=$enable_openjdk_only;
7750else
7751  enable_openjdk_only="no"
7752fi
7753
7754
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7756$as_echo_n "checking for presence of closed sources... " >&6; }
7757  if test -d "$SRC_ROOT/jdk/src/closed"; then
7758    CLOSED_SOURCE_PRESENT=yes
7759  else
7760    CLOSED_SOURCE_PRESENT=no
7761  fi
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7763$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7764
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7766$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7767  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7769$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7770
7771  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7772    OPENJDK=true
7773    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7774      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7775$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7776    fi
7777  else
7778    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7779      OPENJDK=true
7780    else
7781      OPENJDK=false
7782    fi
7783  fi
7784
7785  if test "x$OPENJDK" = "xtrue"; then
7786    SET_OPENJDK="OPENJDK=true"
7787  fi
7788
7789
7790
7791
7792# These are needed to be able to create a configuration name (and thus the output directory)
7793
7794  ###############################################################################
7795  #
7796  # Check which variant of the JDK that we want to build.
7797  # Currently we have:
7798  #    normal:   standard edition
7799  # but the custom make system may add other variants
7800  #
7801  # Effectively the JDK variant gives a name to a specific set of
7802  # modules to compile into the JDK. In the future, these modules
7803  # might even be Jigsaw modules.
7804  #
7805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7806$as_echo_n "checking which variant of the JDK to build... " >&6; }
7807
7808# Check whether --with-jdk-variant was given.
7809if test "${with_jdk_variant+set}" = set; then :
7810  withval=$with_jdk_variant;
7811fi
7812
7813
7814  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7815    JDK_VARIANT="normal"
7816  else
7817    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7818  fi
7819
7820
7821
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7823$as_echo "$JDK_VARIANT" >&6; }
7824
7825
7826###############################################################################
7827#
7828# Check which interpreter of the JVM we want to build.
7829# Currently we have:
7830#    template: Template interpreter (the default)
7831#    cpp     : C++ interpreter
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7833$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7834
7835# Check whether --with-jvm-interpreter was given.
7836if test "${with_jvm_interpreter+set}" = set; then :
7837  withval=$with_jvm_interpreter;
7838fi
7839
7840
7841if test "x$with_jvm_interpreter" = x; then
7842     with_jvm_interpreter="template"
7843fi
7844
7845JVM_INTERPRETER="$with_jvm_interpreter"
7846
7847if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7848   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7849fi
7850
7851
7852
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7854$as_echo "$with_jvm_interpreter" >&6; }
7855
7856
7857
7858  ###############################################################################
7859  #
7860  # Check which variants of the JVM that we want to build.
7861  # Currently we have:
7862  #    server: normal interpreter and a tiered C1/C2 compiler
7863  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7864  #    minimal1: reduced form of client with optional VM services and features stripped out
7865  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7866  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7867  #    zero: no machine code interpreter, no compiler
7868  #    zeroshark: zero interpreter and shark/llvm compiler backend
7869#    core: interpreter only, no compiler (only works on some platforms)
7870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7871$as_echo_n "checking which variants of the JVM to build... " >&6; }
7872
7873# Check whether --with-jvm-variants was given.
7874if test "${with_jvm_variants+set}" = set; then :
7875  withval=$with_jvm_variants;
7876fi
7877
7878
7879  if test "x$with_jvm_variants" = x; then
7880    with_jvm_variants="server"
7881  fi
7882
7883  JVM_VARIANTS=",$with_jvm_variants,"
7884  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7885
7886  if test "x$TEST_VARIANTS" != "x,"; then
7887     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7888  fi
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7890$as_echo "$with_jvm_variants" >&6; }
7891
7892  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7893  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7894  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7895  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7896  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7897  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7898  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7899
7900  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7901    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7902      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7903    fi
7904  fi
7905  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7906    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7907      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7908    fi
7909  fi
7910  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7911    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7912      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7913    fi
7914  fi
7915
7916  # Replace the commas with AND for use in the build directory name.
7917  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7918  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/' -e 's/core,/1/'`
7919  if test "x$COUNT_VARIANTS" != "x,1"; then
7920    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7921  else
7922    BUILDING_MULTIPLE_JVM_VARIANTS=no
7923  fi
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934  INCLUDE_SA=true
7935  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7936    INCLUDE_SA=false
7937  fi
7938  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7939    INCLUDE_SA=false
7940  fi
7941  if test "x$VAR_CPU" = xppc64 ; then
7942    INCLUDE_SA=false
7943  fi
7944
7945
7946  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7947    MACOSX_UNIVERSAL="true"
7948  fi
7949
7950
7951
7952
7953  ###############################################################################
7954  #
7955  # Set the debug level
7956  #    release: no debug information, all optimizations, no asserts.
7957  #    fastdebug: debug information (-g), all optimizations, all asserts
7958  #    slowdebug: debug information (-g), no optimizations, all asserts
7959  #
7960  DEBUG_LEVEL="release"
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7962$as_echo_n "checking which debug level to use... " >&6; }
7963  # Check whether --enable-debug was given.
7964if test "${enable_debug+set}" = set; then :
7965  enableval=$enable_debug;
7966        ENABLE_DEBUG="${enableval}"
7967        DEBUG_LEVEL="fastdebug"
7968
7969else
7970  ENABLE_DEBUG="no"
7971fi
7972
7973
7974
7975# Check whether --with-debug-level was given.
7976if test "${with_debug_level+set}" = set; then :
7977  withval=$with_debug_level;
7978        DEBUG_LEVEL="${withval}"
7979        if test "x$ENABLE_DEBUG" = xyes; then
7980          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7981        fi
7982
7983fi
7984
7985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7986$as_echo "$DEBUG_LEVEL" >&6; }
7987
7988  if test "x$DEBUG_LEVEL" != xrelease && \
7989      test "x$DEBUG_LEVEL" != xfastdebug && \
7990      test "x$DEBUG_LEVEL" != xslowdebug; then
7991    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7992  fi
7993
7994
7995  ###############################################################################
7996  #
7997  # Setup legacy vars/targets and new vars to deal with different debug levels.
7998  #
7999
8000  case $DEBUG_LEVEL in
8001    release )
8002      VARIANT="OPT"
8003      FASTDEBUG="false"
8004      DEBUG_CLASSFILES="false"
8005      BUILD_VARIANT_RELEASE=""
8006      HOTSPOT_DEBUG_LEVEL="product"
8007      HOTSPOT_EXPORT="product"
8008      ;;
8009    fastdebug )
8010      VARIANT="DBG"
8011      FASTDEBUG="true"
8012      DEBUG_CLASSFILES="true"
8013      BUILD_VARIANT_RELEASE="-fastdebug"
8014      HOTSPOT_DEBUG_LEVEL="fastdebug"
8015      HOTSPOT_EXPORT="fastdebug"
8016      ;;
8017    slowdebug )
8018      VARIANT="DBG"
8019      FASTDEBUG="false"
8020      DEBUG_CLASSFILES="true"
8021      BUILD_VARIANT_RELEASE="-debug"
8022      HOTSPOT_DEBUG_LEVEL="jvmg"
8023      HOTSPOT_EXPORT="debug"
8024      ;;
8025  esac
8026
8027  #####
8028  # Generate the legacy makefile targets for hotspot.
8029  # The hotspot api for selecting the build artifacts, really, needs to be improved.
8030  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8031  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8032  # But until then ...
8033  HOTSPOT_TARGET=""
8034
8035  if test "x$JVM_VARIANT_SERVER" = xtrue; then
8036    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8037  fi
8038
8039  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8040    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8041  fi
8042
8043  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8044    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8045  fi
8046
8047  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8048    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8049  fi
8050
8051  if test "x$JVM_VARIANT_ZERO" = xtrue; then
8052    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8053  fi
8054
8055  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8056    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8057  fi
8058
8059  if test "x$JVM_VARIANT_CORE" = xtrue; then
8060    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8061  fi
8062
8063  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8064
8065  # On Macosx universal binaries are produced, but they only contain
8066  # 64 bit intel. This invalidates control of which jvms are built
8067  # from configure, but only server is valid anyway. Fix this
8068  # when hotspot makefiles are rewritten.
8069  if test "x$MACOSX_UNIVERSAL" = xtrue; then
8070    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8071  fi
8072
8073  #####
8074
8075
8076
8077
8078
8079
8080
8081
8082# With basic setup done, call the custom early hook.
8083
8084
8085# To properly create a configuration name, we need to have the OpenJDK target
8086# and options (variants and debug level) parsed.
8087
8088
8089
8090# Check whether --with-conf-name was given.
8091if test "${with_conf_name+set}" = set; then :
8092  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8093fi
8094
8095
8096  # Test from where we are running configure, in or outside of src root.
8097  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8098      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8099      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8100    # We are running configure from the src root.
8101    # Create a default ./build/target-variant-debuglevel output root.
8102    if test "x${CONF_NAME}" = x; then
8103      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8104    fi
8105    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8106    $MKDIR -p "$OUTPUT_ROOT"
8107    if test ! -d "$OUTPUT_ROOT"; then
8108      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8109    fi
8110  else
8111    # We are running configure from outside of the src dir.
8112    # Then use the current directory as output dir!
8113    # If configuration is situated in normal build directory, just use the build
8114    # directory name as configuration name, otherwise use the complete path.
8115    if test "x${CONF_NAME}" = x; then
8116      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8117    fi
8118    OUTPUT_ROOT="$CURDIR"
8119
8120    # WARNING: This might be a bad thing to do. You need to be sure you want to
8121    # have a configuration in this directory. Do some sanity checks!
8122
8123    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8124      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8125      # other files
8126      files_present=`$LS $OUTPUT_ROOT`
8127      # Configure has already touched config.log and confdefs.h in the current dir when this check
8128      # is performed.
8129      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8130      | $TR -d '\n'`
8131      if test "x$filtered_files" != x; then
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8133$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8135$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8137$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8138        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8139$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8140        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8141$as_echo "$as_me: seriously mess up just about everything." >&6;}
8142        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8143$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8144        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8145$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8146        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8147      fi
8148    fi
8149  fi
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8151$as_echo_n "checking what configuration name to use... " >&6; }
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8153$as_echo "$CONF_NAME" >&6; }
8154
8155
8156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8157
8158  # Input might be given as Windows format, start by converting to
8159  # unix format.
8160  path="$OUTPUT_ROOT"
8161  new_path=`$CYGPATH -u "$path"`
8162
8163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8166  # "foo.exe" is OK but "foo" is an error.
8167  #
8168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8169  # It is also a way to make sure we got the proper file name for the real test later on.
8170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8171  if test "x$test_shortpath" = x; then
8172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8173$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8174    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8175  fi
8176
8177  # Call helper function which possibly converts this using DOS-style short mode.
8178  # If so, the updated path is stored in $new_path.
8179
8180  input_path="$new_path"
8181  # Check if we need to convert this using DOS-style short mode. If the path
8182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8183  # take no chances and rewrite it.
8184  # Note: m4 eats our [], so we need to use [ and ] instead.
8185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8186  if test "x$has_forbidden_chars" != x; then
8187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8191      # Going to short mode and back again did indeed matter. Since short mode is
8192      # case insensitive, let's make it lowercase to improve readability.
8193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8194      # Now convert it back to Unix-stile (cygpath)
8195      input_path=`$CYGPATH -u "$shortmode_path"`
8196      new_path="$input_path"
8197    fi
8198  fi
8199
8200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8201  if test "x$test_cygdrive_prefix" = x; then
8202    # As a simple fix, exclude /usr/bin since it's not a real path.
8203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8205      # a path prefixed by /cygdrive for fixpath to work.
8206      new_path="$CYGWIN_ROOT_PATH$input_path"
8207    fi
8208  fi
8209
8210
8211  if test "x$path" != "x$new_path"; then
8212    OUTPUT_ROOT="$new_path"
8213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8214$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8215  fi
8216
8217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8218
8219  path="$OUTPUT_ROOT"
8220  has_colon=`$ECHO $path | $GREP ^.:`
8221  new_path="$path"
8222  if test "x$has_colon" = x; then
8223    # Not in mixed or Windows style, start by that.
8224    new_path=`cmd //c echo $path`
8225  fi
8226
8227
8228  input_path="$new_path"
8229  # Check if we need to convert this using DOS-style short mode. If the path
8230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8231  # take no chances and rewrite it.
8232  # Note: m4 eats our [], so we need to use [ and ] instead.
8233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8234  if test "x$has_forbidden_chars" != x; then
8235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8237  fi
8238
8239
8240  windows_path="$new_path"
8241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8242    unix_path=`$CYGPATH -u "$windows_path"`
8243    new_path="$unix_path"
8244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8246    new_path="$unix_path"
8247  fi
8248
8249  if test "x$path" != "x$new_path"; then
8250    OUTPUT_ROOT="$new_path"
8251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8252$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8253  fi
8254
8255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8257
8258  else
8259    # We're on a posix platform. Hooray! :)
8260    path="$OUTPUT_ROOT"
8261    has_space=`$ECHO "$path" | $GREP " "`
8262    if test "x$has_space" != x; then
8263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8264$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8265      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8266    fi
8267
8268    # Use eval to expand a potential ~
8269    eval path="$path"
8270    if test ! -f "$path" && test ! -d "$path"; then
8271      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8272    fi
8273
8274    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8275  fi
8276
8277
8278  SPEC=$OUTPUT_ROOT/spec.gmk
8279
8280  CONF_NAME=$CONF_NAME
8281
8282  OUTPUT_ROOT=$OUTPUT_ROOT
8283
8284
8285  # Most of the probed defines are put into config.h
8286  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8287
8288  # The spec.gmk file contains all variables for the make system.
8289  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8290
8291  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8292  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8293
8294  # The bootcycle-spec.gmk file contains support for boot cycle builds.
8295  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8296
8297  # The compare.sh is used to compare the build output to other builds.
8298  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8299
8300  # Spec.sh is currently used by compare-objects.sh
8301  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8302
8303  # The generated Makefile knows where the spec.gmk is and where the source is.
8304  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8305  # which will look for generated configurations
8306  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8307
8308
8309  # Save the arguments given to us
8310  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8311
8312
8313# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8314
8315  for ac_prog in apt-get yum port pkgutil pkgadd
8316do
8317  # Extract the first word of "$ac_prog", so it can be a program name with args.
8318set dummy $ac_prog; ac_word=$2
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320$as_echo_n "checking for $ac_word... " >&6; }
8321if ${ac_cv_prog_PKGHANDLER+:} false; then :
8322  $as_echo_n "(cached) " >&6
8323else
8324  if test -n "$PKGHANDLER"; then
8325  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8326else
8327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328for as_dir in $PATH
8329do
8330  IFS=$as_save_IFS
8331  test -z "$as_dir" && as_dir=.
8332    for ac_exec_ext in '' $ac_executable_extensions; do
8333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8334    ac_cv_prog_PKGHANDLER="$ac_prog"
8335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8336    break 2
8337  fi
8338done
8339  done
8340IFS=$as_save_IFS
8341
8342fi
8343fi
8344PKGHANDLER=$ac_cv_prog_PKGHANDLER
8345if test -n "$PKGHANDLER"; then
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8347$as_echo "$PKGHANDLER" >&6; }
8348else
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350$as_echo "no" >&6; }
8351fi
8352
8353
8354  test -n "$PKGHANDLER" && break
8355done
8356
8357
8358
8359# Setup tools that requires more complex handling, or that is not needed by the configure script.
8360
8361
8362  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8363  if test "x$MAKE" != x; then
8364    # User has supplied a make, test it.
8365    if test ! -f "$MAKE"; then
8366      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8367    fi
8368
8369  MAKE_CANDIDATE=""$MAKE""
8370  DESCRIPTION="user supplied MAKE=$MAKE"
8371  if test "x$MAKE_CANDIDATE" != x; then
8372    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8373$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8374    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8375    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8376    if test "x$IS_GNU_MAKE" = x; then
8377      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8378$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8379    else
8380      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8381      if test "x$IS_MODERN_MAKE" = x; then
8382        { $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
8383$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;}
8384      else
8385        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8386          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8387            MAKE_EXPECTED_ENV='cygwin'
8388          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8389            MAKE_EXPECTED_ENV='msys'
8390          else
8391            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8392          fi
8393          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8394          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8395        else
8396          # Not relevant for non-Windows
8397          IS_MAKE_CORRECT_ENV=true
8398        fi
8399        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8400          { $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
8401$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;}
8402        else
8403          FOUND_MAKE=$MAKE_CANDIDATE
8404
8405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8406
8407  # First separate the path from the arguments. This will split at the first
8408  # space.
8409  complete="$FOUND_MAKE"
8410  path="${complete%% *}"
8411  tmp="$complete EOL"
8412  arguments="${tmp#* }"
8413
8414  # Input might be given as Windows format, start by converting to
8415  # unix format.
8416  new_path=`$CYGPATH -u "$path"`
8417
8418  # Now try to locate executable using which
8419  new_path=`$WHICH "$new_path" 2> /dev/null`
8420  # bat and cmd files are not always considered executable in cygwin causing which
8421  # to not find them
8422  if test "x$new_path" = x \
8423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8425    new_path=`$CYGPATH -u "$path"`
8426  fi
8427  if test "x$new_path" = x; then
8428    # Oops. Which didn't find the executable.
8429    # The splitting of arguments from the executable at a space might have been incorrect,
8430    # since paths with space are more likely in Windows. Give it another try with the whole
8431    # argument.
8432    path="$complete"
8433    arguments="EOL"
8434    new_path=`$CYGPATH -u "$path"`
8435    new_path=`$WHICH "$new_path" 2> /dev/null`
8436    # bat and cmd files are not always considered executable in cygwin causing which
8437    # to not find them
8438    if test "x$new_path" = x \
8439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8441      new_path=`$CYGPATH -u "$path"`
8442    fi
8443    if test "x$new_path" = x; then
8444      # It's still not found. Now this is an unrecoverable error.
8445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8447      has_space=`$ECHO "$complete" | $GREP " "`
8448      if test "x$has_space" != x; then
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8451      fi
8452      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8453    fi
8454  fi
8455
8456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8459  # "foo.exe" is OK but "foo" is an error.
8460  #
8461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8462  # It is also a way to make sure we got the proper file name for the real test later on.
8463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8464  if test "x$test_shortpath" = x; then
8465    # Short path failed, file does not exist as specified.
8466    # Try adding .exe or .cmd
8467    if test -f "${new_path}.exe"; then
8468      input_to_shortpath="${new_path}.exe"
8469    elif test -f "${new_path}.cmd"; then
8470      input_to_shortpath="${new_path}.cmd"
8471    else
8472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8477    fi
8478  else
8479    input_to_shortpath="$new_path"
8480  fi
8481
8482  # Call helper function which possibly converts this using DOS-style short mode.
8483  # If so, the updated path is stored in $new_path.
8484  new_path="$input_to_shortpath"
8485
8486  input_path="$input_to_shortpath"
8487  # Check if we need to convert this using DOS-style short mode. If the path
8488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8489  # take no chances and rewrite it.
8490  # Note: m4 eats our [], so we need to use [ and ] instead.
8491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8492  if test "x$has_forbidden_chars" != x; then
8493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8497      # Going to short mode and back again did indeed matter. Since short mode is
8498      # case insensitive, let's make it lowercase to improve readability.
8499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8500      # Now convert it back to Unix-stile (cygpath)
8501      input_path=`$CYGPATH -u "$shortmode_path"`
8502      new_path="$input_path"
8503    fi
8504  fi
8505
8506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8507  if test "x$test_cygdrive_prefix" = x; then
8508    # As a simple fix, exclude /usr/bin since it's not a real path.
8509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8511      # a path prefixed by /cygdrive for fixpath to work.
8512      new_path="$CYGWIN_ROOT_PATH$input_path"
8513    fi
8514  fi
8515
8516  # remove trailing .exe if any
8517  new_path="${new_path/%.exe/}"
8518
8519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8520
8521  # First separate the path from the arguments. This will split at the first
8522  # space.
8523  complete="$FOUND_MAKE"
8524  path="${complete%% *}"
8525  tmp="$complete EOL"
8526  arguments="${tmp#* }"
8527
8528  # Input might be given as Windows format, start by converting to
8529  # unix format.
8530  new_path="$path"
8531
8532  windows_path="$new_path"
8533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8534    unix_path=`$CYGPATH -u "$windows_path"`
8535    new_path="$unix_path"
8536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8538    new_path="$unix_path"
8539  fi
8540
8541
8542  # Now try to locate executable using which
8543  new_path=`$WHICH "$new_path" 2> /dev/null`
8544
8545  if test "x$new_path" = x; then
8546    # Oops. Which didn't find the executable.
8547    # The splitting of arguments from the executable at a space might have been incorrect,
8548    # since paths with space are more likely in Windows. Give it another try with the whole
8549    # argument.
8550    path="$complete"
8551    arguments="EOL"
8552    new_path="$path"
8553
8554  windows_path="$new_path"
8555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8556    unix_path=`$CYGPATH -u "$windows_path"`
8557    new_path="$unix_path"
8558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8560    new_path="$unix_path"
8561  fi
8562
8563
8564    new_path=`$WHICH "$new_path" 2> /dev/null`
8565
8566    if test "x$new_path" = x; then
8567      # It's still not found. Now this is an unrecoverable error.
8568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8570      has_space=`$ECHO "$complete" | $GREP " "`
8571      if test "x$has_space" != x; then
8572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8574      fi
8575      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8576    fi
8577  fi
8578
8579  # Now new_path has a complete unix path to the binary
8580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8581    # Keep paths in /bin as-is, but remove trailing .exe if any
8582    new_path="${new_path/%.exe/}"
8583    # Do not save /bin paths to all_fixpath_prefixes!
8584  else
8585    # Not in mixed or Windows style, start by that.
8586    new_path=`cmd //c echo $new_path`
8587
8588  input_path="$new_path"
8589  # Check if we need to convert this using DOS-style short mode. If the path
8590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8591  # take no chances and rewrite it.
8592  # Note: m4 eats our [], so we need to use [ and ] instead.
8593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8594  if test "x$has_forbidden_chars" != x; then
8595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8597  fi
8598
8599    # Output is in $new_path
8600
8601  windows_path="$new_path"
8602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8603    unix_path=`$CYGPATH -u "$windows_path"`
8604    new_path="$unix_path"
8605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8607    new_path="$unix_path"
8608  fi
8609
8610    # remove trailing .exe if any
8611    new_path="${new_path/%.exe/}"
8612
8613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8615  fi
8616
8617  else
8618    # We're on a posix platform. Hooray! :)
8619    # First separate the path from the arguments. This will split at the first
8620    # space.
8621    complete="$FOUND_MAKE"
8622    path="${complete%% *}"
8623    tmp="$complete EOL"
8624    arguments="${tmp#* }"
8625
8626    # Cannot rely on the command "which" here since it doesn't always work.
8627    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8628    if test -z "$is_absolute_path"; then
8629      # Path to executable is not absolute. Find it.
8630      IFS_save="$IFS"
8631      IFS=:
8632      for p in $PATH; do
8633        if test -f "$p/$path" && test -x "$p/$path"; then
8634          new_path="$p/$path"
8635          break
8636        fi
8637      done
8638      IFS="$IFS_save"
8639    else
8640      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8641$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8642      new_path="$path"
8643    fi
8644
8645    if test "x$new_path" = x; then
8646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8648      has_space=`$ECHO "$complete" | $GREP " "`
8649      if test "x$has_space" != x; then
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8652      fi
8653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8654    fi
8655  fi
8656
8657  # Now join together the path and the arguments once again
8658  if test "x$arguments" != xEOL; then
8659    new_complete="$new_path ${arguments% *}"
8660  else
8661    new_complete="$new_path"
8662  fi
8663
8664  if test "x$complete" != "x$new_complete"; then
8665    FOUND_MAKE="$new_complete"
8666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8667$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8668  fi
8669
8670        fi
8671      fi
8672    fi
8673  fi
8674
8675    if test "x$FOUND_MAKE" = x; then
8676      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8677    fi
8678  else
8679    # Try our hardest to locate a correct version of GNU make
8680    for ac_prog in gmake
8681do
8682  # Extract the first word of "$ac_prog", so it can be a program name with args.
8683set dummy $ac_prog; ac_word=$2
8684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8685$as_echo_n "checking for $ac_word... " >&6; }
8686if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8687  $as_echo_n "(cached) " >&6
8688else
8689  case $CHECK_GMAKE in
8690  [\\/]* | ?:[\\/]*)
8691  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8692  ;;
8693  *)
8694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8695for as_dir in $PATH
8696do
8697  IFS=$as_save_IFS
8698  test -z "$as_dir" && as_dir=.
8699    for ac_exec_ext in '' $ac_executable_extensions; do
8700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8701    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8703    break 2
8704  fi
8705done
8706  done
8707IFS=$as_save_IFS
8708
8709  ;;
8710esac
8711fi
8712CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8713if test -n "$CHECK_GMAKE"; then
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8715$as_echo "$CHECK_GMAKE" >&6; }
8716else
8717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718$as_echo "no" >&6; }
8719fi
8720
8721
8722  test -n "$CHECK_GMAKE" && break
8723done
8724
8725
8726  MAKE_CANDIDATE=""$CHECK_GMAKE""
8727  DESCRIPTION="gmake in PATH"
8728  if test "x$MAKE_CANDIDATE" != x; then
8729    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8730$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8731    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8732    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8733    if test "x$IS_GNU_MAKE" = x; then
8734      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8735$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8736    else
8737      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8738      if test "x$IS_MODERN_MAKE" = x; then
8739        { $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
8740$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;}
8741      else
8742        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8743          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8744            MAKE_EXPECTED_ENV='cygwin'
8745          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8746            MAKE_EXPECTED_ENV='msys'
8747          else
8748            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8749          fi
8750          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8751          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8752        else
8753          # Not relevant for non-Windows
8754          IS_MAKE_CORRECT_ENV=true
8755        fi
8756        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8757          { $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
8758$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;}
8759        else
8760          FOUND_MAKE=$MAKE_CANDIDATE
8761
8762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8763
8764  # First separate the path from the arguments. This will split at the first
8765  # space.
8766  complete="$FOUND_MAKE"
8767  path="${complete%% *}"
8768  tmp="$complete EOL"
8769  arguments="${tmp#* }"
8770
8771  # Input might be given as Windows format, start by converting to
8772  # unix format.
8773  new_path=`$CYGPATH -u "$path"`
8774
8775  # Now try to locate executable using which
8776  new_path=`$WHICH "$new_path" 2> /dev/null`
8777  # bat and cmd files are not always considered executable in cygwin causing which
8778  # to not find them
8779  if test "x$new_path" = x \
8780      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8781      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8782    new_path=`$CYGPATH -u "$path"`
8783  fi
8784  if test "x$new_path" = x; then
8785    # Oops. Which didn't find the executable.
8786    # The splitting of arguments from the executable at a space might have been incorrect,
8787    # since paths with space are more likely in Windows. Give it another try with the whole
8788    # argument.
8789    path="$complete"
8790    arguments="EOL"
8791    new_path=`$CYGPATH -u "$path"`
8792    new_path=`$WHICH "$new_path" 2> /dev/null`
8793    # bat and cmd files are not always considered executable in cygwin causing which
8794    # to not find them
8795    if test "x$new_path" = x \
8796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8798      new_path=`$CYGPATH -u "$path"`
8799    fi
8800    if test "x$new_path" = x; then
8801      # It's still not found. Now this is an unrecoverable error.
8802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8803$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8804      has_space=`$ECHO "$complete" | $GREP " "`
8805      if test "x$has_space" != x; then
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8808      fi
8809      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8810    fi
8811  fi
8812
8813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8816  # "foo.exe" is OK but "foo" is an error.
8817  #
8818  # This test is therefore slightly more accurate than "test -f" to check for file presence.
8819  # It is also a way to make sure we got the proper file name for the real test later on.
8820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8821  if test "x$test_shortpath" = x; then
8822    # Short path failed, file does not exist as specified.
8823    # Try adding .exe or .cmd
8824    if test -f "${new_path}.exe"; then
8825      input_to_shortpath="${new_path}.exe"
8826    elif test -f "${new_path}.cmd"; then
8827      input_to_shortpath="${new_path}.cmd"
8828    else
8829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8831      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8832$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8834    fi
8835  else
8836    input_to_shortpath="$new_path"
8837  fi
8838
8839  # Call helper function which possibly converts this using DOS-style short mode.
8840  # If so, the updated path is stored in $new_path.
8841  new_path="$input_to_shortpath"
8842
8843  input_path="$input_to_shortpath"
8844  # Check if we need to convert this using DOS-style short mode. If the path
8845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8846  # take no chances and rewrite it.
8847  # Note: m4 eats our [], so we need to use [ and ] instead.
8848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8849  if test "x$has_forbidden_chars" != x; then
8850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8854      # Going to short mode and back again did indeed matter. Since short mode is
8855      # case insensitive, let's make it lowercase to improve readability.
8856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8857      # Now convert it back to Unix-stile (cygpath)
8858      input_path=`$CYGPATH -u "$shortmode_path"`
8859      new_path="$input_path"
8860    fi
8861  fi
8862
8863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8864  if test "x$test_cygdrive_prefix" = x; then
8865    # As a simple fix, exclude /usr/bin since it's not a real path.
8866    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8868      # a path prefixed by /cygdrive for fixpath to work.
8869      new_path="$CYGWIN_ROOT_PATH$input_path"
8870    fi
8871  fi
8872
8873  # remove trailing .exe if any
8874  new_path="${new_path/%.exe/}"
8875
8876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8877
8878  # First separate the path from the arguments. This will split at the first
8879  # space.
8880  complete="$FOUND_MAKE"
8881  path="${complete%% *}"
8882  tmp="$complete EOL"
8883  arguments="${tmp#* }"
8884
8885  # Input might be given as Windows format, start by converting to
8886  # unix format.
8887  new_path="$path"
8888
8889  windows_path="$new_path"
8890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8891    unix_path=`$CYGPATH -u "$windows_path"`
8892    new_path="$unix_path"
8893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8895    new_path="$unix_path"
8896  fi
8897
8898
8899  # Now try to locate executable using which
8900  new_path=`$WHICH "$new_path" 2> /dev/null`
8901
8902  if test "x$new_path" = x; then
8903    # Oops. Which didn't find the executable.
8904    # The splitting of arguments from the executable at a space might have been incorrect,
8905    # since paths with space are more likely in Windows. Give it another try with the whole
8906    # argument.
8907    path="$complete"
8908    arguments="EOL"
8909    new_path="$path"
8910
8911  windows_path="$new_path"
8912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8913    unix_path=`$CYGPATH -u "$windows_path"`
8914    new_path="$unix_path"
8915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8917    new_path="$unix_path"
8918  fi
8919
8920
8921    new_path=`$WHICH "$new_path" 2> /dev/null`
8922
8923    if test "x$new_path" = x; then
8924      # It's still not found. Now this is an unrecoverable error.
8925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8926$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8927      has_space=`$ECHO "$complete" | $GREP " "`
8928      if test "x$has_space" != x; then
8929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8931      fi
8932      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8933    fi
8934  fi
8935
8936  # Now new_path has a complete unix path to the binary
8937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8938    # Keep paths in /bin as-is, but remove trailing .exe if any
8939    new_path="${new_path/%.exe/}"
8940    # Do not save /bin paths to all_fixpath_prefixes!
8941  else
8942    # Not in mixed or Windows style, start by that.
8943    new_path=`cmd //c echo $new_path`
8944
8945  input_path="$new_path"
8946  # Check if we need to convert this using DOS-style short mode. If the path
8947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8948  # take no chances and rewrite it.
8949  # Note: m4 eats our [], so we need to use [ and ] instead.
8950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8951  if test "x$has_forbidden_chars" != x; then
8952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8954  fi
8955
8956    # Output is in $new_path
8957
8958  windows_path="$new_path"
8959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8960    unix_path=`$CYGPATH -u "$windows_path"`
8961    new_path="$unix_path"
8962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8964    new_path="$unix_path"
8965  fi
8966
8967    # remove trailing .exe if any
8968    new_path="${new_path/%.exe/}"
8969
8970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8972  fi
8973
8974  else
8975    # We're on a posix platform. Hooray! :)
8976    # First separate the path from the arguments. This will split at the first
8977    # space.
8978    complete="$FOUND_MAKE"
8979    path="${complete%% *}"
8980    tmp="$complete EOL"
8981    arguments="${tmp#* }"
8982
8983    # Cannot rely on the command "which" here since it doesn't always work.
8984    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8985    if test -z "$is_absolute_path"; then
8986      # Path to executable is not absolute. Find it.
8987      IFS_save="$IFS"
8988      IFS=:
8989      for p in $PATH; do
8990        if test -f "$p/$path" && test -x "$p/$path"; then
8991          new_path="$p/$path"
8992          break
8993        fi
8994      done
8995      IFS="$IFS_save"
8996    else
8997      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8998$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8999      new_path="$path"
9000    fi
9001
9002    if test "x$new_path" = x; then
9003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9005      has_space=`$ECHO "$complete" | $GREP " "`
9006      if test "x$has_space" != x; then
9007        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9009      fi
9010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9011    fi
9012  fi
9013
9014  # Now join together the path and the arguments once again
9015  if test "x$arguments" != xEOL; then
9016    new_complete="$new_path ${arguments% *}"
9017  else
9018    new_complete="$new_path"
9019  fi
9020
9021  if test "x$complete" != "x$new_complete"; then
9022    FOUND_MAKE="$new_complete"
9023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9024$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9025  fi
9026
9027        fi
9028      fi
9029    fi
9030  fi
9031
9032
9033    if test "x$FOUND_MAKE" = x; then
9034      for ac_prog in make
9035do
9036  # Extract the first word of "$ac_prog", so it can be a program name with args.
9037set dummy $ac_prog; ac_word=$2
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9039$as_echo_n "checking for $ac_word... " >&6; }
9040if ${ac_cv_path_CHECK_MAKE+:} false; then :
9041  $as_echo_n "(cached) " >&6
9042else
9043  case $CHECK_MAKE in
9044  [\\/]* | ?:[\\/]*)
9045  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9046  ;;
9047  *)
9048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049for as_dir in $PATH
9050do
9051  IFS=$as_save_IFS
9052  test -z "$as_dir" && as_dir=.
9053    for ac_exec_ext in '' $ac_executable_extensions; do
9054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9055    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9057    break 2
9058  fi
9059done
9060  done
9061IFS=$as_save_IFS
9062
9063  ;;
9064esac
9065fi
9066CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9067if test -n "$CHECK_MAKE"; then
9068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9069$as_echo "$CHECK_MAKE" >&6; }
9070else
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072$as_echo "no" >&6; }
9073fi
9074
9075
9076  test -n "$CHECK_MAKE" && break
9077done
9078
9079
9080  MAKE_CANDIDATE=""$CHECK_MAKE""
9081  DESCRIPTION="make in PATH"
9082  if test "x$MAKE_CANDIDATE" != x; then
9083    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9084$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9085    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9086    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9087    if test "x$IS_GNU_MAKE" = x; then
9088      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9089$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9090    else
9091      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9092      if test "x$IS_MODERN_MAKE" = x; then
9093        { $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
9094$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;}
9095      else
9096        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9097          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9098            MAKE_EXPECTED_ENV='cygwin'
9099          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9100            MAKE_EXPECTED_ENV='msys'
9101          else
9102            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9103          fi
9104          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9105          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9106        else
9107          # Not relevant for non-Windows
9108          IS_MAKE_CORRECT_ENV=true
9109        fi
9110        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9111          { $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
9112$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;}
9113        else
9114          FOUND_MAKE=$MAKE_CANDIDATE
9115
9116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9117
9118  # First separate the path from the arguments. This will split at the first
9119  # space.
9120  complete="$FOUND_MAKE"
9121  path="${complete%% *}"
9122  tmp="$complete EOL"
9123  arguments="${tmp#* }"
9124
9125  # Input might be given as Windows format, start by converting to
9126  # unix format.
9127  new_path=`$CYGPATH -u "$path"`
9128
9129  # Now try to locate executable using which
9130  new_path=`$WHICH "$new_path" 2> /dev/null`
9131  # bat and cmd files are not always considered executable in cygwin causing which
9132  # to not find them
9133  if test "x$new_path" = x \
9134      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9135      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9136    new_path=`$CYGPATH -u "$path"`
9137  fi
9138  if test "x$new_path" = x; then
9139    # Oops. Which didn't find the executable.
9140    # The splitting of arguments from the executable at a space might have been incorrect,
9141    # since paths with space are more likely in Windows. Give it another try with the whole
9142    # argument.
9143    path="$complete"
9144    arguments="EOL"
9145    new_path=`$CYGPATH -u "$path"`
9146    new_path=`$WHICH "$new_path" 2> /dev/null`
9147    # bat and cmd files are not always considered executable in cygwin causing which
9148    # to not find them
9149    if test "x$new_path" = x \
9150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9152      new_path=`$CYGPATH -u "$path"`
9153    fi
9154    if test "x$new_path" = x; then
9155      # It's still not found. Now this is an unrecoverable error.
9156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9157$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9158      has_space=`$ECHO "$complete" | $GREP " "`
9159      if test "x$has_space" != x; then
9160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9162      fi
9163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9164    fi
9165  fi
9166
9167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9170  # "foo.exe" is OK but "foo" is an error.
9171  #
9172  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9173  # It is also a way to make sure we got the proper file name for the real test later on.
9174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9175  if test "x$test_shortpath" = x; then
9176    # Short path failed, file does not exist as specified.
9177    # Try adding .exe or .cmd
9178    if test -f "${new_path}.exe"; then
9179      input_to_shortpath="${new_path}.exe"
9180    elif test -f "${new_path}.cmd"; then
9181      input_to_shortpath="${new_path}.cmd"
9182    else
9183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9184$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9185      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9186$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9187      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9188    fi
9189  else
9190    input_to_shortpath="$new_path"
9191  fi
9192
9193  # Call helper function which possibly converts this using DOS-style short mode.
9194  # If so, the updated path is stored in $new_path.
9195  new_path="$input_to_shortpath"
9196
9197  input_path="$input_to_shortpath"
9198  # Check if we need to convert this using DOS-style short mode. If the path
9199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9200  # take no chances and rewrite it.
9201  # Note: m4 eats our [], so we need to use [ and ] instead.
9202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9203  if test "x$has_forbidden_chars" != x; then
9204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9208      # Going to short mode and back again did indeed matter. Since short mode is
9209      # case insensitive, let's make it lowercase to improve readability.
9210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9211      # Now convert it back to Unix-stile (cygpath)
9212      input_path=`$CYGPATH -u "$shortmode_path"`
9213      new_path="$input_path"
9214    fi
9215  fi
9216
9217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9218  if test "x$test_cygdrive_prefix" = x; then
9219    # As a simple fix, exclude /usr/bin since it's not a real path.
9220    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9222      # a path prefixed by /cygdrive for fixpath to work.
9223      new_path="$CYGWIN_ROOT_PATH$input_path"
9224    fi
9225  fi
9226
9227  # remove trailing .exe if any
9228  new_path="${new_path/%.exe/}"
9229
9230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9231
9232  # First separate the path from the arguments. This will split at the first
9233  # space.
9234  complete="$FOUND_MAKE"
9235  path="${complete%% *}"
9236  tmp="$complete EOL"
9237  arguments="${tmp#* }"
9238
9239  # Input might be given as Windows format, start by converting to
9240  # unix format.
9241  new_path="$path"
9242
9243  windows_path="$new_path"
9244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9245    unix_path=`$CYGPATH -u "$windows_path"`
9246    new_path="$unix_path"
9247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9249    new_path="$unix_path"
9250  fi
9251
9252
9253  # Now try to locate executable using which
9254  new_path=`$WHICH "$new_path" 2> /dev/null`
9255
9256  if test "x$new_path" = x; then
9257    # Oops. Which didn't find the executable.
9258    # The splitting of arguments from the executable at a space might have been incorrect,
9259    # since paths with space are more likely in Windows. Give it another try with the whole
9260    # argument.
9261    path="$complete"
9262    arguments="EOL"
9263    new_path="$path"
9264
9265  windows_path="$new_path"
9266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9267    unix_path=`$CYGPATH -u "$windows_path"`
9268    new_path="$unix_path"
9269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9271    new_path="$unix_path"
9272  fi
9273
9274
9275    new_path=`$WHICH "$new_path" 2> /dev/null`
9276
9277    if test "x$new_path" = x; then
9278      # It's still not found. Now this is an unrecoverable error.
9279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9281      has_space=`$ECHO "$complete" | $GREP " "`
9282      if test "x$has_space" != x; then
9283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9285      fi
9286      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9287    fi
9288  fi
9289
9290  # Now new_path has a complete unix path to the binary
9291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9292    # Keep paths in /bin as-is, but remove trailing .exe if any
9293    new_path="${new_path/%.exe/}"
9294    # Do not save /bin paths to all_fixpath_prefixes!
9295  else
9296    # Not in mixed or Windows style, start by that.
9297    new_path=`cmd //c echo $new_path`
9298
9299  input_path="$new_path"
9300  # Check if we need to convert this using DOS-style short mode. If the path
9301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9302  # take no chances and rewrite it.
9303  # Note: m4 eats our [], so we need to use [ and ] instead.
9304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9305  if test "x$has_forbidden_chars" != x; then
9306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9308  fi
9309
9310    # Output is in $new_path
9311
9312  windows_path="$new_path"
9313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9314    unix_path=`$CYGPATH -u "$windows_path"`
9315    new_path="$unix_path"
9316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9318    new_path="$unix_path"
9319  fi
9320
9321    # remove trailing .exe if any
9322    new_path="${new_path/%.exe/}"
9323
9324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9326  fi
9327
9328  else
9329    # We're on a posix platform. Hooray! :)
9330    # First separate the path from the arguments. This will split at the first
9331    # space.
9332    complete="$FOUND_MAKE"
9333    path="${complete%% *}"
9334    tmp="$complete EOL"
9335    arguments="${tmp#* }"
9336
9337    # Cannot rely on the command "which" here since it doesn't always work.
9338    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9339    if test -z "$is_absolute_path"; then
9340      # Path to executable is not absolute. Find it.
9341      IFS_save="$IFS"
9342      IFS=:
9343      for p in $PATH; do
9344        if test -f "$p/$path" && test -x "$p/$path"; then
9345          new_path="$p/$path"
9346          break
9347        fi
9348      done
9349      IFS="$IFS_save"
9350    else
9351      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9352$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9353      new_path="$path"
9354    fi
9355
9356    if test "x$new_path" = x; then
9357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9359      has_space=`$ECHO "$complete" | $GREP " "`
9360      if test "x$has_space" != x; then
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9362$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9363      fi
9364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9365    fi
9366  fi
9367
9368  # Now join together the path and the arguments once again
9369  if test "x$arguments" != xEOL; then
9370    new_complete="$new_path ${arguments% *}"
9371  else
9372    new_complete="$new_path"
9373  fi
9374
9375  if test "x$complete" != "x$new_complete"; then
9376    FOUND_MAKE="$new_complete"
9377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9378$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9379  fi
9380
9381        fi
9382      fi
9383    fi
9384  fi
9385
9386    fi
9387
9388    if test "x$FOUND_MAKE" = x; then
9389      if test "x$TOOLS_DIR" != x; then
9390        # We have a tools-dir, check that as well before giving up.
9391        OLD_PATH=$PATH
9392        PATH=$TOOLS_DIR:$PATH
9393        for ac_prog in gmake
9394do
9395  # Extract the first word of "$ac_prog", so it can be a program name with args.
9396set dummy $ac_prog; ac_word=$2
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398$as_echo_n "checking for $ac_word... " >&6; }
9399if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9400  $as_echo_n "(cached) " >&6
9401else
9402  case $CHECK_TOOLSDIR_GMAKE in
9403  [\\/]* | ?:[\\/]*)
9404  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9405  ;;
9406  *)
9407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408for as_dir in $PATH
9409do
9410  IFS=$as_save_IFS
9411  test -z "$as_dir" && as_dir=.
9412    for ac_exec_ext in '' $ac_executable_extensions; do
9413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416    break 2
9417  fi
9418done
9419  done
9420IFS=$as_save_IFS
9421
9422  ;;
9423esac
9424fi
9425CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9426if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9428$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9429else
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431$as_echo "no" >&6; }
9432fi
9433
9434
9435  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9436done
9437
9438
9439  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9440  DESCRIPTION="gmake in tools-dir"
9441  if test "x$MAKE_CANDIDATE" != x; then
9442    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9443$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9444    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9445    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9446    if test "x$IS_GNU_MAKE" = x; then
9447      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9448$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9449    else
9450      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9451      if test "x$IS_MODERN_MAKE" = x; then
9452        { $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
9453$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;}
9454      else
9455        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9456          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9457            MAKE_EXPECTED_ENV='cygwin'
9458          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9459            MAKE_EXPECTED_ENV='msys'
9460          else
9461            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9462          fi
9463          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9464          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9465        else
9466          # Not relevant for non-Windows
9467          IS_MAKE_CORRECT_ENV=true
9468        fi
9469        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9470          { $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
9471$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;}
9472        else
9473          FOUND_MAKE=$MAKE_CANDIDATE
9474
9475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9476
9477  # First separate the path from the arguments. This will split at the first
9478  # space.
9479  complete="$FOUND_MAKE"
9480  path="${complete%% *}"
9481  tmp="$complete EOL"
9482  arguments="${tmp#* }"
9483
9484  # Input might be given as Windows format, start by converting to
9485  # unix format.
9486  new_path=`$CYGPATH -u "$path"`
9487
9488  # Now try to locate executable using which
9489  new_path=`$WHICH "$new_path" 2> /dev/null`
9490  # bat and cmd files are not always considered executable in cygwin causing which
9491  # to not find them
9492  if test "x$new_path" = x \
9493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9495    new_path=`$CYGPATH -u "$path"`
9496  fi
9497  if test "x$new_path" = x; then
9498    # Oops. Which didn't find the executable.
9499    # The splitting of arguments from the executable at a space might have been incorrect,
9500    # since paths with space are more likely in Windows. Give it another try with the whole
9501    # argument.
9502    path="$complete"
9503    arguments="EOL"
9504    new_path=`$CYGPATH -u "$path"`
9505    new_path=`$WHICH "$new_path" 2> /dev/null`
9506    # bat and cmd files are not always considered executable in cygwin causing which
9507    # to not find them
9508    if test "x$new_path" = x \
9509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9511      new_path=`$CYGPATH -u "$path"`
9512    fi
9513    if test "x$new_path" = x; then
9514      # It's still not found. Now this is an unrecoverable error.
9515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9517      has_space=`$ECHO "$complete" | $GREP " "`
9518      if test "x$has_space" != x; then
9519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9521      fi
9522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9523    fi
9524  fi
9525
9526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9529  # "foo.exe" is OK but "foo" is an error.
9530  #
9531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9532  # It is also a way to make sure we got the proper file name for the real test later on.
9533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9534  if test "x$test_shortpath" = x; then
9535    # Short path failed, file does not exist as specified.
9536    # Try adding .exe or .cmd
9537    if test -f "${new_path}.exe"; then
9538      input_to_shortpath="${new_path}.exe"
9539    elif test -f "${new_path}.cmd"; then
9540      input_to_shortpath="${new_path}.cmd"
9541    else
9542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9543$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9546      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9547    fi
9548  else
9549    input_to_shortpath="$new_path"
9550  fi
9551
9552  # Call helper function which possibly converts this using DOS-style short mode.
9553  # If so, the updated path is stored in $new_path.
9554  new_path="$input_to_shortpath"
9555
9556  input_path="$input_to_shortpath"
9557  # Check if we need to convert this using DOS-style short mode. If the path
9558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9559  # take no chances and rewrite it.
9560  # Note: m4 eats our [], so we need to use [ and ] instead.
9561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9562  if test "x$has_forbidden_chars" != x; then
9563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9567      # Going to short mode and back again did indeed matter. Since short mode is
9568      # case insensitive, let's make it lowercase to improve readability.
9569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9570      # Now convert it back to Unix-stile (cygpath)
9571      input_path=`$CYGPATH -u "$shortmode_path"`
9572      new_path="$input_path"
9573    fi
9574  fi
9575
9576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9577  if test "x$test_cygdrive_prefix" = x; then
9578    # As a simple fix, exclude /usr/bin since it's not a real path.
9579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9581      # a path prefixed by /cygdrive for fixpath to work.
9582      new_path="$CYGWIN_ROOT_PATH$input_path"
9583    fi
9584  fi
9585
9586  # remove trailing .exe if any
9587  new_path="${new_path/%.exe/}"
9588
9589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9590
9591  # First separate the path from the arguments. This will split at the first
9592  # space.
9593  complete="$FOUND_MAKE"
9594  path="${complete%% *}"
9595  tmp="$complete EOL"
9596  arguments="${tmp#* }"
9597
9598  # Input might be given as Windows format, start by converting to
9599  # unix format.
9600  new_path="$path"
9601
9602  windows_path="$new_path"
9603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9604    unix_path=`$CYGPATH -u "$windows_path"`
9605    new_path="$unix_path"
9606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9608    new_path="$unix_path"
9609  fi
9610
9611
9612  # Now try to locate executable using which
9613  new_path=`$WHICH "$new_path" 2> /dev/null`
9614
9615  if test "x$new_path" = x; then
9616    # Oops. Which didn't find the executable.
9617    # The splitting of arguments from the executable at a space might have been incorrect,
9618    # since paths with space are more likely in Windows. Give it another try with the whole
9619    # argument.
9620    path="$complete"
9621    arguments="EOL"
9622    new_path="$path"
9623
9624  windows_path="$new_path"
9625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9626    unix_path=`$CYGPATH -u "$windows_path"`
9627    new_path="$unix_path"
9628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9630    new_path="$unix_path"
9631  fi
9632
9633
9634    new_path=`$WHICH "$new_path" 2> /dev/null`
9635
9636    if test "x$new_path" = x; then
9637      # It's still not found. Now this is an unrecoverable error.
9638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9640      has_space=`$ECHO "$complete" | $GREP " "`
9641      if test "x$has_space" != x; then
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9644      fi
9645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9646    fi
9647  fi
9648
9649  # Now new_path has a complete unix path to the binary
9650  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9651    # Keep paths in /bin as-is, but remove trailing .exe if any
9652    new_path="${new_path/%.exe/}"
9653    # Do not save /bin paths to all_fixpath_prefixes!
9654  else
9655    # Not in mixed or Windows style, start by that.
9656    new_path=`cmd //c echo $new_path`
9657
9658  input_path="$new_path"
9659  # Check if we need to convert this using DOS-style short mode. If the path
9660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9661  # take no chances and rewrite it.
9662  # Note: m4 eats our [], so we need to use [ and ] instead.
9663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9664  if test "x$has_forbidden_chars" != x; then
9665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9667  fi
9668
9669    # Output is in $new_path
9670
9671  windows_path="$new_path"
9672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9673    unix_path=`$CYGPATH -u "$windows_path"`
9674    new_path="$unix_path"
9675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9677    new_path="$unix_path"
9678  fi
9679
9680    # remove trailing .exe if any
9681    new_path="${new_path/%.exe/}"
9682
9683    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9684    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9685  fi
9686
9687  else
9688    # We're on a posix platform. Hooray! :)
9689    # First separate the path from the arguments. This will split at the first
9690    # space.
9691    complete="$FOUND_MAKE"
9692    path="${complete%% *}"
9693    tmp="$complete EOL"
9694    arguments="${tmp#* }"
9695
9696    # Cannot rely on the command "which" here since it doesn't always work.
9697    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9698    if test -z "$is_absolute_path"; then
9699      # Path to executable is not absolute. Find it.
9700      IFS_save="$IFS"
9701      IFS=:
9702      for p in $PATH; do
9703        if test -f "$p/$path" && test -x "$p/$path"; then
9704          new_path="$p/$path"
9705          break
9706        fi
9707      done
9708      IFS="$IFS_save"
9709    else
9710      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9711$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9712      new_path="$path"
9713    fi
9714
9715    if test "x$new_path" = x; then
9716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9717$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9718      has_space=`$ECHO "$complete" | $GREP " "`
9719      if test "x$has_space" != x; then
9720        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9721$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9722      fi
9723      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9724    fi
9725  fi
9726
9727  # Now join together the path and the arguments once again
9728  if test "x$arguments" != xEOL; then
9729    new_complete="$new_path ${arguments% *}"
9730  else
9731    new_complete="$new_path"
9732  fi
9733
9734  if test "x$complete" != "x$new_complete"; then
9735    FOUND_MAKE="$new_complete"
9736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9737$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9738  fi
9739
9740        fi
9741      fi
9742    fi
9743  fi
9744
9745        if test "x$FOUND_MAKE" = x; then
9746          for ac_prog in make
9747do
9748  # Extract the first word of "$ac_prog", so it can be a program name with args.
9749set dummy $ac_prog; ac_word=$2
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751$as_echo_n "checking for $ac_word... " >&6; }
9752if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9753  $as_echo_n "(cached) " >&6
9754else
9755  case $CHECK_TOOLSDIR_MAKE in
9756  [\\/]* | ?:[\\/]*)
9757  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9758  ;;
9759  *)
9760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9761for as_dir in $PATH
9762do
9763  IFS=$as_save_IFS
9764  test -z "$as_dir" && as_dir=.
9765    for ac_exec_ext in '' $ac_executable_extensions; do
9766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9767    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9769    break 2
9770  fi
9771done
9772  done
9773IFS=$as_save_IFS
9774
9775  ;;
9776esac
9777fi
9778CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9779if test -n "$CHECK_TOOLSDIR_MAKE"; then
9780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9781$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9782else
9783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
9785fi
9786
9787
9788  test -n "$CHECK_TOOLSDIR_MAKE" && break
9789done
9790
9791
9792  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9793  DESCRIPTION="make in tools-dir"
9794  if test "x$MAKE_CANDIDATE" != x; then
9795    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9796$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9797    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9798    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9799    if test "x$IS_GNU_MAKE" = x; then
9800      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9801$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9802    else
9803      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9804      if test "x$IS_MODERN_MAKE" = x; then
9805        { $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
9806$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;}
9807      else
9808        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9809          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9810            MAKE_EXPECTED_ENV='cygwin'
9811          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9812            MAKE_EXPECTED_ENV='msys'
9813          else
9814            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9815          fi
9816          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9817          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9818        else
9819          # Not relevant for non-Windows
9820          IS_MAKE_CORRECT_ENV=true
9821        fi
9822        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9823          { $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
9824$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;}
9825        else
9826          FOUND_MAKE=$MAKE_CANDIDATE
9827
9828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9829
9830  # First separate the path from the arguments. This will split at the first
9831  # space.
9832  complete="$FOUND_MAKE"
9833  path="${complete%% *}"
9834  tmp="$complete EOL"
9835  arguments="${tmp#* }"
9836
9837  # Input might be given as Windows format, start by converting to
9838  # unix format.
9839  new_path=`$CYGPATH -u "$path"`
9840
9841  # Now try to locate executable using which
9842  new_path=`$WHICH "$new_path" 2> /dev/null`
9843  # bat and cmd files are not always considered executable in cygwin causing which
9844  # to not find them
9845  if test "x$new_path" = x \
9846      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9847      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9848    new_path=`$CYGPATH -u "$path"`
9849  fi
9850  if test "x$new_path" = x; then
9851    # Oops. Which didn't find the executable.
9852    # The splitting of arguments from the executable at a space might have been incorrect,
9853    # since paths with space are more likely in Windows. Give it another try with the whole
9854    # argument.
9855    path="$complete"
9856    arguments="EOL"
9857    new_path=`$CYGPATH -u "$path"`
9858    new_path=`$WHICH "$new_path" 2> /dev/null`
9859    # bat and cmd files are not always considered executable in cygwin causing which
9860    # to not find them
9861    if test "x$new_path" = x \
9862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9864      new_path=`$CYGPATH -u "$path"`
9865    fi
9866    if test "x$new_path" = x; then
9867      # It's still not found. Now this is an unrecoverable error.
9868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9870      has_space=`$ECHO "$complete" | $GREP " "`
9871      if test "x$has_space" != x; then
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9874      fi
9875      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9876    fi
9877  fi
9878
9879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9882  # "foo.exe" is OK but "foo" is an error.
9883  #
9884  # This test is therefore slightly more accurate than "test -f" to check for file presence.
9885  # It is also a way to make sure we got the proper file name for the real test later on.
9886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9887  if test "x$test_shortpath" = x; then
9888    # Short path failed, file does not exist as specified.
9889    # Try adding .exe or .cmd
9890    if test -f "${new_path}.exe"; then
9891      input_to_shortpath="${new_path}.exe"
9892    elif test -f "${new_path}.cmd"; then
9893      input_to_shortpath="${new_path}.cmd"
9894    else
9895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9896$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9897      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9898$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9899      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9900    fi
9901  else
9902    input_to_shortpath="$new_path"
9903  fi
9904
9905  # Call helper function which possibly converts this using DOS-style short mode.
9906  # If so, the updated path is stored in $new_path.
9907  new_path="$input_to_shortpath"
9908
9909  input_path="$input_to_shortpath"
9910  # Check if we need to convert this using DOS-style short mode. If the path
9911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9912  # take no chances and rewrite it.
9913  # Note: m4 eats our [], so we need to use [ and ] instead.
9914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9915  if test "x$has_forbidden_chars" != x; then
9916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9920      # Going to short mode and back again did indeed matter. Since short mode is
9921      # case insensitive, let's make it lowercase to improve readability.
9922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9923      # Now convert it back to Unix-stile (cygpath)
9924      input_path=`$CYGPATH -u "$shortmode_path"`
9925      new_path="$input_path"
9926    fi
9927  fi
9928
9929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9930  if test "x$test_cygdrive_prefix" = x; then
9931    # As a simple fix, exclude /usr/bin since it's not a real path.
9932    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9934      # a path prefixed by /cygdrive for fixpath to work.
9935      new_path="$CYGWIN_ROOT_PATH$input_path"
9936    fi
9937  fi
9938
9939  # remove trailing .exe if any
9940  new_path="${new_path/%.exe/}"
9941
9942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9943
9944  # First separate the path from the arguments. This will split at the first
9945  # space.
9946  complete="$FOUND_MAKE"
9947  path="${complete%% *}"
9948  tmp="$complete EOL"
9949  arguments="${tmp#* }"
9950
9951  # Input might be given as Windows format, start by converting to
9952  # unix format.
9953  new_path="$path"
9954
9955  windows_path="$new_path"
9956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9957    unix_path=`$CYGPATH -u "$windows_path"`
9958    new_path="$unix_path"
9959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9961    new_path="$unix_path"
9962  fi
9963
9964
9965  # Now try to locate executable using which
9966  new_path=`$WHICH "$new_path" 2> /dev/null`
9967
9968  if test "x$new_path" = x; then
9969    # Oops. Which didn't find the executable.
9970    # The splitting of arguments from the executable at a space might have been incorrect,
9971    # since paths with space are more likely in Windows. Give it another try with the whole
9972    # argument.
9973    path="$complete"
9974    arguments="EOL"
9975    new_path="$path"
9976
9977  windows_path="$new_path"
9978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9979    unix_path=`$CYGPATH -u "$windows_path"`
9980    new_path="$unix_path"
9981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9983    new_path="$unix_path"
9984  fi
9985
9986
9987    new_path=`$WHICH "$new_path" 2> /dev/null`
9988
9989    if test "x$new_path" = x; then
9990      # It's still not found. Now this is an unrecoverable error.
9991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9992$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9993      has_space=`$ECHO "$complete" | $GREP " "`
9994      if test "x$has_space" != x; then
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9997      fi
9998      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9999    fi
10000  fi
10001
10002  # Now new_path has a complete unix path to the binary
10003  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10004    # Keep paths in /bin as-is, but remove trailing .exe if any
10005    new_path="${new_path/%.exe/}"
10006    # Do not save /bin paths to all_fixpath_prefixes!
10007  else
10008    # Not in mixed or Windows style, start by that.
10009    new_path=`cmd //c echo $new_path`
10010
10011  input_path="$new_path"
10012  # Check if we need to convert this using DOS-style short mode. If the path
10013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10014  # take no chances and rewrite it.
10015  # Note: m4 eats our [], so we need to use [ and ] instead.
10016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10017  if test "x$has_forbidden_chars" != x; then
10018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10020  fi
10021
10022    # Output is in $new_path
10023
10024  windows_path="$new_path"
10025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10026    unix_path=`$CYGPATH -u "$windows_path"`
10027    new_path="$unix_path"
10028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10030    new_path="$unix_path"
10031  fi
10032
10033    # remove trailing .exe if any
10034    new_path="${new_path/%.exe/}"
10035
10036    # Save the first 10 bytes of this path to the storage, so fixpath can work.
10037    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10038  fi
10039
10040  else
10041    # We're on a posix platform. Hooray! :)
10042    # First separate the path from the arguments. This will split at the first
10043    # space.
10044    complete="$FOUND_MAKE"
10045    path="${complete%% *}"
10046    tmp="$complete EOL"
10047    arguments="${tmp#* }"
10048
10049    # Cannot rely on the command "which" here since it doesn't always work.
10050    is_absolute_path=`$ECHO "$path" | $GREP ^/`
10051    if test -z "$is_absolute_path"; then
10052      # Path to executable is not absolute. Find it.
10053      IFS_save="$IFS"
10054      IFS=:
10055      for p in $PATH; do
10056        if test -f "$p/$path" && test -x "$p/$path"; then
10057          new_path="$p/$path"
10058          break
10059        fi
10060      done
10061      IFS="$IFS_save"
10062    else
10063      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10064$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10065      new_path="$path"
10066    fi
10067
10068    if test "x$new_path" = x; then
10069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10070$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10071      has_space=`$ECHO "$complete" | $GREP " "`
10072      if test "x$has_space" != x; then
10073        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10075      fi
10076      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10077    fi
10078  fi
10079
10080  # Now join together the path and the arguments once again
10081  if test "x$arguments" != xEOL; then
10082    new_complete="$new_path ${arguments% *}"
10083  else
10084    new_complete="$new_path"
10085  fi
10086
10087  if test "x$complete" != "x$new_complete"; then
10088    FOUND_MAKE="$new_complete"
10089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10090$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10091  fi
10092
10093        fi
10094      fi
10095    fi
10096  fi
10097
10098        fi
10099        PATH=$OLD_PATH
10100      fi
10101    fi
10102
10103    if test "x$FOUND_MAKE" = x; then
10104      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
10105    fi
10106  fi
10107
10108  MAKE=$FOUND_MAKE
10109
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10111$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10112
10113
10114
10115  # Test if find supports -delete
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10117$as_echo_n "checking if find supports -delete... " >&6; }
10118  FIND_DELETE="-delete"
10119
10120  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10121
10122  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10123
10124  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10125  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10126    # No, it does not.
10127    rm $DELETEDIR/TestIfFindSupportsDelete
10128    FIND_DELETE="-exec rm \{\} \+"
10129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131  else
10132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10133$as_echo "yes" >&6; }
10134  fi
10135  rmdir $DELETEDIR
10136
10137
10138
10139  # These tools might not be installed by default,
10140  # need hint on how to install them.
10141
10142  for ac_prog in unzip
10143do
10144  # Extract the first word of "$ac_prog", so it can be a program name with args.
10145set dummy $ac_prog; ac_word=$2
10146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147$as_echo_n "checking for $ac_word... " >&6; }
10148if ${ac_cv_path_UNZIP+:} false; then :
10149  $as_echo_n "(cached) " >&6
10150else
10151  case $UNZIP in
10152  [\\/]* | ?:[\\/]*)
10153  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10154  ;;
10155  *)
10156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157for as_dir in $PATH
10158do
10159  IFS=$as_save_IFS
10160  test -z "$as_dir" && as_dir=.
10161    for ac_exec_ext in '' $ac_executable_extensions; do
10162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10163    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165    break 2
10166  fi
10167done
10168  done
10169IFS=$as_save_IFS
10170
10171  ;;
10172esac
10173fi
10174UNZIP=$ac_cv_path_UNZIP
10175if test -n "$UNZIP"; then
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10177$as_echo "$UNZIP" >&6; }
10178else
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180$as_echo "no" >&6; }
10181fi
10182
10183
10184  test -n "$UNZIP" && break
10185done
10186
10187
10188  if test "x$UNZIP" = x; then
10189    if test "xunzip" = x; then
10190      PROG_NAME=unzip
10191    else
10192      PROG_NAME=unzip
10193    fi
10194    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10196    as_fn_error $? "Cannot continue" "$LINENO" 5
10197  fi
10198
10199
10200
10201  for ac_prog in zip
10202do
10203  # Extract the first word of "$ac_prog", so it can be a program name with args.
10204set dummy $ac_prog; ac_word=$2
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10206$as_echo_n "checking for $ac_word... " >&6; }
10207if ${ac_cv_path_ZIP+:} false; then :
10208  $as_echo_n "(cached) " >&6
10209else
10210  case $ZIP in
10211  [\\/]* | ?:[\\/]*)
10212  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10213  ;;
10214  *)
10215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216for as_dir in $PATH
10217do
10218  IFS=$as_save_IFS
10219  test -z "$as_dir" && as_dir=.
10220    for ac_exec_ext in '' $ac_executable_extensions; do
10221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10222    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10224    break 2
10225  fi
10226done
10227  done
10228IFS=$as_save_IFS
10229
10230  ;;
10231esac
10232fi
10233ZIP=$ac_cv_path_ZIP
10234if test -n "$ZIP"; then
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10236$as_echo "$ZIP" >&6; }
10237else
10238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10239$as_echo "no" >&6; }
10240fi
10241
10242
10243  test -n "$ZIP" && break
10244done
10245
10246
10247  if test "x$ZIP" = x; then
10248    if test "xzip" = x; then
10249      PROG_NAME=zip
10250    else
10251      PROG_NAME=zip
10252    fi
10253    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10254$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10255    as_fn_error $? "Cannot continue" "$LINENO" 5
10256  fi
10257
10258
10259
10260  # Non-required basic tools
10261
10262  # Extract the first word of "ldd", so it can be a program name with args.
10263set dummy ldd; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_LDD+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $LDD in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292LDD=$ac_cv_path_LDD
10293if test -n "$LDD"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10295$as_echo "$LDD" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302  if test "x$LDD" = "x"; then
10303    # List shared lib dependencies is used for
10304    # debug output and checking for forbidden dependencies.
10305    # We can build without it.
10306    LDD="true"
10307  fi
10308  # Extract the first word of "otool", so it can be a program name with args.
10309set dummy otool; ac_word=$2
10310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10311$as_echo_n "checking for $ac_word... " >&6; }
10312if ${ac_cv_path_OTOOL+:} false; then :
10313  $as_echo_n "(cached) " >&6
10314else
10315  case $OTOOL in
10316  [\\/]* | ?:[\\/]*)
10317  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10318  ;;
10319  *)
10320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10321for as_dir in $PATH
10322do
10323  IFS=$as_save_IFS
10324  test -z "$as_dir" && as_dir=.
10325    for ac_exec_ext in '' $ac_executable_extensions; do
10326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10327    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10329    break 2
10330  fi
10331done
10332  done
10333IFS=$as_save_IFS
10334
10335  ;;
10336esac
10337fi
10338OTOOL=$ac_cv_path_OTOOL
10339if test -n "$OTOOL"; then
10340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10341$as_echo "$OTOOL" >&6; }
10342else
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
10345fi
10346
10347
10348  if test "x$OTOOL" = "x"; then
10349    OTOOL="true"
10350  fi
10351  for ac_prog in readelf greadelf
10352do
10353  # Extract the first word of "$ac_prog", so it can be a program name with args.
10354set dummy $ac_prog; ac_word=$2
10355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10356$as_echo_n "checking for $ac_word... " >&6; }
10357if ${ac_cv_path_READELF+:} false; then :
10358  $as_echo_n "(cached) " >&6
10359else
10360  case $READELF in
10361  [\\/]* | ?:[\\/]*)
10362  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10363  ;;
10364  *)
10365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10366for as_dir in $PATH
10367do
10368  IFS=$as_save_IFS
10369  test -z "$as_dir" && as_dir=.
10370    for ac_exec_ext in '' $ac_executable_extensions; do
10371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10372    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10374    break 2
10375  fi
10376done
10377  done
10378IFS=$as_save_IFS
10379
10380  ;;
10381esac
10382fi
10383READELF=$ac_cv_path_READELF
10384if test -n "$READELF"; then
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10386$as_echo "$READELF" >&6; }
10387else
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10389$as_echo "no" >&6; }
10390fi
10391
10392
10393  test -n "$READELF" && break
10394done
10395
10396  # Extract the first word of "hg", so it can be a program name with args.
10397set dummy hg; ac_word=$2
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399$as_echo_n "checking for $ac_word... " >&6; }
10400if ${ac_cv_path_HG+:} false; then :
10401  $as_echo_n "(cached) " >&6
10402else
10403  case $HG in
10404  [\\/]* | ?:[\\/]*)
10405  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10406  ;;
10407  *)
10408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10409for as_dir in $PATH
10410do
10411  IFS=$as_save_IFS
10412  test -z "$as_dir" && as_dir=.
10413    for ac_exec_ext in '' $ac_executable_extensions; do
10414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10415    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10417    break 2
10418  fi
10419done
10420  done
10421IFS=$as_save_IFS
10422
10423  ;;
10424esac
10425fi
10426HG=$ac_cv_path_HG
10427if test -n "$HG"; then
10428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10429$as_echo "$HG" >&6; }
10430else
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432$as_echo "no" >&6; }
10433fi
10434
10435
10436  # Extract the first word of "stat", so it can be a program name with args.
10437set dummy stat; ac_word=$2
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439$as_echo_n "checking for $ac_word... " >&6; }
10440if ${ac_cv_path_STAT+:} false; then :
10441  $as_echo_n "(cached) " >&6
10442else
10443  case $STAT in
10444  [\\/]* | ?:[\\/]*)
10445  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10446  ;;
10447  *)
10448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10449for as_dir in $PATH
10450do
10451  IFS=$as_save_IFS
10452  test -z "$as_dir" && as_dir=.
10453    for ac_exec_ext in '' $ac_executable_extensions; do
10454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10455    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10457    break 2
10458  fi
10459done
10460  done
10461IFS=$as_save_IFS
10462
10463  ;;
10464esac
10465fi
10466STAT=$ac_cv_path_STAT
10467if test -n "$STAT"; then
10468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10469$as_echo "$STAT" >&6; }
10470else
10471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
10473fi
10474
10475
10476  # Extract the first word of "time", so it can be a program name with args.
10477set dummy time; ac_word=$2
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479$as_echo_n "checking for $ac_word... " >&6; }
10480if ${ac_cv_path_TIME+:} false; then :
10481  $as_echo_n "(cached) " >&6
10482else
10483  case $TIME in
10484  [\\/]* | ?:[\\/]*)
10485  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10486  ;;
10487  *)
10488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489for as_dir in $PATH
10490do
10491  IFS=$as_save_IFS
10492  test -z "$as_dir" && as_dir=.
10493    for ac_exec_ext in '' $ac_executable_extensions; do
10494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10495    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497    break 2
10498  fi
10499done
10500  done
10501IFS=$as_save_IFS
10502
10503  ;;
10504esac
10505fi
10506TIME=$ac_cv_path_TIME
10507if test -n "$TIME"; then
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10509$as_echo "$TIME" >&6; }
10510else
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
10513fi
10514
10515
10516  # Check if it's GNU time
10517  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10518  if test "x$IS_GNU_TIME" != x; then
10519    IS_GNU_TIME=yes
10520  else
10521    IS_GNU_TIME=no
10522  fi
10523
10524
10525  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10526
10527  for ac_prog in comm
10528do
10529  # Extract the first word of "$ac_prog", so it can be a program name with args.
10530set dummy $ac_prog; ac_word=$2
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10532$as_echo_n "checking for $ac_word... " >&6; }
10533if ${ac_cv_path_COMM+:} false; then :
10534  $as_echo_n "(cached) " >&6
10535else
10536  case $COMM in
10537  [\\/]* | ?:[\\/]*)
10538  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10539  ;;
10540  *)
10541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10542for as_dir in $PATH
10543do
10544  IFS=$as_save_IFS
10545  test -z "$as_dir" && as_dir=.
10546    for ac_exec_ext in '' $ac_executable_extensions; do
10547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10548    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10550    break 2
10551  fi
10552done
10553  done
10554IFS=$as_save_IFS
10555
10556  ;;
10557esac
10558fi
10559COMM=$ac_cv_path_COMM
10560if test -n "$COMM"; then
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10562$as_echo "$COMM" >&6; }
10563else
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566fi
10567
10568
10569  test -n "$COMM" && break
10570done
10571
10572
10573  if test "x$COMM" = x; then
10574    if test "xcomm" = x; then
10575      PROG_NAME=comm
10576    else
10577      PROG_NAME=comm
10578    fi
10579    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10580$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10581    as_fn_error $? "Cannot continue" "$LINENO" 5
10582  fi
10583
10584
10585  fi
10586
10587  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10588
10589  for ac_prog in dsymutil
10590do
10591  # Extract the first word of "$ac_prog", so it can be a program name with args.
10592set dummy $ac_prog; ac_word=$2
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594$as_echo_n "checking for $ac_word... " >&6; }
10595if ${ac_cv_path_DSYMUTIL+:} false; then :
10596  $as_echo_n "(cached) " >&6
10597else
10598  case $DSYMUTIL in
10599  [\\/]* | ?:[\\/]*)
10600  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10601  ;;
10602  *)
10603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604for as_dir in $PATH
10605do
10606  IFS=$as_save_IFS
10607  test -z "$as_dir" && as_dir=.
10608    for ac_exec_ext in '' $ac_executable_extensions; do
10609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10610    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612    break 2
10613  fi
10614done
10615  done
10616IFS=$as_save_IFS
10617
10618  ;;
10619esac
10620fi
10621DSYMUTIL=$ac_cv_path_DSYMUTIL
10622if test -n "$DSYMUTIL"; then
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10624$as_echo "$DSYMUTIL" >&6; }
10625else
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
10628fi
10629
10630
10631  test -n "$DSYMUTIL" && break
10632done
10633
10634
10635  if test "x$DSYMUTIL" = x; then
10636    if test "xdsymutil" = x; then
10637      PROG_NAME=dsymutil
10638    else
10639      PROG_NAME=dsymutil
10640    fi
10641    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10642$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10643    as_fn_error $? "Cannot continue" "$LINENO" 5
10644  fi
10645
10646
10647
10648  for ac_prog in xattr
10649do
10650  # Extract the first word of "$ac_prog", so it can be a program name with args.
10651set dummy $ac_prog; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_path_XATTR+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  case $XATTR in
10658  [\\/]* | ?:[\\/]*)
10659  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10660  ;;
10661  *)
10662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665  IFS=$as_save_IFS
10666  test -z "$as_dir" && as_dir=.
10667    for ac_exec_ext in '' $ac_executable_extensions; do
10668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671    break 2
10672  fi
10673done
10674  done
10675IFS=$as_save_IFS
10676
10677  ;;
10678esac
10679fi
10680XATTR=$ac_cv_path_XATTR
10681if test -n "$XATTR"; then
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10683$as_echo "$XATTR" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688
10689
10690  test -n "$XATTR" && break
10691done
10692
10693
10694  if test "x$XATTR" = x; then
10695    if test "xxattr" = x; then
10696      PROG_NAME=xattr
10697    else
10698      PROG_NAME=xattr
10699    fi
10700    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10701$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10702    as_fn_error $? "Cannot continue" "$LINENO" 5
10703  fi
10704
10705
10706    # Extract the first word of "codesign", so it can be a program name with args.
10707set dummy codesign; ac_word=$2
10708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10709$as_echo_n "checking for $ac_word... " >&6; }
10710if ${ac_cv_path_CODESIGN+:} false; then :
10711  $as_echo_n "(cached) " >&6
10712else
10713  case $CODESIGN in
10714  [\\/]* | ?:[\\/]*)
10715  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10716  ;;
10717  *)
10718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10719for as_dir in $PATH
10720do
10721  IFS=$as_save_IFS
10722  test -z "$as_dir" && as_dir=.
10723    for ac_exec_ext in '' $ac_executable_extensions; do
10724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10725    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10727    break 2
10728  fi
10729done
10730  done
10731IFS=$as_save_IFS
10732
10733  ;;
10734esac
10735fi
10736CODESIGN=$ac_cv_path_CODESIGN
10737if test -n "$CODESIGN"; then
10738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10739$as_echo "$CODESIGN" >&6; }
10740else
10741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
10743fi
10744
10745
10746    if test "x$CODESIGN" != "x"; then
10747      # Verify that the openjdk_codesign certificate is present
10748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10749$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10750      rm -f codesign-testfile
10751      touch codesign-testfile
10752      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10753      rm -f codesign-testfile
10754      if test "x$CODESIGN" = x; then
10755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757      else
10758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10759$as_echo "yes" >&6; }
10760      fi
10761    fi
10762  fi
10763
10764
10765# Check if pkg-config is available.
10766
10767
10768if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10769	if test -n "$ac_tool_prefix"; then
10770  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10771set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10773$as_echo_n "checking for $ac_word... " >&6; }
10774if ${ac_cv_path_PKG_CONFIG+:} false; then :
10775  $as_echo_n "(cached) " >&6
10776else
10777  case $PKG_CONFIG in
10778  [\\/]* | ?:[\\/]*)
10779  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10780  ;;
10781  *)
10782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10783for as_dir in $PATH
10784do
10785  IFS=$as_save_IFS
10786  test -z "$as_dir" && as_dir=.
10787    for ac_exec_ext in '' $ac_executable_extensions; do
10788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10789    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10791    break 2
10792  fi
10793done
10794  done
10795IFS=$as_save_IFS
10796
10797  ;;
10798esac
10799fi
10800PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10801if test -n "$PKG_CONFIG"; then
10802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10803$as_echo "$PKG_CONFIG" >&6; }
10804else
10805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10806$as_echo "no" >&6; }
10807fi
10808
10809
10810fi
10811if test -z "$ac_cv_path_PKG_CONFIG"; then
10812  ac_pt_PKG_CONFIG=$PKG_CONFIG
10813  # Extract the first word of "pkg-config", so it can be a program name with args.
10814set dummy pkg-config; ac_word=$2
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10816$as_echo_n "checking for $ac_word... " >&6; }
10817if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10818  $as_echo_n "(cached) " >&6
10819else
10820  case $ac_pt_PKG_CONFIG in
10821  [\\/]* | ?:[\\/]*)
10822  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10823  ;;
10824  *)
10825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826for as_dir in $PATH
10827do
10828  IFS=$as_save_IFS
10829  test -z "$as_dir" && as_dir=.
10830    for ac_exec_ext in '' $ac_executable_extensions; do
10831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10832    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10834    break 2
10835  fi
10836done
10837  done
10838IFS=$as_save_IFS
10839
10840  ;;
10841esac
10842fi
10843ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10844if test -n "$ac_pt_PKG_CONFIG"; then
10845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10846$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10847else
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
10850fi
10851
10852  if test "x$ac_pt_PKG_CONFIG" = x; then
10853    PKG_CONFIG=""
10854  else
10855    case $cross_compiling:$ac_tool_warned in
10856yes:)
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10859ac_tool_warned=yes ;;
10860esac
10861    PKG_CONFIG=$ac_pt_PKG_CONFIG
10862  fi
10863else
10864  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10865fi
10866
10867fi
10868if test -n "$PKG_CONFIG"; then
10869	_pkg_min_version=0.9.0
10870	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10871$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10872	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10873		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10874$as_echo "yes" >&6; }
10875	else
10876		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10877$as_echo "no" >&6; }
10878		PKG_CONFIG=""
10879	fi
10880
10881fi
10882
10883# After basic tools have been setup, we can check build os specific details.
10884
10885  ###############################################################################
10886
10887  # Note that this is the build platform OS version!
10888
10889  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10890  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10891  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10892  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10893
10894
10895
10896
10897
10898# Setup builddeps, for automatic downloading of tools we need.
10899# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10900# boot-jdk setup, but we need to have basic tools setup first.
10901
10902
10903# Check whether --with-builddeps-conf was given.
10904if test "${with_builddeps_conf+set}" = set; then :
10905  withval=$with_builddeps_conf;
10906fi
10907
10908
10909
10910# Check whether --with-builddeps-server was given.
10911if test "${with_builddeps_server+set}" = set; then :
10912  withval=$with_builddeps_server;
10913fi
10914
10915
10916
10917# Check whether --with-builddeps-dir was given.
10918if test "${with_builddeps_dir+set}" = set; then :
10919  withval=$with_builddeps_dir;
10920else
10921  with_builddeps_dir=/localhome/builddeps
10922fi
10923
10924
10925
10926# Check whether --with-builddeps-group was given.
10927if test "${with_builddeps_group+set}" = set; then :
10928  withval=$with_builddeps_group;
10929fi
10930
10931
10932
10933
10934  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10935    if test "x$with_builddeps_conf" != x; then
10936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10937$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10938      builddepsfile=$with_builddeps_conf
10939      if test -s $builddepsfile; then
10940        . $builddepsfile
10941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10942$as_echo "loaded!" >&6; }
10943      else
10944        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10945      fi
10946    else
10947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10948$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10949      builddepsfile=`mktemp`
10950      touch $builddepsfile
10951      # Put all found confs into a single file.
10952      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10953      # Source the file to acquire the variables
10954      if test -s $builddepsfile; then
10955        . $builddepsfile
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10957$as_echo "found at least one!" >&6; }
10958      else
10959        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10960      fi
10961    fi
10962    # Create build and target names that use _ instead of "-" and ".".
10963    # This is necessary to use them in variable names.
10964    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10965    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10966    # Extract rewrite information for build and target
10967    eval rewritten_build=\${REWRITE_${build_var}}
10968    if test "x$rewritten_build" = x; then
10969      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10970      echo Build stays the same $rewritten_build
10971    else
10972      echo Rewriting build for builddeps into $rewritten_build
10973    fi
10974    eval rewritten_target=\${REWRITE_${target_var}}
10975    if test "x$rewritten_target" = x; then
10976      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10977      echo Target stays the same $rewritten_target
10978    else
10979      echo Rewriting target for builddeps into $rewritten_target
10980    fi
10981    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10982    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10983  fi
10984  for ac_prog in 7z unzip
10985do
10986  # Extract the first word of "$ac_prog", so it can be a program name with args.
10987set dummy $ac_prog; ac_word=$2
10988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989$as_echo_n "checking for $ac_word... " >&6; }
10990if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10991  $as_echo_n "(cached) " >&6
10992else
10993  if test -n "$BDEPS_UNZIP"; then
10994  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10995else
10996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10997for as_dir in $PATH
10998do
10999  IFS=$as_save_IFS
11000  test -z "$as_dir" && as_dir=.
11001    for ac_exec_ext in '' $ac_executable_extensions; do
11002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11003    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11005    break 2
11006  fi
11007done
11008  done
11009IFS=$as_save_IFS
11010
11011fi
11012fi
11013BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11014if test -n "$BDEPS_UNZIP"; then
11015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11016$as_echo "$BDEPS_UNZIP" >&6; }
11017else
11018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
11020fi
11021
11022
11023  test -n "$BDEPS_UNZIP" && break
11024done
11025
11026  if test "x$BDEPS_UNZIP" = x7z; then
11027    BDEPS_UNZIP="7z x"
11028  fi
11029
11030  for ac_prog in wget lftp ftp
11031do
11032  # Extract the first word of "$ac_prog", so it can be a program name with args.
11033set dummy $ac_prog; ac_word=$2
11034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11035$as_echo_n "checking for $ac_word... " >&6; }
11036if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11037  $as_echo_n "(cached) " >&6
11038else
11039  if test -n "$BDEPS_FTP"; then
11040  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11041else
11042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11043for as_dir in $PATH
11044do
11045  IFS=$as_save_IFS
11046  test -z "$as_dir" && as_dir=.
11047    for ac_exec_ext in '' $ac_executable_extensions; do
11048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11049    ac_cv_prog_BDEPS_FTP="$ac_prog"
11050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11051    break 2
11052  fi
11053done
11054  done
11055IFS=$as_save_IFS
11056
11057fi
11058fi
11059BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11060if test -n "$BDEPS_FTP"; then
11061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11062$as_echo "$BDEPS_FTP" >&6; }
11063else
11064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
11066fi
11067
11068
11069  test -n "$BDEPS_FTP" && break
11070done
11071
11072
11073
11074###############################################################################
11075#
11076# Determine OpenJDK variants, options and version numbers.
11077#
11078###############################################################################
11079
11080# We need build & target for this.
11081
11082
11083  ###############################################################################
11084  #
11085  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11086  # We always build headless support.
11087  #
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11089$as_echo_n "checking headful support... " >&6; }
11090  # Check whether --enable-headful was given.
11091if test "${enable_headful+set}" = set; then :
11092  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11093else
11094  SUPPORT_HEADFUL=yes
11095fi
11096
11097
11098  SUPPORT_HEADLESS=yes
11099  BUILD_HEADLESS="BUILD_HEADLESS:=true"
11100
11101  if test "x$SUPPORT_HEADFUL" = xyes; then
11102    # We are building both headful and headless.
11103    headful_msg="include support for both headful and headless"
11104  fi
11105
11106  if test "x$SUPPORT_HEADFUL" = xno; then
11107    # Thus we are building headless only.
11108    BUILD_HEADLESS="BUILD_HEADLESS:=true"
11109    headful_msg="headless only"
11110  fi
11111
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11113$as_echo "$headful_msg" >&6; }
11114
11115
11116
11117
11118
11119  # Control wether Hotspot runs Queens test after build.
11120  # Check whether --enable-hotspot-test-in-build was given.
11121if test "${enable_hotspot_test_in_build+set}" = set; then :
11122  enableval=$enable_hotspot_test_in_build;
11123else
11124  enable_hotspot_test_in_build=no
11125fi
11126
11127  if test "x$enable_hotspot_test_in_build" = "xyes"; then
11128    TEST_IN_BUILD=true
11129  else
11130    TEST_IN_BUILD=false
11131  fi
11132
11133
11134  ###############################################################################
11135  #
11136  # Choose cacerts source file
11137  #
11138
11139# Check whether --with-cacerts-file was given.
11140if test "${with_cacerts_file+set}" = set; then :
11141  withval=$with_cacerts_file;
11142fi
11143
11144  if test "x$with_cacerts_file" != x; then
11145    CACERTS_FILE=$with_cacerts_file
11146  else
11147    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11148  fi
11149
11150
11151  ###############################################################################
11152  #
11153  # Enable or disable unlimited crypto
11154  #
11155  # Check whether --enable-unlimited-crypto was given.
11156if test "${enable_unlimited_crypto+set}" = set; then :
11157  enableval=$enable_unlimited_crypto;
11158else
11159  enable_unlimited_crypto=no
11160fi
11161
11162  if test "x$enable_unlimited_crypto" = "xyes"; then
11163    UNLIMITED_CRYPTO=true
11164  else
11165    UNLIMITED_CRYPTO=false
11166  fi
11167
11168
11169  ###############################################################################
11170  #
11171  # Enable or disable the elliptic curve crypto implementation
11172  #
11173
11174
11175  ###############################################################################
11176  #
11177  # Compress jars
11178  #
11179  COMPRESS_JARS=false
11180
11181
11182
11183
11184  # Source the version numbers
11185  . $AUTOCONF_DIR/version-numbers
11186
11187  # Get the settings from parameters
11188
11189# Check whether --with-milestone was given.
11190if test "${with_milestone+set}" = set; then :
11191  withval=$with_milestone;
11192fi
11193
11194  if test "x$with_milestone" = xyes; then
11195    as_fn_error $? "Milestone must have a value" "$LINENO" 5
11196  elif test "x$with_milestone" != x; then
11197    MILESTONE="$with_milestone"
11198  fi
11199  if test "x$MILESTONE" = x; then
11200    MILESTONE=internal
11201  fi
11202
11203
11204# Check whether --with-update-version was given.
11205if test "${with_update_version+set}" = set; then :
11206  withval=$with_update_version;
11207fi
11208
11209  if test "x$with_update_version" = xyes; then
11210    as_fn_error $? "Update version must have a value" "$LINENO" 5
11211  elif test "x$with_update_version" != x; then
11212    JDK_UPDATE_VERSION="$with_update_version"
11213  fi
11214
11215
11216# Check whether --with-user-release-suffix was given.
11217if test "${with_user_release_suffix+set}" = set; then :
11218  withval=$with_user_release_suffix;
11219fi
11220
11221  if test "x$with_user_release_suffix" = xyes; then
11222    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11223  elif test "x$with_user_release_suffix" != x; then
11224    USER_RELEASE_SUFFIX="$with_user_release_suffix"
11225  fi
11226
11227
11228# Check whether --with-build-number was given.
11229if test "${with_build_number+set}" = set; then :
11230  withval=$with_build_number;
11231fi
11232
11233  if test "x$with_build_number" = xyes; then
11234    as_fn_error $? "Build number must have a value" "$LINENO" 5
11235  elif test "x$with_build_number" != x; then
11236    JDK_BUILD_NUMBER="$with_build_number"
11237  fi
11238  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11239  if test "x$JDK_BUILD_NUMBER" = x; then
11240    JDK_BUILD_NUMBER=b00
11241    if test "x$USER_RELEASE_SUFFIX" = x; then
11242      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11243      # Avoid [:alnum:] since it depends on the locale.
11244      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11245      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11246    fi
11247  fi
11248
11249  # Now set the JDK version, milestone, build number etc.
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265  COPYRIGHT_YEAR=`date +'%Y'`
11266
11267
11268  if test "x$JDK_UPDATE_VERSION" != x; then
11269    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11270  else
11271    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11272  fi
11273
11274
11275  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11276
11277
11278
11279###############################################################################
11280#
11281# Setup BootJDK, used to bootstrap the build.
11282#
11283###############################################################################
11284
11285
11286  BOOT_JDK_FOUND=no
11287
11288# Check whether --with-boot-jdk was given.
11289if test "${with_boot_jdk+set}" = set; then :
11290  withval=$with_boot_jdk;
11291fi
11292
11293
11294  # We look for the Boot JDK through various means, going from more certain to
11295  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11296  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11297  # must check if this is indeed valid; otherwise we'll continue looking.
11298
11299  # Test: Is bootjdk explicitely set by command line arguments?
11300
11301  if test "x$BOOT_JDK_FOUND" = xno; then
11302    # Now execute the test
11303
11304  if test "x$with_boot_jdk" != x; then
11305    BOOT_JDK=$with_boot_jdk
11306    BOOT_JDK_FOUND=maybe
11307    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11308$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11309  fi
11310
11311
11312    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11313    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11314      # Do we have a bin/java?
11315      if test ! -x "$BOOT_JDK/bin/java"; then
11316        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11318        BOOT_JDK_FOUND=no
11319      else
11320        # Do we have a bin/javac?
11321        if test ! -x "$BOOT_JDK/bin/javac"; then
11322          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11324          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11325$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11326          BOOT_JDK_FOUND=no
11327        else
11328          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11329          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11330            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11332            BOOT_JDK_FOUND=no
11333          else
11334            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11335            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11336
11337            # Extra M4 quote needed to protect [] in grep expression.
11338            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11339            if test "x$FOUND_VERSION_78" = x; then
11340              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11342              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11343$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11344              BOOT_JDK_FOUND=no
11345            else
11346              # We're done! :-)
11347              BOOT_JDK_FOUND=yes
11348
11349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11350
11351  # Input might be given as Windows format, start by converting to
11352  # unix format.
11353  path="$BOOT_JDK"
11354  new_path=`$CYGPATH -u "$path"`
11355
11356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11359  # "foo.exe" is OK but "foo" is an error.
11360  #
11361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11362  # It is also a way to make sure we got the proper file name for the real test later on.
11363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11364  if test "x$test_shortpath" = x; then
11365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11368  fi
11369
11370  # Call helper function which possibly converts this using DOS-style short mode.
11371  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11384      # Going to short mode and back again did indeed matter. Since short mode is
11385      # case insensitive, let's make it lowercase to improve readability.
11386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11387      # Now convert it back to Unix-stile (cygpath)
11388      input_path=`$CYGPATH -u "$shortmode_path"`
11389      new_path="$input_path"
11390    fi
11391  fi
11392
11393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11394  if test "x$test_cygdrive_prefix" = x; then
11395    # As a simple fix, exclude /usr/bin since it's not a real path.
11396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11398      # a path prefixed by /cygdrive for fixpath to work.
11399      new_path="$CYGWIN_ROOT_PATH$input_path"
11400    fi
11401  fi
11402
11403
11404  if test "x$path" != "x$new_path"; then
11405    BOOT_JDK="$new_path"
11406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11408  fi
11409
11410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11411
11412  path="$BOOT_JDK"
11413  has_colon=`$ECHO $path | $GREP ^.:`
11414  new_path="$path"
11415  if test "x$has_colon" = x; then
11416    # Not in mixed or Windows style, start by that.
11417    new_path=`cmd //c echo $path`
11418  fi
11419
11420
11421  input_path="$new_path"
11422  # Check if we need to convert this using DOS-style short mode. If the path
11423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11424  # take no chances and rewrite it.
11425  # Note: m4 eats our [], so we need to use [ and ] instead.
11426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11427  if test "x$has_forbidden_chars" != x; then
11428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11430  fi
11431
11432
11433  windows_path="$new_path"
11434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11435    unix_path=`$CYGPATH -u "$windows_path"`
11436    new_path="$unix_path"
11437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11439    new_path="$unix_path"
11440  fi
11441
11442  if test "x$path" != "x$new_path"; then
11443    BOOT_JDK="$new_path"
11444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11446  fi
11447
11448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11450
11451  else
11452    # We're on a posix platform. Hooray! :)
11453    path="$BOOT_JDK"
11454    has_space=`$ECHO "$path" | $GREP " "`
11455    if test "x$has_space" != x; then
11456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11458      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11459    fi
11460
11461    # Use eval to expand a potential ~
11462    eval path="$path"
11463    if test ! -f "$path" && test ! -d "$path"; then
11464      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11465    fi
11466
11467    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11468  fi
11469
11470              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11471$as_echo_n "checking for Boot JDK... " >&6; }
11472              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11473$as_echo "$BOOT_JDK" >&6; }
11474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11475$as_echo_n "checking Boot JDK version... " >&6; }
11476              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11477              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11478$as_echo "$BOOT_JDK_VERSION" >&6; }
11479            fi # end check jdk version
11480          fi # end check rt.jar
11481        fi # end check javac
11482      fi # end check java
11483    fi # end check boot jdk found
11484  fi
11485
11486  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11487    # Having specified an argument which is incorrect will produce an instant failure;
11488    # we should not go on looking
11489    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11490  fi
11491
11492  # Test: Is bootjdk available from builddeps?
11493
11494  if test "x$BOOT_JDK_FOUND" = xno; then
11495    # Now execute the test
11496
11497
11498
11499  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11500    # Source the builddeps file again, to make sure it uses the latest variables!
11501    . $builddepsfile
11502    # Look for a target and build machine specific resource!
11503    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11504    if test "x$resource" = x; then
11505      # Ok, lets instead look for a target specific resource
11506      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11507    fi
11508    if test "x$resource" = x; then
11509      # Ok, lets instead look for a build specific resource
11510      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11511    fi
11512    if test "x$resource" = x; then
11513      # Ok, lets instead look for a generic resource
11514      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11515      resource=${builddep_bootjdk}
11516    fi
11517    if test "x$resource" != x; then
11518      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11519$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11520      # If the resource in the builddeps.conf file is an existing directory,
11521      # for example /java/linux/cups
11522      if test -d ${resource}; then
11523        depdir=${resource}
11524      else
11525
11526  # bootjdk is for example mymodule
11527  # $resource is for example libs/general/libmymod_1_2_3.zip
11528  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11529  # $with_builddeps_dir is for example /localhome/builddeps
11530  # depdir is the name of the variable into which we store the depdir, eg MYMOD
11531  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11532  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11533  filename=`basename $resource`
11534  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11535  filebase=${filename%%.*}
11536  extension=${filename#*.}
11537  installdir=$with_builddeps_dir/$filebase
11538  if test ! -f $installdir/$filename.unpacked; then
11539    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11540$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11541    if test ! -d $installdir; then
11542      mkdir -p $installdir
11543    fi
11544    if test ! -d $installdir; then
11545      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11546    fi
11547    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11548    touch $tmpfile
11549    if test ! -f $tmpfile; then
11550      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11551    fi
11552
11553  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11554  # $tmpfile is the local file name for the downloaded file.
11555  VALID_TOOL=no
11556  if test "x$BDEPS_FTP" = xwget; then
11557    VALID_TOOL=yes
11558    wget -O $tmpfile $with_builddeps_server/$resource
11559  fi
11560  if test "x$BDEPS_FTP" = xlftp; then
11561    VALID_TOOL=yes
11562    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11563  fi
11564  if test "x$BDEPS_FTP" = xftp; then
11565    VALID_TOOL=yes
11566    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11567    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11568    FTPUSERPWD=${FTPSERVER%%@*}
11569    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11570      FTPUSER=${userpwd%%:*}
11571      FTPPWD=${userpwd#*@}
11572      FTPSERVER=${FTPSERVER#*@}
11573    else
11574      FTPUSER=ftp
11575      FTPPWD=ftp
11576    fi
11577    # the "pass" command does not work on some
11578    # ftp clients (read ftp.exe) but if it works,
11579    # passive mode is better!
11580    ( \
11581        echo "user $FTPUSER $FTPPWD"        ; \
11582        echo "pass"                         ; \
11583        echo "bin"                          ; \
11584        echo "get $FTPPATH $tmpfile"              ; \
11585    ) | ftp -in $FTPSERVER
11586  fi
11587  if test "x$VALID_TOOL" != xyes; then
11588    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11589  fi
11590
11591    mv $tmpfile $installdir/$filename
11592    if test ! -s $installdir/$filename; then
11593      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11594    fi
11595    case "$extension" in
11596      zip)  echo "Unzipping $installdir/$filename..."
11597        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11598        ;;
11599      tar.gz) echo "Untaring $installdir/$filename..."
11600        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11601        ;;
11602      tgz) echo "Untaring $installdir/$filename..."
11603        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11604        ;;
11605      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11606        ;;
11607    esac
11608  fi
11609  if test -f $installdir/$filename.unpacked; then
11610    depdir=$installdir
11611  fi
11612
11613      fi
11614      # Source the builddeps file again, because in the previous command, the depdir
11615      # was updated to point at the current build dependency install directory.
11616      . $builddepsfile
11617      # Now extract variables from the builddeps.conf files.
11618      theroot=${builddep_bootjdk_ROOT}
11619      thecflags=${builddep_bootjdk_CFLAGS}
11620      thelibs=${builddep_bootjdk_LIBS}
11621      if test "x$depdir" = x; then
11622        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11623      fi
11624      BOOT_JDK=$depdir
11625      if test "x$theroot" != x; then
11626        BOOT_JDK="$theroot"
11627      fi
11628      if test "x$thecflags" != x; then
11629        BOOT_JDK_CFLAGS="$thecflags"
11630      fi
11631      if test "x$thelibs" != x; then
11632        BOOT_JDK_LIBS="$thelibs"
11633      fi
11634      BOOT_JDK_FOUND=maybe
11635      else BOOT_JDK_FOUND=no
11636
11637    fi
11638    else BOOT_JDK_FOUND=no
11639
11640  fi
11641
11642
11643
11644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11646      # Do we have a bin/java?
11647      if test ! -x "$BOOT_JDK/bin/java"; then
11648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11650        BOOT_JDK_FOUND=no
11651      else
11652        # Do we have a bin/javac?
11653        if test ! -x "$BOOT_JDK/bin/javac"; then
11654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11658          BOOT_JDK_FOUND=no
11659        else
11660          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11661          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11664            BOOT_JDK_FOUND=no
11665          else
11666            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11668
11669            # Extra M4 quote needed to protect [] in grep expression.
11670            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11671            if test "x$FOUND_VERSION_78" = x; then
11672              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11674              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11675$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11676              BOOT_JDK_FOUND=no
11677            else
11678              # We're done! :-)
11679              BOOT_JDK_FOUND=yes
11680
11681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11682
11683  # Input might be given as Windows format, start by converting to
11684  # unix format.
11685  path="$BOOT_JDK"
11686  new_path=`$CYGPATH -u "$path"`
11687
11688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11691  # "foo.exe" is OK but "foo" is an error.
11692  #
11693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11694  # It is also a way to make sure we got the proper file name for the real test later on.
11695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11696  if test "x$test_shortpath" = x; then
11697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11700  fi
11701
11702  # Call helper function which possibly converts this using DOS-style short mode.
11703  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11716      # Going to short mode and back again did indeed matter. Since short mode is
11717      # case insensitive, let's make it lowercase to improve readability.
11718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11719      # Now convert it back to Unix-stile (cygpath)
11720      input_path=`$CYGPATH -u "$shortmode_path"`
11721      new_path="$input_path"
11722    fi
11723  fi
11724
11725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11726  if test "x$test_cygdrive_prefix" = x; then
11727    # As a simple fix, exclude /usr/bin since it's not a real path.
11728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11730      # a path prefixed by /cygdrive for fixpath to work.
11731      new_path="$CYGWIN_ROOT_PATH$input_path"
11732    fi
11733  fi
11734
11735
11736  if test "x$path" != "x$new_path"; then
11737    BOOT_JDK="$new_path"
11738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11740  fi
11741
11742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11743
11744  path="$BOOT_JDK"
11745  has_colon=`$ECHO $path | $GREP ^.:`
11746  new_path="$path"
11747  if test "x$has_colon" = x; then
11748    # Not in mixed or Windows style, start by that.
11749    new_path=`cmd //c echo $path`
11750  fi
11751
11752
11753  input_path="$new_path"
11754  # Check if we need to convert this using DOS-style short mode. If the path
11755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11756  # take no chances and rewrite it.
11757  # Note: m4 eats our [], so we need to use [ and ] instead.
11758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11759  if test "x$has_forbidden_chars" != x; then
11760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11762  fi
11763
11764
11765  windows_path="$new_path"
11766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11767    unix_path=`$CYGPATH -u "$windows_path"`
11768    new_path="$unix_path"
11769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11771    new_path="$unix_path"
11772  fi
11773
11774  if test "x$path" != "x$new_path"; then
11775    BOOT_JDK="$new_path"
11776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11778  fi
11779
11780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11782
11783  else
11784    # We're on a posix platform. Hooray! :)
11785    path="$BOOT_JDK"
11786    has_space=`$ECHO "$path" | $GREP " "`
11787    if test "x$has_space" != x; then
11788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11790      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11791    fi
11792
11793    # Use eval to expand a potential ~
11794    eval path="$path"
11795    if test ! -f "$path" && test ! -d "$path"; then
11796      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11797    fi
11798
11799    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11800  fi
11801
11802              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11803$as_echo_n "checking for Boot JDK... " >&6; }
11804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11805$as_echo "$BOOT_JDK" >&6; }
11806              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11807$as_echo_n "checking Boot JDK version... " >&6; }
11808              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11809              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11810$as_echo "$BOOT_JDK_VERSION" >&6; }
11811            fi # end check jdk version
11812          fi # end check rt.jar
11813        fi # end check javac
11814      fi # end check java
11815    fi # end check boot jdk found
11816  fi
11817
11818
11819  # Test: Is $JAVA_HOME set?
11820
11821  if test "x$BOOT_JDK_FOUND" = xno; then
11822    # Now execute the test
11823
11824  if test "x$JAVA_HOME" != x; then
11825    JAVA_HOME_PROCESSED="$JAVA_HOME"
11826
11827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828
11829  # Input might be given as Windows format, start by converting to
11830  # unix format.
11831  path="$JAVA_HOME_PROCESSED"
11832  new_path=`$CYGPATH -u "$path"`
11833
11834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837  # "foo.exe" is OK but "foo" is an error.
11838  #
11839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840  # It is also a way to make sure we got the proper file name for the real test later on.
11841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842  if test "x$test_shortpath" = x; then
11843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11844$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11845    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11846  fi
11847
11848  # Call helper function which possibly converts this using DOS-style short mode.
11849  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862      # Going to short mode and back again did indeed matter. Since short mode is
11863      # case insensitive, let's make it lowercase to improve readability.
11864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865      # Now convert it back to Unix-stile (cygpath)
11866      input_path=`$CYGPATH -u "$shortmode_path"`
11867      new_path="$input_path"
11868    fi
11869  fi
11870
11871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872  if test "x$test_cygdrive_prefix" = x; then
11873    # As a simple fix, exclude /usr/bin since it's not a real path.
11874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876      # a path prefixed by /cygdrive for fixpath to work.
11877      new_path="$CYGWIN_ROOT_PATH$input_path"
11878    fi
11879  fi
11880
11881
11882  if test "x$path" != "x$new_path"; then
11883    JAVA_HOME_PROCESSED="$new_path"
11884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11885$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11886  fi
11887
11888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889
11890  path="$JAVA_HOME_PROCESSED"
11891  has_colon=`$ECHO $path | $GREP ^.:`
11892  new_path="$path"
11893  if test "x$has_colon" = x; then
11894    # Not in mixed or Windows style, start by that.
11895    new_path=`cmd //c echo $path`
11896  fi
11897
11898
11899  input_path="$new_path"
11900  # Check if we need to convert this using DOS-style short mode. If the path
11901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902  # take no chances and rewrite it.
11903  # Note: m4 eats our [], so we need to use [ and ] instead.
11904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905  if test "x$has_forbidden_chars" != x; then
11906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908  fi
11909
11910
11911  windows_path="$new_path"
11912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913    unix_path=`$CYGPATH -u "$windows_path"`
11914    new_path="$unix_path"
11915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917    new_path="$unix_path"
11918  fi
11919
11920  if test "x$path" != "x$new_path"; then
11921    JAVA_HOME_PROCESSED="$new_path"
11922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11923$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11924  fi
11925
11926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928
11929  else
11930    # We're on a posix platform. Hooray! :)
11931    path="$JAVA_HOME_PROCESSED"
11932    has_space=`$ECHO "$path" | $GREP " "`
11933    if test "x$has_space" != x; then
11934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11935$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937    fi
11938
11939    # Use eval to expand a potential ~
11940    eval path="$path"
11941    if test ! -f "$path" && test ! -d "$path"; then
11942      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11943    fi
11944
11945    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11946  fi
11947
11948    if test ! -d "$JAVA_HOME_PROCESSED"; then
11949      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11950$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11951    else
11952      # Aha, the user has set a JAVA_HOME
11953      # let us use that as the Boot JDK.
11954      BOOT_JDK="$JAVA_HOME_PROCESSED"
11955      BOOT_JDK_FOUND=maybe
11956      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11957$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11958    fi
11959  fi
11960
11961
11962    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11963    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11964      # Do we have a bin/java?
11965      if test ! -x "$BOOT_JDK/bin/java"; then
11966        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11968        BOOT_JDK_FOUND=no
11969      else
11970        # Do we have a bin/javac?
11971        if test ! -x "$BOOT_JDK/bin/javac"; then
11972          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11974          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11975$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11976          BOOT_JDK_FOUND=no
11977        else
11978          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11979          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11980            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11982            BOOT_JDK_FOUND=no
11983          else
11984            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11985            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11986
11987            # Extra M4 quote needed to protect [] in grep expression.
11988            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11989            if test "x$FOUND_VERSION_78" = x; then
11990              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11992              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11993$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11994              BOOT_JDK_FOUND=no
11995            else
11996              # We're done! :-)
11997              BOOT_JDK_FOUND=yes
11998
11999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12000
12001  # Input might be given as Windows format, start by converting to
12002  # unix format.
12003  path="$BOOT_JDK"
12004  new_path=`$CYGPATH -u "$path"`
12005
12006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12009  # "foo.exe" is OK but "foo" is an error.
12010  #
12011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12012  # It is also a way to make sure we got the proper file name for the real test later on.
12013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12014  if test "x$test_shortpath" = x; then
12015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12018  fi
12019
12020  # Call helper function which possibly converts this using DOS-style short mode.
12021  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12034      # Going to short mode and back again did indeed matter. Since short mode is
12035      # case insensitive, let's make it lowercase to improve readability.
12036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12037      # Now convert it back to Unix-stile (cygpath)
12038      input_path=`$CYGPATH -u "$shortmode_path"`
12039      new_path="$input_path"
12040    fi
12041  fi
12042
12043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12044  if test "x$test_cygdrive_prefix" = x; then
12045    # As a simple fix, exclude /usr/bin since it's not a real path.
12046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12048      # a path prefixed by /cygdrive for fixpath to work.
12049      new_path="$CYGWIN_ROOT_PATH$input_path"
12050    fi
12051  fi
12052
12053
12054  if test "x$path" != "x$new_path"; then
12055    BOOT_JDK="$new_path"
12056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12058  fi
12059
12060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12061
12062  path="$BOOT_JDK"
12063  has_colon=`$ECHO $path | $GREP ^.:`
12064  new_path="$path"
12065  if test "x$has_colon" = x; then
12066    # Not in mixed or Windows style, start by that.
12067    new_path=`cmd //c echo $path`
12068  fi
12069
12070
12071  input_path="$new_path"
12072  # Check if we need to convert this using DOS-style short mode. If the path
12073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12074  # take no chances and rewrite it.
12075  # Note: m4 eats our [], so we need to use [ and ] instead.
12076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12077  if test "x$has_forbidden_chars" != x; then
12078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12080  fi
12081
12082
12083  windows_path="$new_path"
12084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12085    unix_path=`$CYGPATH -u "$windows_path"`
12086    new_path="$unix_path"
12087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12089    new_path="$unix_path"
12090  fi
12091
12092  if test "x$path" != "x$new_path"; then
12093    BOOT_JDK="$new_path"
12094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12096  fi
12097
12098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12100
12101  else
12102    # We're on a posix platform. Hooray! :)
12103    path="$BOOT_JDK"
12104    has_space=`$ECHO "$path" | $GREP " "`
12105    if test "x$has_space" != x; then
12106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12108      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12109    fi
12110
12111    # Use eval to expand a potential ~
12112    eval path="$path"
12113    if test ! -f "$path" && test ! -d "$path"; then
12114      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12115    fi
12116
12117    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12118  fi
12119
12120              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12121$as_echo_n "checking for Boot JDK... " >&6; }
12122              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12123$as_echo "$BOOT_JDK" >&6; }
12124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12125$as_echo_n "checking Boot JDK version... " >&6; }
12126              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12127              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12128$as_echo "$BOOT_JDK_VERSION" >&6; }
12129            fi # end check jdk version
12130          fi # end check rt.jar
12131        fi # end check javac
12132      fi # end check java
12133    fi # end check boot jdk found
12134  fi
12135
12136
12137  # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12138
12139  if test "x$BOOT_JDK_FOUND" = xno; then
12140    # Now execute the test
12141
12142  if test -x /usr/libexec/java_home; then
12143    BOOT_JDK=`/usr/libexec/java_home`
12144    BOOT_JDK_FOUND=maybe
12145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12146$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12147  fi
12148
12149
12150    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12151    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12152      # Do we have a bin/java?
12153      if test ! -x "$BOOT_JDK/bin/java"; then
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12156        BOOT_JDK_FOUND=no
12157      else
12158        # Do we have a bin/javac?
12159        if test ! -x "$BOOT_JDK/bin/javac"; then
12160          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12162          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12163$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12164          BOOT_JDK_FOUND=no
12165        else
12166          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12167          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12168            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12170            BOOT_JDK_FOUND=no
12171          else
12172            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12173            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12174
12175            # Extra M4 quote needed to protect [] in grep expression.
12176            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12177            if test "x$FOUND_VERSION_78" = x; then
12178              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12180              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12181$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12182              BOOT_JDK_FOUND=no
12183            else
12184              # We're done! :-)
12185              BOOT_JDK_FOUND=yes
12186
12187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12188
12189  # Input might be given as Windows format, start by converting to
12190  # unix format.
12191  path="$BOOT_JDK"
12192  new_path=`$CYGPATH -u "$path"`
12193
12194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12197  # "foo.exe" is OK but "foo" is an error.
12198  #
12199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12200  # It is also a way to make sure we got the proper file name for the real test later on.
12201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12202  if test "x$test_shortpath" = x; then
12203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12205    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12206  fi
12207
12208  # Call helper function which possibly converts this using DOS-style short mode.
12209  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12222      # Going to short mode and back again did indeed matter. Since short mode is
12223      # case insensitive, let's make it lowercase to improve readability.
12224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12225      # Now convert it back to Unix-stile (cygpath)
12226      input_path=`$CYGPATH -u "$shortmode_path"`
12227      new_path="$input_path"
12228    fi
12229  fi
12230
12231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12232  if test "x$test_cygdrive_prefix" = x; then
12233    # As a simple fix, exclude /usr/bin since it's not a real path.
12234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12236      # a path prefixed by /cygdrive for fixpath to work.
12237      new_path="$CYGWIN_ROOT_PATH$input_path"
12238    fi
12239  fi
12240
12241
12242  if test "x$path" != "x$new_path"; then
12243    BOOT_JDK="$new_path"
12244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12246  fi
12247
12248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12249
12250  path="$BOOT_JDK"
12251  has_colon=`$ECHO $path | $GREP ^.:`
12252  new_path="$path"
12253  if test "x$has_colon" = x; then
12254    # Not in mixed or Windows style, start by that.
12255    new_path=`cmd //c echo $path`
12256  fi
12257
12258
12259  input_path="$new_path"
12260  # Check if we need to convert this using DOS-style short mode. If the path
12261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12262  # take no chances and rewrite it.
12263  # Note: m4 eats our [], so we need to use [ and ] instead.
12264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12265  if test "x$has_forbidden_chars" != x; then
12266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12268  fi
12269
12270
12271  windows_path="$new_path"
12272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12273    unix_path=`$CYGPATH -u "$windows_path"`
12274    new_path="$unix_path"
12275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12277    new_path="$unix_path"
12278  fi
12279
12280  if test "x$path" != "x$new_path"; then
12281    BOOT_JDK="$new_path"
12282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12284  fi
12285
12286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12288
12289  else
12290    # We're on a posix platform. Hooray! :)
12291    path="$BOOT_JDK"
12292    has_space=`$ECHO "$path" | $GREP " "`
12293    if test "x$has_space" != x; then
12294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12296      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12297    fi
12298
12299    # Use eval to expand a potential ~
12300    eval path="$path"
12301    if test ! -f "$path" && test ! -d "$path"; then
12302      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12303    fi
12304
12305    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12306  fi
12307
12308              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12309$as_echo_n "checking for Boot JDK... " >&6; }
12310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12311$as_echo "$BOOT_JDK" >&6; }
12312              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12313$as_echo_n "checking Boot JDK version... " >&6; }
12314              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12315              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12316$as_echo "$BOOT_JDK_VERSION" >&6; }
12317            fi # end check jdk version
12318          fi # end check rt.jar
12319        fi # end check javac
12320      fi # end check java
12321    fi # end check boot jdk found
12322  fi
12323
12324
12325  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12326
12327  if test "x$BOOT_JDK_FOUND" = xno; then
12328    # Now execute the test
12329
12330  # Extract the first word of "javac", so it can be a program name with args.
12331set dummy javac; ac_word=$2
12332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12333$as_echo_n "checking for $ac_word... " >&6; }
12334if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12335  $as_echo_n "(cached) " >&6
12336else
12337  case $JAVAC_CHECK in
12338  [\\/]* | ?:[\\/]*)
12339  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12340  ;;
12341  *)
12342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12343for as_dir in $PATH
12344do
12345  IFS=$as_save_IFS
12346  test -z "$as_dir" && as_dir=.
12347    for ac_exec_ext in '' $ac_executable_extensions; do
12348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12349    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12351    break 2
12352  fi
12353done
12354  done
12355IFS=$as_save_IFS
12356
12357  ;;
12358esac
12359fi
12360JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12361if test -n "$JAVAC_CHECK"; then
12362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12363$as_echo "$JAVAC_CHECK" >&6; }
12364else
12365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12366$as_echo "no" >&6; }
12367fi
12368
12369
12370  # Extract the first word of "java", so it can be a program name with args.
12371set dummy java; ac_word=$2
12372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12373$as_echo_n "checking for $ac_word... " >&6; }
12374if ${ac_cv_path_JAVA_CHECK+:} false; then :
12375  $as_echo_n "(cached) " >&6
12376else
12377  case $JAVA_CHECK in
12378  [\\/]* | ?:[\\/]*)
12379  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12380  ;;
12381  *)
12382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383for as_dir in $PATH
12384do
12385  IFS=$as_save_IFS
12386  test -z "$as_dir" && as_dir=.
12387    for ac_exec_ext in '' $ac_executable_extensions; do
12388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12389    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12391    break 2
12392  fi
12393done
12394  done
12395IFS=$as_save_IFS
12396
12397  ;;
12398esac
12399fi
12400JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12401if test -n "$JAVA_CHECK"; then
12402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12403$as_echo "$JAVA_CHECK" >&6; }
12404else
12405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
12407fi
12408
12409
12410  BINARY="$JAVAC_CHECK"
12411  if test "x$JAVAC_CHECK" = x; then
12412    BINARY="$JAVA_CHECK"
12413  fi
12414  if test "x$BINARY" != x; then
12415    # So there is a java(c) binary, it might be part of a JDK.
12416    # Lets find the JDK/JRE directory by following symbolic links.
12417    # Linux/GNU systems often have links from /usr/bin/java to
12418    # /etc/alternatives/java to the real JDK binary.
12419
12420  if test "x$OPENJDK_BUILD_OS" != xwindows; then
12421    # Follow a chain of symbolic links. Use readlink
12422    # where it exists, else fall back to horribly
12423    # complicated shell code.
12424    if test "x$READLINK_TESTED" != yes; then
12425      # On MacOSX there is a readlink tool with a different
12426      # purpose than the GNU readlink tool. Check the found readlink.
12427      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12428      if test "x$ISGNU" = x; then
12429        # A readlink that we do not know how to use.
12430        # Are there other non-GNU readlinks out there?
12431        READLINK_TESTED=yes
12432        READLINK=
12433      fi
12434    fi
12435
12436    if test "x$READLINK" != x; then
12437      BINARY=`$READLINK -f $BINARY`
12438    else
12439      # Save the current directory for restoring afterwards
12440      STARTDIR=$PWD
12441      COUNTER=0
12442      sym_link_dir=`$DIRNAME $BINARY`
12443      sym_link_file=`$BASENAME $BINARY`
12444      cd $sym_link_dir
12445      # Use -P flag to resolve symlinks in directories.
12446      cd `$THEPWDCMD -P`
12447      sym_link_dir=`$THEPWDCMD -P`
12448      # Resolve file symlinks
12449      while test $COUNTER -lt 20; do
12450        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12451        if test "x$ISLINK" == x; then
12452          # This is not a symbolic link! We are done!
12453          break
12454        fi
12455        # Again resolve directory symlinks since the target of the just found
12456        # link could be in a different directory
12457        cd `$DIRNAME $ISLINK`
12458        sym_link_dir=`$THEPWDCMD -P`
12459        sym_link_file=`$BASENAME $ISLINK`
12460        let COUNTER=COUNTER+1
12461      done
12462      cd $STARTDIR
12463      BINARY=$sym_link_dir/$sym_link_file
12464    fi
12465  fi
12466
12467    BOOT_JDK=`dirname "$BINARY"`
12468    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12469    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12470      # Looks like we found ourselves an JDK
12471      BOOT_JDK_FOUND=maybe
12472      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12473$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12474    fi
12475  fi
12476
12477
12478    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12479    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12480      # Do we have a bin/java?
12481      if test ! -x "$BOOT_JDK/bin/java"; then
12482        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12484        BOOT_JDK_FOUND=no
12485      else
12486        # Do we have a bin/javac?
12487        if test ! -x "$BOOT_JDK/bin/javac"; then
12488          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12490          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12491$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12492          BOOT_JDK_FOUND=no
12493        else
12494          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12495          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12496            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12498            BOOT_JDK_FOUND=no
12499          else
12500            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12502
12503            # Extra M4 quote needed to protect [] in grep expression.
12504            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12505            if test "x$FOUND_VERSION_78" = x; then
12506              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12508              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12509$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12510              BOOT_JDK_FOUND=no
12511            else
12512              # We're done! :-)
12513              BOOT_JDK_FOUND=yes
12514
12515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12516
12517  # Input might be given as Windows format, start by converting to
12518  # unix format.
12519  path="$BOOT_JDK"
12520  new_path=`$CYGPATH -u "$path"`
12521
12522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12525  # "foo.exe" is OK but "foo" is an error.
12526  #
12527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12528  # It is also a way to make sure we got the proper file name for the real test later on.
12529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12530  if test "x$test_shortpath" = x; then
12531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12533    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12534  fi
12535
12536  # Call helper function which possibly converts this using DOS-style short mode.
12537  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12550      # Going to short mode and back again did indeed matter. Since short mode is
12551      # case insensitive, let's make it lowercase to improve readability.
12552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12553      # Now convert it back to Unix-stile (cygpath)
12554      input_path=`$CYGPATH -u "$shortmode_path"`
12555      new_path="$input_path"
12556    fi
12557  fi
12558
12559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12560  if test "x$test_cygdrive_prefix" = x; then
12561    # As a simple fix, exclude /usr/bin since it's not a real path.
12562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12564      # a path prefixed by /cygdrive for fixpath to work.
12565      new_path="$CYGWIN_ROOT_PATH$input_path"
12566    fi
12567  fi
12568
12569
12570  if test "x$path" != "x$new_path"; then
12571    BOOT_JDK="$new_path"
12572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12574  fi
12575
12576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12577
12578  path="$BOOT_JDK"
12579  has_colon=`$ECHO $path | $GREP ^.:`
12580  new_path="$path"
12581  if test "x$has_colon" = x; then
12582    # Not in mixed or Windows style, start by that.
12583    new_path=`cmd //c echo $path`
12584  fi
12585
12586
12587  input_path="$new_path"
12588  # Check if we need to convert this using DOS-style short mode. If the path
12589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12590  # take no chances and rewrite it.
12591  # Note: m4 eats our [], so we need to use [ and ] instead.
12592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12593  if test "x$has_forbidden_chars" != x; then
12594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12596  fi
12597
12598
12599  windows_path="$new_path"
12600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12601    unix_path=`$CYGPATH -u "$windows_path"`
12602    new_path="$unix_path"
12603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12605    new_path="$unix_path"
12606  fi
12607
12608  if test "x$path" != "x$new_path"; then
12609    BOOT_JDK="$new_path"
12610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12611$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12612  fi
12613
12614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12616
12617  else
12618    # We're on a posix platform. Hooray! :)
12619    path="$BOOT_JDK"
12620    has_space=`$ECHO "$path" | $GREP " "`
12621    if test "x$has_space" != x; then
12622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12624      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12625    fi
12626
12627    # Use eval to expand a potential ~
12628    eval path="$path"
12629    if test ! -f "$path" && test ! -d "$path"; then
12630      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12631    fi
12632
12633    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12634  fi
12635
12636              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12637$as_echo_n "checking for Boot JDK... " >&6; }
12638              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12639$as_echo "$BOOT_JDK" >&6; }
12640              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12641$as_echo_n "checking Boot JDK version... " >&6; }
12642              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12643              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12644$as_echo "$BOOT_JDK_VERSION" >&6; }
12645            fi # end check jdk version
12646          fi # end check rt.jar
12647        fi # end check javac
12648      fi # end check java
12649    fi # end check boot jdk found
12650  fi
12651
12652
12653  # Test: Is there a JDK installed in default, well-known locations?
12654
12655  if test "x$BOOT_JDK_FOUND" = xno; then
12656    # Now execute the test
12657
12658  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12659
12660  if test "x$BOOT_JDK_FOUND" = xno; then
12661    # Now execute the test
12662
12663  if test "x$ProgramW6432" != x; then
12664    VIRTUAL_DIR="$ProgramW6432/Java"
12665
12666  windows_path="$VIRTUAL_DIR"
12667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12668    unix_path=`$CYGPATH -u "$windows_path"`
12669    VIRTUAL_DIR="$unix_path"
12670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12672    VIRTUAL_DIR="$unix_path"
12673  fi
12674
12675
12676  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12677  BOOT_JDK_SUFFIX=""
12678  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12679  if test "x$ALL_JDKS_FOUND" != x; then
12680    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12681
12682  if test "x$BOOT_JDK_FOUND" = xno; then
12683    # Now execute the test
12684
12685        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12686        if test -d "$BOOT_JDK"; then
12687          BOOT_JDK_FOUND=maybe
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12689$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12690        fi
12691
12692
12693    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12694    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12695      # Do we have a bin/java?
12696      if test ! -x "$BOOT_JDK/bin/java"; then
12697        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12699        BOOT_JDK_FOUND=no
12700      else
12701        # Do we have a bin/javac?
12702        if test ! -x "$BOOT_JDK/bin/javac"; then
12703          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12705          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12706$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12707          BOOT_JDK_FOUND=no
12708        else
12709          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12710          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12713            BOOT_JDK_FOUND=no
12714          else
12715            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12716            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12717
12718            # Extra M4 quote needed to protect [] in grep expression.
12719            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12720            if test "x$FOUND_VERSION_78" = x; then
12721              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12723              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12724$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12725              BOOT_JDK_FOUND=no
12726            else
12727              # We're done! :-)
12728              BOOT_JDK_FOUND=yes
12729
12730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12731
12732  # Input might be given as Windows format, start by converting to
12733  # unix format.
12734  path="$BOOT_JDK"
12735  new_path=`$CYGPATH -u "$path"`
12736
12737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12740  # "foo.exe" is OK but "foo" is an error.
12741  #
12742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12743  # It is also a way to make sure we got the proper file name for the real test later on.
12744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12745  if test "x$test_shortpath" = x; then
12746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12748    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12749  fi
12750
12751  # Call helper function which possibly converts this using DOS-style short mode.
12752  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12765      # Going to short mode and back again did indeed matter. Since short mode is
12766      # case insensitive, let's make it lowercase to improve readability.
12767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12768      # Now convert it back to Unix-stile (cygpath)
12769      input_path=`$CYGPATH -u "$shortmode_path"`
12770      new_path="$input_path"
12771    fi
12772  fi
12773
12774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12775  if test "x$test_cygdrive_prefix" = x; then
12776    # As a simple fix, exclude /usr/bin since it's not a real path.
12777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12779      # a path prefixed by /cygdrive for fixpath to work.
12780      new_path="$CYGWIN_ROOT_PATH$input_path"
12781    fi
12782  fi
12783
12784
12785  if test "x$path" != "x$new_path"; then
12786    BOOT_JDK="$new_path"
12787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12789  fi
12790
12791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12792
12793  path="$BOOT_JDK"
12794  has_colon=`$ECHO $path | $GREP ^.:`
12795  new_path="$path"
12796  if test "x$has_colon" = x; then
12797    # Not in mixed or Windows style, start by that.
12798    new_path=`cmd //c echo $path`
12799  fi
12800
12801
12802  input_path="$new_path"
12803  # Check if we need to convert this using DOS-style short mode. If the path
12804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12805  # take no chances and rewrite it.
12806  # Note: m4 eats our [], so we need to use [ and ] instead.
12807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12808  if test "x$has_forbidden_chars" != x; then
12809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12811  fi
12812
12813
12814  windows_path="$new_path"
12815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12816    unix_path=`$CYGPATH -u "$windows_path"`
12817    new_path="$unix_path"
12818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12820    new_path="$unix_path"
12821  fi
12822
12823  if test "x$path" != "x$new_path"; then
12824    BOOT_JDK="$new_path"
12825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12827  fi
12828
12829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12831
12832  else
12833    # We're on a posix platform. Hooray! :)
12834    path="$BOOT_JDK"
12835    has_space=`$ECHO "$path" | $GREP " "`
12836    if test "x$has_space" != x; then
12837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12839      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12840    fi
12841
12842    # Use eval to expand a potential ~
12843    eval path="$path"
12844    if test ! -f "$path" && test ! -d "$path"; then
12845      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12846    fi
12847
12848    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12849  fi
12850
12851              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12852$as_echo_n "checking for Boot JDK... " >&6; }
12853              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12854$as_echo "$BOOT_JDK" >&6; }
12855              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12856$as_echo_n "checking Boot JDK version... " >&6; }
12857              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12858              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12859$as_echo "$BOOT_JDK_VERSION" >&6; }
12860            fi # end check jdk version
12861          fi # end check rt.jar
12862        fi # end check javac
12863      fi # end check java
12864    fi # end check boot jdk found
12865  fi
12866
12867    done
12868  fi
12869
12870  fi
12871
12872
12873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12875      # Do we have a bin/java?
12876      if test ! -x "$BOOT_JDK/bin/java"; then
12877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12879        BOOT_JDK_FOUND=no
12880      else
12881        # Do we have a bin/javac?
12882        if test ! -x "$BOOT_JDK/bin/javac"; then
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12887          BOOT_JDK_FOUND=no
12888        else
12889          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12890          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12893            BOOT_JDK_FOUND=no
12894          else
12895            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12897
12898            # Extra M4 quote needed to protect [] in grep expression.
12899            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12900            if test "x$FOUND_VERSION_78" = x; then
12901              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12903              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12904$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12905              BOOT_JDK_FOUND=no
12906            else
12907              # We're done! :-)
12908              BOOT_JDK_FOUND=yes
12909
12910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12911
12912  # Input might be given as Windows format, start by converting to
12913  # unix format.
12914  path="$BOOT_JDK"
12915  new_path=`$CYGPATH -u "$path"`
12916
12917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12920  # "foo.exe" is OK but "foo" is an error.
12921  #
12922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12923  # It is also a way to make sure we got the proper file name for the real test later on.
12924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12925  if test "x$test_shortpath" = x; then
12926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12929  fi
12930
12931  # Call helper function which possibly converts this using DOS-style short mode.
12932  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12945      # Going to short mode and back again did indeed matter. Since short mode is
12946      # case insensitive, let's make it lowercase to improve readability.
12947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12948      # Now convert it back to Unix-stile (cygpath)
12949      input_path=`$CYGPATH -u "$shortmode_path"`
12950      new_path="$input_path"
12951    fi
12952  fi
12953
12954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12955  if test "x$test_cygdrive_prefix" = x; then
12956    # As a simple fix, exclude /usr/bin since it's not a real path.
12957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12959      # a path prefixed by /cygdrive for fixpath to work.
12960      new_path="$CYGWIN_ROOT_PATH$input_path"
12961    fi
12962  fi
12963
12964
12965  if test "x$path" != "x$new_path"; then
12966    BOOT_JDK="$new_path"
12967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12969  fi
12970
12971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12972
12973  path="$BOOT_JDK"
12974  has_colon=`$ECHO $path | $GREP ^.:`
12975  new_path="$path"
12976  if test "x$has_colon" = x; then
12977    # Not in mixed or Windows style, start by that.
12978    new_path=`cmd //c echo $path`
12979  fi
12980
12981
12982  input_path="$new_path"
12983  # Check if we need to convert this using DOS-style short mode. If the path
12984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12985  # take no chances and rewrite it.
12986  # Note: m4 eats our [], so we need to use [ and ] instead.
12987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12988  if test "x$has_forbidden_chars" != x; then
12989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12991  fi
12992
12993
12994  windows_path="$new_path"
12995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12996    unix_path=`$CYGPATH -u "$windows_path"`
12997    new_path="$unix_path"
12998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13000    new_path="$unix_path"
13001  fi
13002
13003  if test "x$path" != "x$new_path"; then
13004    BOOT_JDK="$new_path"
13005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13007  fi
13008
13009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13011
13012  else
13013    # We're on a posix platform. Hooray! :)
13014    path="$BOOT_JDK"
13015    has_space=`$ECHO "$path" | $GREP " "`
13016    if test "x$has_space" != x; then
13017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13020    fi
13021
13022    # Use eval to expand a potential ~
13023    eval path="$path"
13024    if test ! -f "$path" && test ! -d "$path"; then
13025      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13026    fi
13027
13028    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13029  fi
13030
13031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13032$as_echo_n "checking for Boot JDK... " >&6; }
13033              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13034$as_echo "$BOOT_JDK" >&6; }
13035              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13036$as_echo_n "checking Boot JDK version... " >&6; }
13037              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13039$as_echo "$BOOT_JDK_VERSION" >&6; }
13040            fi # end check jdk version
13041          fi # end check rt.jar
13042        fi # end check javac
13043      fi # end check java
13044    fi # end check boot jdk found
13045  fi
13046
13047
13048  if test "x$BOOT_JDK_FOUND" = xno; then
13049    # Now execute the test
13050
13051  if test "x$PROGRAMW6432" != x; then
13052    VIRTUAL_DIR="$PROGRAMW6432/Java"
13053
13054  windows_path="$VIRTUAL_DIR"
13055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13056    unix_path=`$CYGPATH -u "$windows_path"`
13057    VIRTUAL_DIR="$unix_path"
13058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13060    VIRTUAL_DIR="$unix_path"
13061  fi
13062
13063
13064  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13065  BOOT_JDK_SUFFIX=""
13066  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13067  if test "x$ALL_JDKS_FOUND" != x; then
13068    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13069
13070  if test "x$BOOT_JDK_FOUND" = xno; then
13071    # Now execute the test
13072
13073        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13074        if test -d "$BOOT_JDK"; then
13075          BOOT_JDK_FOUND=maybe
13076          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13077$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13078        fi
13079
13080
13081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13083      # Do we have a bin/java?
13084      if test ! -x "$BOOT_JDK/bin/java"; then
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13087        BOOT_JDK_FOUND=no
13088      else
13089        # Do we have a bin/javac?
13090        if test ! -x "$BOOT_JDK/bin/javac"; then
13091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13095          BOOT_JDK_FOUND=no
13096        else
13097          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13098          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13101            BOOT_JDK_FOUND=no
13102          else
13103            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13105
13106            # Extra M4 quote needed to protect [] in grep expression.
13107            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13108            if test "x$FOUND_VERSION_78" = x; then
13109              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13111              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13112$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13113              BOOT_JDK_FOUND=no
13114            else
13115              # We're done! :-)
13116              BOOT_JDK_FOUND=yes
13117
13118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13119
13120  # Input might be given as Windows format, start by converting to
13121  # unix format.
13122  path="$BOOT_JDK"
13123  new_path=`$CYGPATH -u "$path"`
13124
13125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13128  # "foo.exe" is OK but "foo" is an error.
13129  #
13130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13131  # It is also a way to make sure we got the proper file name for the real test later on.
13132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13133  if test "x$test_shortpath" = x; then
13134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13137  fi
13138
13139  # Call helper function which possibly converts this using DOS-style short mode.
13140  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13153      # Going to short mode and back again did indeed matter. Since short mode is
13154      # case insensitive, let's make it lowercase to improve readability.
13155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13156      # Now convert it back to Unix-stile (cygpath)
13157      input_path=`$CYGPATH -u "$shortmode_path"`
13158      new_path="$input_path"
13159    fi
13160  fi
13161
13162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13163  if test "x$test_cygdrive_prefix" = x; then
13164    # As a simple fix, exclude /usr/bin since it's not a real path.
13165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13167      # a path prefixed by /cygdrive for fixpath to work.
13168      new_path="$CYGWIN_ROOT_PATH$input_path"
13169    fi
13170  fi
13171
13172
13173  if test "x$path" != "x$new_path"; then
13174    BOOT_JDK="$new_path"
13175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13177  fi
13178
13179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13180
13181  path="$BOOT_JDK"
13182  has_colon=`$ECHO $path | $GREP ^.:`
13183  new_path="$path"
13184  if test "x$has_colon" = x; then
13185    # Not in mixed or Windows style, start by that.
13186    new_path=`cmd //c echo $path`
13187  fi
13188
13189
13190  input_path="$new_path"
13191  # Check if we need to convert this using DOS-style short mode. If the path
13192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13193  # take no chances and rewrite it.
13194  # Note: m4 eats our [], so we need to use [ and ] instead.
13195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13196  if test "x$has_forbidden_chars" != x; then
13197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13199  fi
13200
13201
13202  windows_path="$new_path"
13203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13204    unix_path=`$CYGPATH -u "$windows_path"`
13205    new_path="$unix_path"
13206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13208    new_path="$unix_path"
13209  fi
13210
13211  if test "x$path" != "x$new_path"; then
13212    BOOT_JDK="$new_path"
13213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13215  fi
13216
13217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13219
13220  else
13221    # We're on a posix platform. Hooray! :)
13222    path="$BOOT_JDK"
13223    has_space=`$ECHO "$path" | $GREP " "`
13224    if test "x$has_space" != x; then
13225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13228    fi
13229
13230    # Use eval to expand a potential ~
13231    eval path="$path"
13232    if test ! -f "$path" && test ! -d "$path"; then
13233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13234    fi
13235
13236    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13237  fi
13238
13239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13240$as_echo_n "checking for Boot JDK... " >&6; }
13241              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13242$as_echo "$BOOT_JDK" >&6; }
13243              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13244$as_echo_n "checking Boot JDK version... " >&6; }
13245              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13247$as_echo "$BOOT_JDK_VERSION" >&6; }
13248            fi # end check jdk version
13249          fi # end check rt.jar
13250        fi # end check javac
13251      fi # end check java
13252    fi # end check boot jdk found
13253  fi
13254
13255    done
13256  fi
13257
13258  fi
13259
13260
13261    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13262    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13263      # Do we have a bin/java?
13264      if test ! -x "$BOOT_JDK/bin/java"; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13267        BOOT_JDK_FOUND=no
13268      else
13269        # Do we have a bin/javac?
13270        if test ! -x "$BOOT_JDK/bin/javac"; then
13271          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13273          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13274$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13275          BOOT_JDK_FOUND=no
13276        else
13277          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13278          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13279            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13281            BOOT_JDK_FOUND=no
13282          else
13283            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13285
13286            # Extra M4 quote needed to protect [] in grep expression.
13287            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13288            if test "x$FOUND_VERSION_78" = x; then
13289              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13291              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13292$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13293              BOOT_JDK_FOUND=no
13294            else
13295              # We're done! :-)
13296              BOOT_JDK_FOUND=yes
13297
13298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13299
13300  # Input might be given as Windows format, start by converting to
13301  # unix format.
13302  path="$BOOT_JDK"
13303  new_path=`$CYGPATH -u "$path"`
13304
13305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13308  # "foo.exe" is OK but "foo" is an error.
13309  #
13310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13311  # It is also a way to make sure we got the proper file name for the real test later on.
13312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13313  if test "x$test_shortpath" = x; then
13314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13316    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13317  fi
13318
13319  # Call helper function which possibly converts this using DOS-style short mode.
13320  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13333      # Going to short mode and back again did indeed matter. Since short mode is
13334      # case insensitive, let's make it lowercase to improve readability.
13335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13336      # Now convert it back to Unix-stile (cygpath)
13337      input_path=`$CYGPATH -u "$shortmode_path"`
13338      new_path="$input_path"
13339    fi
13340  fi
13341
13342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13343  if test "x$test_cygdrive_prefix" = x; then
13344    # As a simple fix, exclude /usr/bin since it's not a real path.
13345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13347      # a path prefixed by /cygdrive for fixpath to work.
13348      new_path="$CYGWIN_ROOT_PATH$input_path"
13349    fi
13350  fi
13351
13352
13353  if test "x$path" != "x$new_path"; then
13354    BOOT_JDK="$new_path"
13355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13357  fi
13358
13359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13360
13361  path="$BOOT_JDK"
13362  has_colon=`$ECHO $path | $GREP ^.:`
13363  new_path="$path"
13364  if test "x$has_colon" = x; then
13365    # Not in mixed or Windows style, start by that.
13366    new_path=`cmd //c echo $path`
13367  fi
13368
13369
13370  input_path="$new_path"
13371  # Check if we need to convert this using DOS-style short mode. If the path
13372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13373  # take no chances and rewrite it.
13374  # Note: m4 eats our [], so we need to use [ and ] instead.
13375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13376  if test "x$has_forbidden_chars" != x; then
13377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13379  fi
13380
13381
13382  windows_path="$new_path"
13383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13384    unix_path=`$CYGPATH -u "$windows_path"`
13385    new_path="$unix_path"
13386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13388    new_path="$unix_path"
13389  fi
13390
13391  if test "x$path" != "x$new_path"; then
13392    BOOT_JDK="$new_path"
13393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13395  fi
13396
13397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13399
13400  else
13401    # We're on a posix platform. Hooray! :)
13402    path="$BOOT_JDK"
13403    has_space=`$ECHO "$path" | $GREP " "`
13404    if test "x$has_space" != x; then
13405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13407      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13408    fi
13409
13410    # Use eval to expand a potential ~
13411    eval path="$path"
13412    if test ! -f "$path" && test ! -d "$path"; then
13413      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13414    fi
13415
13416    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13417  fi
13418
13419              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13420$as_echo_n "checking for Boot JDK... " >&6; }
13421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13422$as_echo "$BOOT_JDK" >&6; }
13423              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13424$as_echo_n "checking Boot JDK version... " >&6; }
13425              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13426              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13427$as_echo "$BOOT_JDK_VERSION" >&6; }
13428            fi # end check jdk version
13429          fi # end check rt.jar
13430        fi # end check javac
13431      fi # end check java
13432    fi # end check boot jdk found
13433  fi
13434
13435
13436  if test "x$BOOT_JDK_FOUND" = xno; then
13437    # Now execute the test
13438
13439  if test "x$PROGRAMFILES" != x; then
13440    VIRTUAL_DIR="$PROGRAMFILES/Java"
13441
13442  windows_path="$VIRTUAL_DIR"
13443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13444    unix_path=`$CYGPATH -u "$windows_path"`
13445    VIRTUAL_DIR="$unix_path"
13446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13448    VIRTUAL_DIR="$unix_path"
13449  fi
13450
13451
13452  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13453  BOOT_JDK_SUFFIX=""
13454  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13455  if test "x$ALL_JDKS_FOUND" != x; then
13456    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13457
13458  if test "x$BOOT_JDK_FOUND" = xno; then
13459    # Now execute the test
13460
13461        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13462        if test -d "$BOOT_JDK"; then
13463          BOOT_JDK_FOUND=maybe
13464          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13465$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13466        fi
13467
13468
13469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13471      # Do we have a bin/java?
13472      if test ! -x "$BOOT_JDK/bin/java"; then
13473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13475        BOOT_JDK_FOUND=no
13476      else
13477        # Do we have a bin/javac?
13478        if test ! -x "$BOOT_JDK/bin/javac"; then
13479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13483          BOOT_JDK_FOUND=no
13484        else
13485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13489            BOOT_JDK_FOUND=no
13490          else
13491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13493
13494            # Extra M4 quote needed to protect [] in grep expression.
13495            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13496            if test "x$FOUND_VERSION_78" = x; then
13497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13500$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13501              BOOT_JDK_FOUND=no
13502            else
13503              # We're done! :-)
13504              BOOT_JDK_FOUND=yes
13505
13506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13507
13508  # Input might be given as Windows format, start by converting to
13509  # unix format.
13510  path="$BOOT_JDK"
13511  new_path=`$CYGPATH -u "$path"`
13512
13513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13516  # "foo.exe" is OK but "foo" is an error.
13517  #
13518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13519  # It is also a way to make sure we got the proper file name for the real test later on.
13520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13521  if test "x$test_shortpath" = x; then
13522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13525  fi
13526
13527  # Call helper function which possibly converts this using DOS-style short mode.
13528  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13541      # Going to short mode and back again did indeed matter. Since short mode is
13542      # case insensitive, let's make it lowercase to improve readability.
13543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13544      # Now convert it back to Unix-stile (cygpath)
13545      input_path=`$CYGPATH -u "$shortmode_path"`
13546      new_path="$input_path"
13547    fi
13548  fi
13549
13550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13551  if test "x$test_cygdrive_prefix" = x; then
13552    # As a simple fix, exclude /usr/bin since it's not a real path.
13553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13555      # a path prefixed by /cygdrive for fixpath to work.
13556      new_path="$CYGWIN_ROOT_PATH$input_path"
13557    fi
13558  fi
13559
13560
13561  if test "x$path" != "x$new_path"; then
13562    BOOT_JDK="$new_path"
13563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13565  fi
13566
13567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13568
13569  path="$BOOT_JDK"
13570  has_colon=`$ECHO $path | $GREP ^.:`
13571  new_path="$path"
13572  if test "x$has_colon" = x; then
13573    # Not in mixed or Windows style, start by that.
13574    new_path=`cmd //c echo $path`
13575  fi
13576
13577
13578  input_path="$new_path"
13579  # Check if we need to convert this using DOS-style short mode. If the path
13580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13581  # take no chances and rewrite it.
13582  # Note: m4 eats our [], so we need to use [ and ] instead.
13583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13584  if test "x$has_forbidden_chars" != x; then
13585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13587  fi
13588
13589
13590  windows_path="$new_path"
13591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13592    unix_path=`$CYGPATH -u "$windows_path"`
13593    new_path="$unix_path"
13594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13596    new_path="$unix_path"
13597  fi
13598
13599  if test "x$path" != "x$new_path"; then
13600    BOOT_JDK="$new_path"
13601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13603  fi
13604
13605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13607
13608  else
13609    # We're on a posix platform. Hooray! :)
13610    path="$BOOT_JDK"
13611    has_space=`$ECHO "$path" | $GREP " "`
13612    if test "x$has_space" != x; then
13613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13616    fi
13617
13618    # Use eval to expand a potential ~
13619    eval path="$path"
13620    if test ! -f "$path" && test ! -d "$path"; then
13621      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13622    fi
13623
13624    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13625  fi
13626
13627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13628$as_echo_n "checking for Boot JDK... " >&6; }
13629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13630$as_echo "$BOOT_JDK" >&6; }
13631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13632$as_echo_n "checking Boot JDK version... " >&6; }
13633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13635$as_echo "$BOOT_JDK_VERSION" >&6; }
13636            fi # end check jdk version
13637          fi # end check rt.jar
13638        fi # end check javac
13639      fi # end check java
13640    fi # end check boot jdk found
13641  fi
13642
13643    done
13644  fi
13645
13646  fi
13647
13648
13649    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13650    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13651      # Do we have a bin/java?
13652      if test ! -x "$BOOT_JDK/bin/java"; then
13653        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13655        BOOT_JDK_FOUND=no
13656      else
13657        # Do we have a bin/javac?
13658        if test ! -x "$BOOT_JDK/bin/javac"; then
13659          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13661          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13662$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13663          BOOT_JDK_FOUND=no
13664        else
13665          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13666          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13667            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13669            BOOT_JDK_FOUND=no
13670          else
13671            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13672            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13673
13674            # Extra M4 quote needed to protect [] in grep expression.
13675            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13676            if test "x$FOUND_VERSION_78" = x; then
13677              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13679              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13680$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13681              BOOT_JDK_FOUND=no
13682            else
13683              # We're done! :-)
13684              BOOT_JDK_FOUND=yes
13685
13686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13687
13688  # Input might be given as Windows format, start by converting to
13689  # unix format.
13690  path="$BOOT_JDK"
13691  new_path=`$CYGPATH -u "$path"`
13692
13693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13696  # "foo.exe" is OK but "foo" is an error.
13697  #
13698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13699  # It is also a way to make sure we got the proper file name for the real test later on.
13700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13701  if test "x$test_shortpath" = x; then
13702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13704    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13705  fi
13706
13707  # Call helper function which possibly converts this using DOS-style short mode.
13708  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13721      # Going to short mode and back again did indeed matter. Since short mode is
13722      # case insensitive, let's make it lowercase to improve readability.
13723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13724      # Now convert it back to Unix-stile (cygpath)
13725      input_path=`$CYGPATH -u "$shortmode_path"`
13726      new_path="$input_path"
13727    fi
13728  fi
13729
13730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13731  if test "x$test_cygdrive_prefix" = x; then
13732    # As a simple fix, exclude /usr/bin since it's not a real path.
13733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13735      # a path prefixed by /cygdrive for fixpath to work.
13736      new_path="$CYGWIN_ROOT_PATH$input_path"
13737    fi
13738  fi
13739
13740
13741  if test "x$path" != "x$new_path"; then
13742    BOOT_JDK="$new_path"
13743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13745  fi
13746
13747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13748
13749  path="$BOOT_JDK"
13750  has_colon=`$ECHO $path | $GREP ^.:`
13751  new_path="$path"
13752  if test "x$has_colon" = x; then
13753    # Not in mixed or Windows style, start by that.
13754    new_path=`cmd //c echo $path`
13755  fi
13756
13757
13758  input_path="$new_path"
13759  # Check if we need to convert this using DOS-style short mode. If the path
13760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13761  # take no chances and rewrite it.
13762  # Note: m4 eats our [], so we need to use [ and ] instead.
13763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13764  if test "x$has_forbidden_chars" != x; then
13765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13767  fi
13768
13769
13770  windows_path="$new_path"
13771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13772    unix_path=`$CYGPATH -u "$windows_path"`
13773    new_path="$unix_path"
13774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13776    new_path="$unix_path"
13777  fi
13778
13779  if test "x$path" != "x$new_path"; then
13780    BOOT_JDK="$new_path"
13781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13782$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13783  fi
13784
13785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13787
13788  else
13789    # We're on a posix platform. Hooray! :)
13790    path="$BOOT_JDK"
13791    has_space=`$ECHO "$path" | $GREP " "`
13792    if test "x$has_space" != x; then
13793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13795      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13796    fi
13797
13798    # Use eval to expand a potential ~
13799    eval path="$path"
13800    if test ! -f "$path" && test ! -d "$path"; then
13801      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13802    fi
13803
13804    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13805  fi
13806
13807              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13808$as_echo_n "checking for Boot JDK... " >&6; }
13809              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13810$as_echo "$BOOT_JDK" >&6; }
13811              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13812$as_echo_n "checking Boot JDK version... " >&6; }
13813              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13814              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13815$as_echo "$BOOT_JDK_VERSION" >&6; }
13816            fi # end check jdk version
13817          fi # end check rt.jar
13818        fi # end check javac
13819      fi # end check java
13820    fi # end check boot jdk found
13821  fi
13822
13823
13824  if test "x$BOOT_JDK_FOUND" = xno; then
13825    # Now execute the test
13826
13827  if test "x$ProgramFiles" != x; then
13828    VIRTUAL_DIR="$ProgramFiles/Java"
13829
13830  windows_path="$VIRTUAL_DIR"
13831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13832    unix_path=`$CYGPATH -u "$windows_path"`
13833    VIRTUAL_DIR="$unix_path"
13834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13836    VIRTUAL_DIR="$unix_path"
13837  fi
13838
13839
13840  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13841  BOOT_JDK_SUFFIX=""
13842  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13843  if test "x$ALL_JDKS_FOUND" != x; then
13844    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13845
13846  if test "x$BOOT_JDK_FOUND" = xno; then
13847    # Now execute the test
13848
13849        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13850        if test -d "$BOOT_JDK"; then
13851          BOOT_JDK_FOUND=maybe
13852          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13853$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13854        fi
13855
13856
13857    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13858    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13859      # Do we have a bin/java?
13860      if test ! -x "$BOOT_JDK/bin/java"; then
13861        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13863        BOOT_JDK_FOUND=no
13864      else
13865        # Do we have a bin/javac?
13866        if test ! -x "$BOOT_JDK/bin/javac"; then
13867          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13869          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13870$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13871          BOOT_JDK_FOUND=no
13872        else
13873          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13874          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13875            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13877            BOOT_JDK_FOUND=no
13878          else
13879            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13880            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13881
13882            # Extra M4 quote needed to protect [] in grep expression.
13883            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13884            if test "x$FOUND_VERSION_78" = x; then
13885              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13887              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13888$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13889              BOOT_JDK_FOUND=no
13890            else
13891              # We're done! :-)
13892              BOOT_JDK_FOUND=yes
13893
13894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13895
13896  # Input might be given as Windows format, start by converting to
13897  # unix format.
13898  path="$BOOT_JDK"
13899  new_path=`$CYGPATH -u "$path"`
13900
13901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13904  # "foo.exe" is OK but "foo" is an error.
13905  #
13906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13907  # It is also a way to make sure we got the proper file name for the real test later on.
13908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13909  if test "x$test_shortpath" = x; then
13910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13912    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13913  fi
13914
13915  # Call helper function which possibly converts this using DOS-style short mode.
13916  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13929      # Going to short mode and back again did indeed matter. Since short mode is
13930      # case insensitive, let's make it lowercase to improve readability.
13931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13932      # Now convert it back to Unix-stile (cygpath)
13933      input_path=`$CYGPATH -u "$shortmode_path"`
13934      new_path="$input_path"
13935    fi
13936  fi
13937
13938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13939  if test "x$test_cygdrive_prefix" = x; then
13940    # As a simple fix, exclude /usr/bin since it's not a real path.
13941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13943      # a path prefixed by /cygdrive for fixpath to work.
13944      new_path="$CYGWIN_ROOT_PATH$input_path"
13945    fi
13946  fi
13947
13948
13949  if test "x$path" != "x$new_path"; then
13950    BOOT_JDK="$new_path"
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13953  fi
13954
13955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13956
13957  path="$BOOT_JDK"
13958  has_colon=`$ECHO $path | $GREP ^.:`
13959  new_path="$path"
13960  if test "x$has_colon" = x; then
13961    # Not in mixed or Windows style, start by that.
13962    new_path=`cmd //c echo $path`
13963  fi
13964
13965
13966  input_path="$new_path"
13967  # Check if we need to convert this using DOS-style short mode. If the path
13968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13969  # take no chances and rewrite it.
13970  # Note: m4 eats our [], so we need to use [ and ] instead.
13971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13972  if test "x$has_forbidden_chars" != x; then
13973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13975  fi
13976
13977
13978  windows_path="$new_path"
13979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13980    unix_path=`$CYGPATH -u "$windows_path"`
13981    new_path="$unix_path"
13982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13984    new_path="$unix_path"
13985  fi
13986
13987  if test "x$path" != "x$new_path"; then
13988    BOOT_JDK="$new_path"
13989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13991  fi
13992
13993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13995
13996  else
13997    # We're on a posix platform. Hooray! :)
13998    path="$BOOT_JDK"
13999    has_space=`$ECHO "$path" | $GREP " "`
14000    if test "x$has_space" != x; then
14001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14003      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14004    fi
14005
14006    # Use eval to expand a potential ~
14007    eval path="$path"
14008    if test ! -f "$path" && test ! -d "$path"; then
14009      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14010    fi
14011
14012    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14013  fi
14014
14015              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14016$as_echo_n "checking for Boot JDK... " >&6; }
14017              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14018$as_echo "$BOOT_JDK" >&6; }
14019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14020$as_echo_n "checking Boot JDK version... " >&6; }
14021              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14022              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14023$as_echo "$BOOT_JDK_VERSION" >&6; }
14024            fi # end check jdk version
14025          fi # end check rt.jar
14026        fi # end check javac
14027      fi # end check java
14028    fi # end check boot jdk found
14029  fi
14030
14031    done
14032  fi
14033
14034  fi
14035
14036
14037    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14038    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14039      # Do we have a bin/java?
14040      if test ! -x "$BOOT_JDK/bin/java"; then
14041        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14043        BOOT_JDK_FOUND=no
14044      else
14045        # Do we have a bin/javac?
14046        if test ! -x "$BOOT_JDK/bin/javac"; then
14047          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14049          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14050$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14051          BOOT_JDK_FOUND=no
14052        else
14053          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14054          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14057            BOOT_JDK_FOUND=no
14058          else
14059            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14061
14062            # Extra M4 quote needed to protect [] in grep expression.
14063            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14064            if test "x$FOUND_VERSION_78" = x; then
14065              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14067              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14068$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14069              BOOT_JDK_FOUND=no
14070            else
14071              # We're done! :-)
14072              BOOT_JDK_FOUND=yes
14073
14074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14075
14076  # Input might be given as Windows format, start by converting to
14077  # unix format.
14078  path="$BOOT_JDK"
14079  new_path=`$CYGPATH -u "$path"`
14080
14081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14084  # "foo.exe" is OK but "foo" is an error.
14085  #
14086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14087  # It is also a way to make sure we got the proper file name for the real test later on.
14088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14089  if test "x$test_shortpath" = x; then
14090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14092    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14093  fi
14094
14095  # Call helper function which possibly converts this using DOS-style short mode.
14096  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14109      # Going to short mode and back again did indeed matter. Since short mode is
14110      # case insensitive, let's make it lowercase to improve readability.
14111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14112      # Now convert it back to Unix-stile (cygpath)
14113      input_path=`$CYGPATH -u "$shortmode_path"`
14114      new_path="$input_path"
14115    fi
14116  fi
14117
14118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14119  if test "x$test_cygdrive_prefix" = x; then
14120    # As a simple fix, exclude /usr/bin since it's not a real path.
14121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14123      # a path prefixed by /cygdrive for fixpath to work.
14124      new_path="$CYGWIN_ROOT_PATH$input_path"
14125    fi
14126  fi
14127
14128
14129  if test "x$path" != "x$new_path"; then
14130    BOOT_JDK="$new_path"
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14133  fi
14134
14135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14136
14137  path="$BOOT_JDK"
14138  has_colon=`$ECHO $path | $GREP ^.:`
14139  new_path="$path"
14140  if test "x$has_colon" = x; then
14141    # Not in mixed or Windows style, start by that.
14142    new_path=`cmd //c echo $path`
14143  fi
14144
14145
14146  input_path="$new_path"
14147  # Check if we need to convert this using DOS-style short mode. If the path
14148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14149  # take no chances and rewrite it.
14150  # Note: m4 eats our [], so we need to use [ and ] instead.
14151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14152  if test "x$has_forbidden_chars" != x; then
14153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14155  fi
14156
14157
14158  windows_path="$new_path"
14159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14160    unix_path=`$CYGPATH -u "$windows_path"`
14161    new_path="$unix_path"
14162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14164    new_path="$unix_path"
14165  fi
14166
14167  if test "x$path" != "x$new_path"; then
14168    BOOT_JDK="$new_path"
14169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14171  fi
14172
14173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14175
14176  else
14177    # We're on a posix platform. Hooray! :)
14178    path="$BOOT_JDK"
14179    has_space=`$ECHO "$path" | $GREP " "`
14180    if test "x$has_space" != x; then
14181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14182$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14183      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14184    fi
14185
14186    # Use eval to expand a potential ~
14187    eval path="$path"
14188    if test ! -f "$path" && test ! -d "$path"; then
14189      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14190    fi
14191
14192    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14193  fi
14194
14195              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14196$as_echo_n "checking for Boot JDK... " >&6; }
14197              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14198$as_echo "$BOOT_JDK" >&6; }
14199              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14200$as_echo_n "checking Boot JDK version... " >&6; }
14201              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14202              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14203$as_echo "$BOOT_JDK_VERSION" >&6; }
14204            fi # end check jdk version
14205          fi # end check rt.jar
14206        fi # end check javac
14207      fi # end check java
14208    fi # end check boot jdk found
14209  fi
14210
14211
14212  if test "x$BOOT_JDK_FOUND" = xno; then
14213    # Now execute the test
14214
14215  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14216  BOOT_JDK_SUFFIX=""
14217  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14218  if test "x$ALL_JDKS_FOUND" != x; then
14219    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14220
14221  if test "x$BOOT_JDK_FOUND" = xno; then
14222    # Now execute the test
14223
14224        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14225        if test -d "$BOOT_JDK"; then
14226          BOOT_JDK_FOUND=maybe
14227          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14228$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14229        fi
14230
14231
14232    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14233    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14234      # Do we have a bin/java?
14235      if test ! -x "$BOOT_JDK/bin/java"; then
14236        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14238        BOOT_JDK_FOUND=no
14239      else
14240        # Do we have a bin/javac?
14241        if test ! -x "$BOOT_JDK/bin/javac"; then
14242          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14244          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14245$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14246          BOOT_JDK_FOUND=no
14247        else
14248          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14249          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14250            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14252            BOOT_JDK_FOUND=no
14253          else
14254            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14255            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14256
14257            # Extra M4 quote needed to protect [] in grep expression.
14258            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14259            if test "x$FOUND_VERSION_78" = x; then
14260              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14262              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14263$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14264              BOOT_JDK_FOUND=no
14265            else
14266              # We're done! :-)
14267              BOOT_JDK_FOUND=yes
14268
14269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14270
14271  # Input might be given as Windows format, start by converting to
14272  # unix format.
14273  path="$BOOT_JDK"
14274  new_path=`$CYGPATH -u "$path"`
14275
14276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14279  # "foo.exe" is OK but "foo" is an error.
14280  #
14281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14282  # It is also a way to make sure we got the proper file name for the real test later on.
14283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14284  if test "x$test_shortpath" = x; then
14285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14287    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14288  fi
14289
14290  # Call helper function which possibly converts this using DOS-style short mode.
14291  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14304      # Going to short mode and back again did indeed matter. Since short mode is
14305      # case insensitive, let's make it lowercase to improve readability.
14306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14307      # Now convert it back to Unix-stile (cygpath)
14308      input_path=`$CYGPATH -u "$shortmode_path"`
14309      new_path="$input_path"
14310    fi
14311  fi
14312
14313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14314  if test "x$test_cygdrive_prefix" = x; then
14315    # As a simple fix, exclude /usr/bin since it's not a real path.
14316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14318      # a path prefixed by /cygdrive for fixpath to work.
14319      new_path="$CYGWIN_ROOT_PATH$input_path"
14320    fi
14321  fi
14322
14323
14324  if test "x$path" != "x$new_path"; then
14325    BOOT_JDK="$new_path"
14326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14328  fi
14329
14330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14331
14332  path="$BOOT_JDK"
14333  has_colon=`$ECHO $path | $GREP ^.:`
14334  new_path="$path"
14335  if test "x$has_colon" = x; then
14336    # Not in mixed or Windows style, start by that.
14337    new_path=`cmd //c echo $path`
14338  fi
14339
14340
14341  input_path="$new_path"
14342  # Check if we need to convert this using DOS-style short mode. If the path
14343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14344  # take no chances and rewrite it.
14345  # Note: m4 eats our [], so we need to use [ and ] instead.
14346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14347  if test "x$has_forbidden_chars" != x; then
14348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14350  fi
14351
14352
14353  windows_path="$new_path"
14354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14355    unix_path=`$CYGPATH -u "$windows_path"`
14356    new_path="$unix_path"
14357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14359    new_path="$unix_path"
14360  fi
14361
14362  if test "x$path" != "x$new_path"; then
14363    BOOT_JDK="$new_path"
14364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14366  fi
14367
14368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14370
14371  else
14372    # We're on a posix platform. Hooray! :)
14373    path="$BOOT_JDK"
14374    has_space=`$ECHO "$path" | $GREP " "`
14375    if test "x$has_space" != x; then
14376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14378      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14379    fi
14380
14381    # Use eval to expand a potential ~
14382    eval path="$path"
14383    if test ! -f "$path" && test ! -d "$path"; then
14384      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14385    fi
14386
14387    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14388  fi
14389
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14391$as_echo_n "checking for Boot JDK... " >&6; }
14392              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14393$as_echo "$BOOT_JDK" >&6; }
14394              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14395$as_echo_n "checking Boot JDK version... " >&6; }
14396              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14397              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14398$as_echo "$BOOT_JDK_VERSION" >&6; }
14399            fi # end check jdk version
14400          fi # end check rt.jar
14401        fi # end check javac
14402      fi # end check java
14403    fi # end check boot jdk found
14404  fi
14405
14406    done
14407  fi
14408
14409
14410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14412      # Do we have a bin/java?
14413      if test ! -x "$BOOT_JDK/bin/java"; then
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14416        BOOT_JDK_FOUND=no
14417      else
14418        # Do we have a bin/javac?
14419        if test ! -x "$BOOT_JDK/bin/javac"; then
14420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14424          BOOT_JDK_FOUND=no
14425        else
14426          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14427          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14430            BOOT_JDK_FOUND=no
14431          else
14432            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14433            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14434
14435            # Extra M4 quote needed to protect [] in grep expression.
14436            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14437            if test "x$FOUND_VERSION_78" = x; then
14438              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14440              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14441$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14442              BOOT_JDK_FOUND=no
14443            else
14444              # We're done! :-)
14445              BOOT_JDK_FOUND=yes
14446
14447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14448
14449  # Input might be given as Windows format, start by converting to
14450  # unix format.
14451  path="$BOOT_JDK"
14452  new_path=`$CYGPATH -u "$path"`
14453
14454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14457  # "foo.exe" is OK but "foo" is an error.
14458  #
14459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14460  # It is also a way to make sure we got the proper file name for the real test later on.
14461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14462  if test "x$test_shortpath" = x; then
14463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14465    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14466  fi
14467
14468  # Call helper function which possibly converts this using DOS-style short mode.
14469  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14482      # Going to short mode and back again did indeed matter. Since short mode is
14483      # case insensitive, let's make it lowercase to improve readability.
14484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14485      # Now convert it back to Unix-stile (cygpath)
14486      input_path=`$CYGPATH -u "$shortmode_path"`
14487      new_path="$input_path"
14488    fi
14489  fi
14490
14491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14492  if test "x$test_cygdrive_prefix" = x; then
14493    # As a simple fix, exclude /usr/bin since it's not a real path.
14494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14496      # a path prefixed by /cygdrive for fixpath to work.
14497      new_path="$CYGWIN_ROOT_PATH$input_path"
14498    fi
14499  fi
14500
14501
14502  if test "x$path" != "x$new_path"; then
14503    BOOT_JDK="$new_path"
14504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14506  fi
14507
14508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14509
14510  path="$BOOT_JDK"
14511  has_colon=`$ECHO $path | $GREP ^.:`
14512  new_path="$path"
14513  if test "x$has_colon" = x; then
14514    # Not in mixed or Windows style, start by that.
14515    new_path=`cmd //c echo $path`
14516  fi
14517
14518
14519  input_path="$new_path"
14520  # Check if we need to convert this using DOS-style short mode. If the path
14521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14522  # take no chances and rewrite it.
14523  # Note: m4 eats our [], so we need to use [ and ] instead.
14524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14525  if test "x$has_forbidden_chars" != x; then
14526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14528  fi
14529
14530
14531  windows_path="$new_path"
14532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14533    unix_path=`$CYGPATH -u "$windows_path"`
14534    new_path="$unix_path"
14535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14537    new_path="$unix_path"
14538  fi
14539
14540  if test "x$path" != "x$new_path"; then
14541    BOOT_JDK="$new_path"
14542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14544  fi
14545
14546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14548
14549  else
14550    # We're on a posix platform. Hooray! :)
14551    path="$BOOT_JDK"
14552    has_space=`$ECHO "$path" | $GREP " "`
14553    if test "x$has_space" != x; then
14554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14556      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14557    fi
14558
14559    # Use eval to expand a potential ~
14560    eval path="$path"
14561    if test ! -f "$path" && test ! -d "$path"; then
14562      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14563    fi
14564
14565    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14566  fi
14567
14568              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14569$as_echo_n "checking for Boot JDK... " >&6; }
14570              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14571$as_echo "$BOOT_JDK" >&6; }
14572              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14573$as_echo_n "checking Boot JDK version... " >&6; }
14574              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14575              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14576$as_echo "$BOOT_JDK_VERSION" >&6; }
14577            fi # end check jdk version
14578          fi # end check rt.jar
14579        fi # end check javac
14580      fi # end check java
14581    fi # end check boot jdk found
14582  fi
14583
14584  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14585
14586  if test "x$BOOT_JDK_FOUND" = xno; then
14587    # Now execute the test
14588
14589  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14590  BOOT_JDK_SUFFIX="/Contents/Home"
14591  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14592  if test "x$ALL_JDKS_FOUND" != x; then
14593    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14594
14595  if test "x$BOOT_JDK_FOUND" = xno; then
14596    # Now execute the test
14597
14598        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14599        if test -d "$BOOT_JDK"; then
14600          BOOT_JDK_FOUND=maybe
14601          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14602$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14603        fi
14604
14605
14606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14608      # Do we have a bin/java?
14609      if test ! -x "$BOOT_JDK/bin/java"; then
14610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14612        BOOT_JDK_FOUND=no
14613      else
14614        # Do we have a bin/javac?
14615        if test ! -x "$BOOT_JDK/bin/javac"; then
14616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14620          BOOT_JDK_FOUND=no
14621        else
14622          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14623          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14624            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14626            BOOT_JDK_FOUND=no
14627          else
14628            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14629            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14630
14631            # Extra M4 quote needed to protect [] in grep expression.
14632            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14633            if test "x$FOUND_VERSION_78" = x; then
14634              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14636              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14637$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14638              BOOT_JDK_FOUND=no
14639            else
14640              # We're done! :-)
14641              BOOT_JDK_FOUND=yes
14642
14643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14644
14645  # Input might be given as Windows format, start by converting to
14646  # unix format.
14647  path="$BOOT_JDK"
14648  new_path=`$CYGPATH -u "$path"`
14649
14650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14653  # "foo.exe" is OK but "foo" is an error.
14654  #
14655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14656  # It is also a way to make sure we got the proper file name for the real test later on.
14657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14658  if test "x$test_shortpath" = x; then
14659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14661    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14662  fi
14663
14664  # Call helper function which possibly converts this using DOS-style short mode.
14665  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14678      # Going to short mode and back again did indeed matter. Since short mode is
14679      # case insensitive, let's make it lowercase to improve readability.
14680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14681      # Now convert it back to Unix-stile (cygpath)
14682      input_path=`$CYGPATH -u "$shortmode_path"`
14683      new_path="$input_path"
14684    fi
14685  fi
14686
14687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14688  if test "x$test_cygdrive_prefix" = x; then
14689    # As a simple fix, exclude /usr/bin since it's not a real path.
14690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14692      # a path prefixed by /cygdrive for fixpath to work.
14693      new_path="$CYGWIN_ROOT_PATH$input_path"
14694    fi
14695  fi
14696
14697
14698  if test "x$path" != "x$new_path"; then
14699    BOOT_JDK="$new_path"
14700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14702  fi
14703
14704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14705
14706  path="$BOOT_JDK"
14707  has_colon=`$ECHO $path | $GREP ^.:`
14708  new_path="$path"
14709  if test "x$has_colon" = x; then
14710    # Not in mixed or Windows style, start by that.
14711    new_path=`cmd //c echo $path`
14712  fi
14713
14714
14715  input_path="$new_path"
14716  # Check if we need to convert this using DOS-style short mode. If the path
14717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14718  # take no chances and rewrite it.
14719  # Note: m4 eats our [], so we need to use [ and ] instead.
14720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14721  if test "x$has_forbidden_chars" != x; then
14722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14724  fi
14725
14726
14727  windows_path="$new_path"
14728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14729    unix_path=`$CYGPATH -u "$windows_path"`
14730    new_path="$unix_path"
14731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14733    new_path="$unix_path"
14734  fi
14735
14736  if test "x$path" != "x$new_path"; then
14737    BOOT_JDK="$new_path"
14738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14740  fi
14741
14742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14744
14745  else
14746    # We're on a posix platform. Hooray! :)
14747    path="$BOOT_JDK"
14748    has_space=`$ECHO "$path" | $GREP " "`
14749    if test "x$has_space" != x; then
14750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14752      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14753    fi
14754
14755    # Use eval to expand a potential ~
14756    eval path="$path"
14757    if test ! -f "$path" && test ! -d "$path"; then
14758      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14759    fi
14760
14761    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14762  fi
14763
14764              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14765$as_echo_n "checking for Boot JDK... " >&6; }
14766              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14767$as_echo "$BOOT_JDK" >&6; }
14768              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14769$as_echo_n "checking Boot JDK version... " >&6; }
14770              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14771              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14772$as_echo "$BOOT_JDK_VERSION" >&6; }
14773            fi # end check jdk version
14774          fi # end check rt.jar
14775        fi # end check javac
14776      fi # end check java
14777    fi # end check boot jdk found
14778  fi
14779
14780    done
14781  fi
14782
14783
14784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14786      # Do we have a bin/java?
14787      if test ! -x "$BOOT_JDK/bin/java"; then
14788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14790        BOOT_JDK_FOUND=no
14791      else
14792        # Do we have a bin/javac?
14793        if test ! -x "$BOOT_JDK/bin/javac"; then
14794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14798          BOOT_JDK_FOUND=no
14799        else
14800          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14801          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14802            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14804            BOOT_JDK_FOUND=no
14805          else
14806            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14807            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14808
14809            # Extra M4 quote needed to protect [] in grep expression.
14810            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14811            if test "x$FOUND_VERSION_78" = x; then
14812              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14814              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14815$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14816              BOOT_JDK_FOUND=no
14817            else
14818              # We're done! :-)
14819              BOOT_JDK_FOUND=yes
14820
14821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14822
14823  # Input might be given as Windows format, start by converting to
14824  # unix format.
14825  path="$BOOT_JDK"
14826  new_path=`$CYGPATH -u "$path"`
14827
14828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14831  # "foo.exe" is OK but "foo" is an error.
14832  #
14833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14834  # It is also a way to make sure we got the proper file name for the real test later on.
14835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14836  if test "x$test_shortpath" = x; then
14837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14840  fi
14841
14842  # Call helper function which possibly converts this using DOS-style short mode.
14843  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14856      # Going to short mode and back again did indeed matter. Since short mode is
14857      # case insensitive, let's make it lowercase to improve readability.
14858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14859      # Now convert it back to Unix-stile (cygpath)
14860      input_path=`$CYGPATH -u "$shortmode_path"`
14861      new_path="$input_path"
14862    fi
14863  fi
14864
14865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14866  if test "x$test_cygdrive_prefix" = x; then
14867    # As a simple fix, exclude /usr/bin since it's not a real path.
14868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14870      # a path prefixed by /cygdrive for fixpath to work.
14871      new_path="$CYGWIN_ROOT_PATH$input_path"
14872    fi
14873  fi
14874
14875
14876  if test "x$path" != "x$new_path"; then
14877    BOOT_JDK="$new_path"
14878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14880  fi
14881
14882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14883
14884  path="$BOOT_JDK"
14885  has_colon=`$ECHO $path | $GREP ^.:`
14886  new_path="$path"
14887  if test "x$has_colon" = x; then
14888    # Not in mixed or Windows style, start by that.
14889    new_path=`cmd //c echo $path`
14890  fi
14891
14892
14893  input_path="$new_path"
14894  # Check if we need to convert this using DOS-style short mode. If the path
14895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14896  # take no chances and rewrite it.
14897  # Note: m4 eats our [], so we need to use [ and ] instead.
14898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14899  if test "x$has_forbidden_chars" != x; then
14900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14902  fi
14903
14904
14905  windows_path="$new_path"
14906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14907    unix_path=`$CYGPATH -u "$windows_path"`
14908    new_path="$unix_path"
14909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14911    new_path="$unix_path"
14912  fi
14913
14914  if test "x$path" != "x$new_path"; then
14915    BOOT_JDK="$new_path"
14916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14918  fi
14919
14920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14922
14923  else
14924    # We're on a posix platform. Hooray! :)
14925    path="$BOOT_JDK"
14926    has_space=`$ECHO "$path" | $GREP " "`
14927    if test "x$has_space" != x; then
14928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14930      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14931    fi
14932
14933    # Use eval to expand a potential ~
14934    eval path="$path"
14935    if test ! -f "$path" && test ! -d "$path"; then
14936      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14937    fi
14938
14939    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14940  fi
14941
14942              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14943$as_echo_n "checking for Boot JDK... " >&6; }
14944              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14945$as_echo "$BOOT_JDK" >&6; }
14946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14947$as_echo_n "checking Boot JDK version... " >&6; }
14948              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14949              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14950$as_echo "$BOOT_JDK_VERSION" >&6; }
14951            fi # end check jdk version
14952          fi # end check rt.jar
14953        fi # end check javac
14954      fi # end check java
14955    fi # end check boot jdk found
14956  fi
14957
14958
14959  if test "x$BOOT_JDK_FOUND" = xno; then
14960    # Now execute the test
14961
14962  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14963  BOOT_JDK_SUFFIX="/Contents/Home"
14964  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14965  if test "x$ALL_JDKS_FOUND" != x; then
14966    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14967
14968  if test "x$BOOT_JDK_FOUND" = xno; then
14969    # Now execute the test
14970
14971        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14972        if test -d "$BOOT_JDK"; then
14973          BOOT_JDK_FOUND=maybe
14974          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14975$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14976        fi
14977
14978
14979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14981      # Do we have a bin/java?
14982      if test ! -x "$BOOT_JDK/bin/java"; then
14983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14985        BOOT_JDK_FOUND=no
14986      else
14987        # Do we have a bin/javac?
14988        if test ! -x "$BOOT_JDK/bin/javac"; then
14989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14993          BOOT_JDK_FOUND=no
14994        else
14995          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14996          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14999            BOOT_JDK_FOUND=no
15000          else
15001            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15003
15004            # Extra M4 quote needed to protect [] in grep expression.
15005            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15006            if test "x$FOUND_VERSION_78" = x; then
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15009              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15010$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15011              BOOT_JDK_FOUND=no
15012            else
15013              # We're done! :-)
15014              BOOT_JDK_FOUND=yes
15015
15016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15017
15018  # Input might be given as Windows format, start by converting to
15019  # unix format.
15020  path="$BOOT_JDK"
15021  new_path=`$CYGPATH -u "$path"`
15022
15023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15026  # "foo.exe" is OK but "foo" is an error.
15027  #
15028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15029  # It is also a way to make sure we got the proper file name for the real test later on.
15030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15031  if test "x$test_shortpath" = x; then
15032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15035  fi
15036
15037  # Call helper function which possibly converts this using DOS-style short mode.
15038  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15051      # Going to short mode and back again did indeed matter. Since short mode is
15052      # case insensitive, let's make it lowercase to improve readability.
15053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054      # Now convert it back to Unix-stile (cygpath)
15055      input_path=`$CYGPATH -u "$shortmode_path"`
15056      new_path="$input_path"
15057    fi
15058  fi
15059
15060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15061  if test "x$test_cygdrive_prefix" = x; then
15062    # As a simple fix, exclude /usr/bin since it's not a real path.
15063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15065      # a path prefixed by /cygdrive for fixpath to work.
15066      new_path="$CYGWIN_ROOT_PATH$input_path"
15067    fi
15068  fi
15069
15070
15071  if test "x$path" != "x$new_path"; then
15072    BOOT_JDK="$new_path"
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15075  fi
15076
15077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15078
15079  path="$BOOT_JDK"
15080  has_colon=`$ECHO $path | $GREP ^.:`
15081  new_path="$path"
15082  if test "x$has_colon" = x; then
15083    # Not in mixed or Windows style, start by that.
15084    new_path=`cmd //c echo $path`
15085  fi
15086
15087
15088  input_path="$new_path"
15089  # Check if we need to convert this using DOS-style short mode. If the path
15090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15091  # take no chances and rewrite it.
15092  # Note: m4 eats our [], so we need to use [ and ] instead.
15093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15094  if test "x$has_forbidden_chars" != x; then
15095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15097  fi
15098
15099
15100  windows_path="$new_path"
15101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15102    unix_path=`$CYGPATH -u "$windows_path"`
15103    new_path="$unix_path"
15104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15106    new_path="$unix_path"
15107  fi
15108
15109  if test "x$path" != "x$new_path"; then
15110    BOOT_JDK="$new_path"
15111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15113  fi
15114
15115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15117
15118  else
15119    # We're on a posix platform. Hooray! :)
15120    path="$BOOT_JDK"
15121    has_space=`$ECHO "$path" | $GREP " "`
15122    if test "x$has_space" != x; then
15123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15125      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15126    fi
15127
15128    # Use eval to expand a potential ~
15129    eval path="$path"
15130    if test ! -f "$path" && test ! -d "$path"; then
15131      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15132    fi
15133
15134    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15135  fi
15136
15137              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15138$as_echo_n "checking for Boot JDK... " >&6; }
15139              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15140$as_echo "$BOOT_JDK" >&6; }
15141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15142$as_echo_n "checking Boot JDK version... " >&6; }
15143              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15144              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15145$as_echo "$BOOT_JDK_VERSION" >&6; }
15146            fi # end check jdk version
15147          fi # end check rt.jar
15148        fi # end check javac
15149      fi # end check java
15150    fi # end check boot jdk found
15151  fi
15152
15153    done
15154  fi
15155
15156
15157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15159      # Do we have a bin/java?
15160      if test ! -x "$BOOT_JDK/bin/java"; then
15161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15163        BOOT_JDK_FOUND=no
15164      else
15165        # Do we have a bin/javac?
15166        if test ! -x "$BOOT_JDK/bin/javac"; then
15167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15171          BOOT_JDK_FOUND=no
15172        else
15173          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15174          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15175            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15177            BOOT_JDK_FOUND=no
15178          else
15179            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15180            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15181
15182            # Extra M4 quote needed to protect [] in grep expression.
15183            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15184            if test "x$FOUND_VERSION_78" = x; then
15185              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15187              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15188$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15189              BOOT_JDK_FOUND=no
15190            else
15191              # We're done! :-)
15192              BOOT_JDK_FOUND=yes
15193
15194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15195
15196  # Input might be given as Windows format, start by converting to
15197  # unix format.
15198  path="$BOOT_JDK"
15199  new_path=`$CYGPATH -u "$path"`
15200
15201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15204  # "foo.exe" is OK but "foo" is an error.
15205  #
15206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15207  # It is also a way to make sure we got the proper file name for the real test later on.
15208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15209  if test "x$test_shortpath" = x; then
15210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15212    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15213  fi
15214
15215  # Call helper function which possibly converts this using DOS-style short mode.
15216  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15229      # Going to short mode and back again did indeed matter. Since short mode is
15230      # case insensitive, let's make it lowercase to improve readability.
15231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15232      # Now convert it back to Unix-stile (cygpath)
15233      input_path=`$CYGPATH -u "$shortmode_path"`
15234      new_path="$input_path"
15235    fi
15236  fi
15237
15238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15239  if test "x$test_cygdrive_prefix" = x; then
15240    # As a simple fix, exclude /usr/bin since it's not a real path.
15241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15243      # a path prefixed by /cygdrive for fixpath to work.
15244      new_path="$CYGWIN_ROOT_PATH$input_path"
15245    fi
15246  fi
15247
15248
15249  if test "x$path" != "x$new_path"; then
15250    BOOT_JDK="$new_path"
15251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15253  fi
15254
15255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256
15257  path="$BOOT_JDK"
15258  has_colon=`$ECHO $path | $GREP ^.:`
15259  new_path="$path"
15260  if test "x$has_colon" = x; then
15261    # Not in mixed or Windows style, start by that.
15262    new_path=`cmd //c echo $path`
15263  fi
15264
15265
15266  input_path="$new_path"
15267  # Check if we need to convert this using DOS-style short mode. If the path
15268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15269  # take no chances and rewrite it.
15270  # Note: m4 eats our [], so we need to use [ and ] instead.
15271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15272  if test "x$has_forbidden_chars" != x; then
15273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15275  fi
15276
15277
15278  windows_path="$new_path"
15279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15280    unix_path=`$CYGPATH -u "$windows_path"`
15281    new_path="$unix_path"
15282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15284    new_path="$unix_path"
15285  fi
15286
15287  if test "x$path" != "x$new_path"; then
15288    BOOT_JDK="$new_path"
15289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15291  fi
15292
15293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15295
15296  else
15297    # We're on a posix platform. Hooray! :)
15298    path="$BOOT_JDK"
15299    has_space=`$ECHO "$path" | $GREP " "`
15300    if test "x$has_space" != x; then
15301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15303      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15304    fi
15305
15306    # Use eval to expand a potential ~
15307    eval path="$path"
15308    if test ! -f "$path" && test ! -d "$path"; then
15309      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15310    fi
15311
15312    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15313  fi
15314
15315              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15316$as_echo_n "checking for Boot JDK... " >&6; }
15317              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15318$as_echo "$BOOT_JDK" >&6; }
15319              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15320$as_echo_n "checking Boot JDK version... " >&6; }
15321              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15322              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15323$as_echo "$BOOT_JDK_VERSION" >&6; }
15324            fi # end check jdk version
15325          fi # end check rt.jar
15326        fi # end check javac
15327      fi # end check java
15328    fi # end check boot jdk found
15329  fi
15330
15331  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15332
15333  if test "x$BOOT_JDK_FOUND" = xno; then
15334    # Now execute the test
15335
15336  BOOT_JDK_PREFIX="/usr/lib/jvm"
15337  BOOT_JDK_SUFFIX=""
15338  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15339  if test "x$ALL_JDKS_FOUND" != x; then
15340    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15341
15342  if test "x$BOOT_JDK_FOUND" = xno; then
15343    # Now execute the test
15344
15345        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15346        if test -d "$BOOT_JDK"; then
15347          BOOT_JDK_FOUND=maybe
15348          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15349$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15350        fi
15351
15352
15353    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15354    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15355      # Do we have a bin/java?
15356      if test ! -x "$BOOT_JDK/bin/java"; then
15357        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15359        BOOT_JDK_FOUND=no
15360      else
15361        # Do we have a bin/javac?
15362        if test ! -x "$BOOT_JDK/bin/javac"; then
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15365          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15366$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15367          BOOT_JDK_FOUND=no
15368        else
15369          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15370          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15371            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15373            BOOT_JDK_FOUND=no
15374          else
15375            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15377
15378            # Extra M4 quote needed to protect [] in grep expression.
15379            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15380            if test "x$FOUND_VERSION_78" = x; then
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15383              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15384$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15385              BOOT_JDK_FOUND=no
15386            else
15387              # We're done! :-)
15388              BOOT_JDK_FOUND=yes
15389
15390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15391
15392  # Input might be given as Windows format, start by converting to
15393  # unix format.
15394  path="$BOOT_JDK"
15395  new_path=`$CYGPATH -u "$path"`
15396
15397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15400  # "foo.exe" is OK but "foo" is an error.
15401  #
15402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15403  # It is also a way to make sure we got the proper file name for the real test later on.
15404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15405  if test "x$test_shortpath" = x; then
15406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15408    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15409  fi
15410
15411  # Call helper function which possibly converts this using DOS-style short mode.
15412  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15425      # Going to short mode and back again did indeed matter. Since short mode is
15426      # case insensitive, let's make it lowercase to improve readability.
15427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15428      # Now convert it back to Unix-stile (cygpath)
15429      input_path=`$CYGPATH -u "$shortmode_path"`
15430      new_path="$input_path"
15431    fi
15432  fi
15433
15434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15435  if test "x$test_cygdrive_prefix" = x; then
15436    # As a simple fix, exclude /usr/bin since it's not a real path.
15437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15439      # a path prefixed by /cygdrive for fixpath to work.
15440      new_path="$CYGWIN_ROOT_PATH$input_path"
15441    fi
15442  fi
15443
15444
15445  if test "x$path" != "x$new_path"; then
15446    BOOT_JDK="$new_path"
15447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15449  fi
15450
15451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15452
15453  path="$BOOT_JDK"
15454  has_colon=`$ECHO $path | $GREP ^.:`
15455  new_path="$path"
15456  if test "x$has_colon" = x; then
15457    # Not in mixed or Windows style, start by that.
15458    new_path=`cmd //c echo $path`
15459  fi
15460
15461
15462  input_path="$new_path"
15463  # Check if we need to convert this using DOS-style short mode. If the path
15464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15465  # take no chances and rewrite it.
15466  # Note: m4 eats our [], so we need to use [ and ] instead.
15467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15468  if test "x$has_forbidden_chars" != x; then
15469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15471  fi
15472
15473
15474  windows_path="$new_path"
15475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15476    unix_path=`$CYGPATH -u "$windows_path"`
15477    new_path="$unix_path"
15478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15480    new_path="$unix_path"
15481  fi
15482
15483  if test "x$path" != "x$new_path"; then
15484    BOOT_JDK="$new_path"
15485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15487  fi
15488
15489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15491
15492  else
15493    # We're on a posix platform. Hooray! :)
15494    path="$BOOT_JDK"
15495    has_space=`$ECHO "$path" | $GREP " "`
15496    if test "x$has_space" != x; then
15497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15499      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15500    fi
15501
15502    # Use eval to expand a potential ~
15503    eval path="$path"
15504    if test ! -f "$path" && test ! -d "$path"; then
15505      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15506    fi
15507
15508    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15509  fi
15510
15511              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15512$as_echo_n "checking for Boot JDK... " >&6; }
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15514$as_echo "$BOOT_JDK" >&6; }
15515              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15516$as_echo_n "checking Boot JDK version... " >&6; }
15517              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15518              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15519$as_echo "$BOOT_JDK_VERSION" >&6; }
15520            fi # end check jdk version
15521          fi # end check rt.jar
15522        fi # end check javac
15523      fi # end check java
15524    fi # end check boot jdk found
15525  fi
15526
15527    done
15528  fi
15529
15530
15531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15533      # Do we have a bin/java?
15534      if test ! -x "$BOOT_JDK/bin/java"; then
15535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15537        BOOT_JDK_FOUND=no
15538      else
15539        # Do we have a bin/javac?
15540        if test ! -x "$BOOT_JDK/bin/javac"; then
15541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15545          BOOT_JDK_FOUND=no
15546        else
15547          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15548          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15551            BOOT_JDK_FOUND=no
15552          else
15553            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15555
15556            # Extra M4 quote needed to protect [] in grep expression.
15557            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15558            if test "x$FOUND_VERSION_78" = x; then
15559              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15561              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15562$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15563              BOOT_JDK_FOUND=no
15564            else
15565              # We're done! :-)
15566              BOOT_JDK_FOUND=yes
15567
15568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15569
15570  # Input might be given as Windows format, start by converting to
15571  # unix format.
15572  path="$BOOT_JDK"
15573  new_path=`$CYGPATH -u "$path"`
15574
15575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15578  # "foo.exe" is OK but "foo" is an error.
15579  #
15580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15581  # It is also a way to make sure we got the proper file name for the real test later on.
15582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15583  if test "x$test_shortpath" = x; then
15584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15586    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15587  fi
15588
15589  # Call helper function which possibly converts this using DOS-style short mode.
15590  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15603      # Going to short mode and back again did indeed matter. Since short mode is
15604      # case insensitive, let's make it lowercase to improve readability.
15605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15606      # Now convert it back to Unix-stile (cygpath)
15607      input_path=`$CYGPATH -u "$shortmode_path"`
15608      new_path="$input_path"
15609    fi
15610  fi
15611
15612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15613  if test "x$test_cygdrive_prefix" = x; then
15614    # As a simple fix, exclude /usr/bin since it's not a real path.
15615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15617      # a path prefixed by /cygdrive for fixpath to work.
15618      new_path="$CYGWIN_ROOT_PATH$input_path"
15619    fi
15620  fi
15621
15622
15623  if test "x$path" != "x$new_path"; then
15624    BOOT_JDK="$new_path"
15625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15627  fi
15628
15629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15630
15631  path="$BOOT_JDK"
15632  has_colon=`$ECHO $path | $GREP ^.:`
15633  new_path="$path"
15634  if test "x$has_colon" = x; then
15635    # Not in mixed or Windows style, start by that.
15636    new_path=`cmd //c echo $path`
15637  fi
15638
15639
15640  input_path="$new_path"
15641  # Check if we need to convert this using DOS-style short mode. If the path
15642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15643  # take no chances and rewrite it.
15644  # Note: m4 eats our [], so we need to use [ and ] instead.
15645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15646  if test "x$has_forbidden_chars" != x; then
15647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15649  fi
15650
15651
15652  windows_path="$new_path"
15653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15654    unix_path=`$CYGPATH -u "$windows_path"`
15655    new_path="$unix_path"
15656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15658    new_path="$unix_path"
15659  fi
15660
15661  if test "x$path" != "x$new_path"; then
15662    BOOT_JDK="$new_path"
15663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15665  fi
15666
15667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15669
15670  else
15671    # We're on a posix platform. Hooray! :)
15672    path="$BOOT_JDK"
15673    has_space=`$ECHO "$path" | $GREP " "`
15674    if test "x$has_space" != x; then
15675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15677      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15678    fi
15679
15680    # Use eval to expand a potential ~
15681    eval path="$path"
15682    if test ! -f "$path" && test ! -d "$path"; then
15683      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15684    fi
15685
15686    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15687  fi
15688
15689              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15690$as_echo_n "checking for Boot JDK... " >&6; }
15691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15692$as_echo "$BOOT_JDK" >&6; }
15693              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15694$as_echo_n "checking Boot JDK version... " >&6; }
15695              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15696              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15697$as_echo "$BOOT_JDK_VERSION" >&6; }
15698            fi # end check jdk version
15699          fi # end check rt.jar
15700        fi # end check javac
15701      fi # end check java
15702    fi # end check boot jdk found
15703  fi
15704
15705  fi
15706
15707
15708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15710      # Do we have a bin/java?
15711      if test ! -x "$BOOT_JDK/bin/java"; then
15712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15714        BOOT_JDK_FOUND=no
15715      else
15716        # Do we have a bin/javac?
15717        if test ! -x "$BOOT_JDK/bin/javac"; then
15718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15722          BOOT_JDK_FOUND=no
15723        else
15724          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15725          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15728            BOOT_JDK_FOUND=no
15729          else
15730            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15731            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15732
15733            # Extra M4 quote needed to protect [] in grep expression.
15734            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15735            if test "x$FOUND_VERSION_78" = x; then
15736              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15738              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15739$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15740              BOOT_JDK_FOUND=no
15741            else
15742              # We're done! :-)
15743              BOOT_JDK_FOUND=yes
15744
15745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15746
15747  # Input might be given as Windows format, start by converting to
15748  # unix format.
15749  path="$BOOT_JDK"
15750  new_path=`$CYGPATH -u "$path"`
15751
15752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15755  # "foo.exe" is OK but "foo" is an error.
15756  #
15757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15758  # It is also a way to make sure we got the proper file name for the real test later on.
15759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15760  if test "x$test_shortpath" = x; then
15761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15764  fi
15765
15766  # Call helper function which possibly converts this using DOS-style short mode.
15767  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15780      # Going to short mode and back again did indeed matter. Since short mode is
15781      # case insensitive, let's make it lowercase to improve readability.
15782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15783      # Now convert it back to Unix-stile (cygpath)
15784      input_path=`$CYGPATH -u "$shortmode_path"`
15785      new_path="$input_path"
15786    fi
15787  fi
15788
15789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15790  if test "x$test_cygdrive_prefix" = x; then
15791    # As a simple fix, exclude /usr/bin since it's not a real path.
15792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15794      # a path prefixed by /cygdrive for fixpath to work.
15795      new_path="$CYGWIN_ROOT_PATH$input_path"
15796    fi
15797  fi
15798
15799
15800  if test "x$path" != "x$new_path"; then
15801    BOOT_JDK="$new_path"
15802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15804  fi
15805
15806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807
15808  path="$BOOT_JDK"
15809  has_colon=`$ECHO $path | $GREP ^.:`
15810  new_path="$path"
15811  if test "x$has_colon" = x; then
15812    # Not in mixed or Windows style, start by that.
15813    new_path=`cmd //c echo $path`
15814  fi
15815
15816
15817  input_path="$new_path"
15818  # Check if we need to convert this using DOS-style short mode. If the path
15819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15820  # take no chances and rewrite it.
15821  # Note: m4 eats our [], so we need to use [ and ] instead.
15822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15823  if test "x$has_forbidden_chars" != x; then
15824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15826  fi
15827
15828
15829  windows_path="$new_path"
15830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15831    unix_path=`$CYGPATH -u "$windows_path"`
15832    new_path="$unix_path"
15833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15835    new_path="$unix_path"
15836  fi
15837
15838  if test "x$path" != "x$new_path"; then
15839    BOOT_JDK="$new_path"
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15842  fi
15843
15844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15846
15847  else
15848    # We're on a posix platform. Hooray! :)
15849    path="$BOOT_JDK"
15850    has_space=`$ECHO "$path" | $GREP " "`
15851    if test "x$has_space" != x; then
15852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15854      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15855    fi
15856
15857    # Use eval to expand a potential ~
15858    eval path="$path"
15859    if test ! -f "$path" && test ! -d "$path"; then
15860      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15861    fi
15862
15863    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15864  fi
15865
15866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15867$as_echo_n "checking for Boot JDK... " >&6; }
15868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15869$as_echo "$BOOT_JDK" >&6; }
15870              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15871$as_echo_n "checking Boot JDK version... " >&6; }
15872              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15874$as_echo "$BOOT_JDK_VERSION" >&6; }
15875            fi # end check jdk version
15876          fi # end check rt.jar
15877        fi # end check javac
15878      fi # end check java
15879    fi # end check boot jdk found
15880  fi
15881
15882
15883  # If we haven't found anything yet, we've truly lost. Give up.
15884  if test "x$BOOT_JDK_FOUND" = xno; then
15885
15886  # Print a helpful message on how to acquire the necessary build dependency.
15887  # openjdk is the help tag: freetype, cups, pulse, alsa etc
15888  MISSING_DEPENDENCY=openjdk
15889
15890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15891    cygwin_help $MISSING_DEPENDENCY
15892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15893    msys_help $MISSING_DEPENDENCY
15894  else
15895    PKGHANDLER_COMMAND=
15896
15897    case $PKGHANDLER in
15898      apt-get)
15899        apt_help     $MISSING_DEPENDENCY ;;
15900      yum)
15901        yum_help     $MISSING_DEPENDENCY ;;
15902      port)
15903        port_help    $MISSING_DEPENDENCY ;;
15904      pkgutil)
15905        pkgutil_help $MISSING_DEPENDENCY ;;
15906      pkgadd)
15907        pkgadd_help  $MISSING_DEPENDENCY ;;
15908    esac
15909
15910    if test "x$PKGHANDLER_COMMAND" != x; then
15911      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15912    fi
15913  fi
15914
15915    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15916$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15917    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15918$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15919    as_fn_error $? "Cannot continue" "$LINENO" 5
15920  fi
15921
15922  # Setup proper paths for what we found
15923  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15924  if test ! -f "$BOOT_RTJAR"; then
15925    # On MacOSX it is called classes.jar
15926    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15927    if test -f "$BOOT_RTJAR"; then
15928      # Remove the ..
15929      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15930    fi
15931  fi
15932  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15933  BOOT_JDK="$BOOT_JDK"
15934
15935
15936
15937
15938  # Setup tools from the Boot JDK.
15939
15940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15941$as_echo_n "checking for java in Boot JDK... " >&6; }
15942  JAVA=$BOOT_JDK/bin/java
15943  if test ! -x $JAVA; then
15944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15945$as_echo "not found" >&6; }
15946    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15947$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15948    as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15949  fi
15950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15951$as_echo "ok" >&6; }
15952
15953
15954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15955$as_echo_n "checking for javac in Boot JDK... " >&6; }
15956  JAVAC=$BOOT_JDK/bin/javac
15957  if test ! -x $JAVAC; then
15958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15959$as_echo "not found" >&6; }
15960    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15961$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15962    as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15963  fi
15964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15965$as_echo "ok" >&6; }
15966
15967
15968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15969$as_echo_n "checking for javah in Boot JDK... " >&6; }
15970  JAVAH=$BOOT_JDK/bin/javah
15971  if test ! -x $JAVAH; then
15972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15973$as_echo "not found" >&6; }
15974    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15975$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15976    as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15977  fi
15978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15979$as_echo "ok" >&6; }
15980
15981
15982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15983$as_echo_n "checking for javap in Boot JDK... " >&6; }
15984  JAVAP=$BOOT_JDK/bin/javap
15985  if test ! -x $JAVAP; then
15986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15987$as_echo "not found" >&6; }
15988    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15989$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15990    as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15991  fi
15992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15993$as_echo "ok" >&6; }
15994
15995
15996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15997$as_echo_n "checking for jar in Boot JDK... " >&6; }
15998  JAR=$BOOT_JDK/bin/jar
15999  if test ! -x $JAR; then
16000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16001$as_echo "not found" >&6; }
16002    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16003$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16004    as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16005  fi
16006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16007$as_echo "ok" >&6; }
16008
16009
16010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16011$as_echo_n "checking for rmic in Boot JDK... " >&6; }
16012  RMIC=$BOOT_JDK/bin/rmic
16013  if test ! -x $RMIC; then
16014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16015$as_echo "not found" >&6; }
16016    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16017$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16018    as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16019  fi
16020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16021$as_echo "ok" >&6; }
16022
16023
16024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16025$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16026  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16027  if test ! -x $NATIVE2ASCII; then
16028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16029$as_echo "not found" >&6; }
16030    { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16031$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16032    as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16033  fi
16034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16035$as_echo "ok" >&6; }
16036
16037
16038  # Finally, set some other options...
16039
16040  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16041  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16042
16043
16044
16045
16046  ##############################################################################
16047  #
16048  # Specify options for anything that is run with the Boot JDK.
16049  #
16050
16051# Check whether --with-boot-jdk-jvmargs was given.
16052if test "${with_boot_jdk_jvmargs+set}" = set; then :
16053  withval=$with_boot_jdk_jvmargs;
16054fi
16055
16056
16057  if test "x$with_boot_jdk_jvmargs" = x; then
16058    # Not all JVM:s accept the same arguments on the command line.
16059    # OpenJDK specific increase in thread stack for JDK build,
16060    # well more specifically, when running javac.
16061    if test "x$BUILD_NUM_BITS" = x32; then
16062      STACK_SIZE=768
16063    else
16064      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16065      # since 64-bit pointers are pushed on the stach. Apparently, we need
16066      # to increase the stack space when javacing the JDK....
16067      STACK_SIZE=1536
16068    fi
16069
16070    # Minimum amount of heap memory.
16071
16072  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16073  $ECHO "Command: $JAVA -Xms64M -version" >&5
16074  OUTPUT=`$JAVA -Xms64M -version 2>&1`
16075  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16076  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16077  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16078    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16079    JVM_ARG_OK=true
16080  else
16081    $ECHO "Arg failed:" >&5
16082    $ECHO "$OUTPUT" >&5
16083    JVM_ARG_OK=false
16084  fi
16085
16086    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
16087      # Why does macosx need more heap? Its the huge JDK batch.
16088
16089  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16090  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16091  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16092  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16093  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16094  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16095    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16096    JVM_ARG_OK=true
16097  else
16098    $ECHO "Arg failed:" >&5
16099    $ECHO "$OUTPUT" >&5
16100    JVM_ARG_OK=false
16101  fi
16102
16103    else
16104
16105  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16106  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16107  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16108  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16109  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16110  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16111    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16112    JVM_ARG_OK=true
16113  else
16114    $ECHO "Arg failed:" >&5
16115    $ECHO "$OUTPUT" >&5
16116    JVM_ARG_OK=false
16117  fi
16118
16119    fi
16120    # When is adding -client something that speeds up the JVM?
16121    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16122
16123  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16124  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16125  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16126  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16127  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16128  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16129    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16130    JVM_ARG_OK=true
16131  else
16132    $ECHO "Arg failed:" >&5
16133    $ECHO "$OUTPUT" >&5
16134    JVM_ARG_OK=false
16135  fi
16136
16137
16138  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16139  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16140  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16141  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16142  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16143  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16144    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16145    JVM_ARG_OK=true
16146  else
16147    $ECHO "Arg failed:" >&5
16148    $ECHO "$OUTPUT" >&5
16149    JVM_ARG_OK=false
16150  fi
16151
16152
16153  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16154  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16155  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16156  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16157  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16158  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16159    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16160    JVM_ARG_OK=true
16161  else
16162    $ECHO "Arg failed:" >&5
16163    $ECHO "$OUTPUT" >&5
16164    JVM_ARG_OK=false
16165  fi
16166
16167    # Disable special log output when a debug build is used as Boot JDK...
16168
16169  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16170  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16171  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16172  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16173  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16174  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16175    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16176    JVM_ARG_OK=true
16177  else
16178    $ECHO "Arg failed:" >&5
16179    $ECHO "$OUTPUT" >&5
16180    JVM_ARG_OK=false
16181  fi
16182
16183  fi
16184
16185  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16186
16187
16188
16189###############################################################################
16190#
16191# Configure the sources to use. We can add or override individual directories.
16192#
16193###############################################################################
16194
16195
16196  # Where are the sources. Any of these can be overridden
16197  # using --with-override-corba and the likes.
16198  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16199  CORBA_TOPDIR="$SRC_ROOT/corba"
16200  JAXP_TOPDIR="$SRC_ROOT/jaxp"
16201  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16202  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16203  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16204  JDK_TOPDIR="$SRC_ROOT/jdk"
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215  ###############################################################################
16216  #
16217  # Pickup additional source for a component from outside of the source root
16218  # or override source for a component.
16219  #
16220
16221# Check whether --with-add-source-root was given.
16222if test "${with_add_source_root+set}" = set; then :
16223  withval=$with_add_source_root;
16224fi
16225
16226
16227
16228# Check whether --with-override-source-root was given.
16229if test "${with_override_source_root+set}" = set; then :
16230  withval=$with_override_source_root;
16231fi
16232
16233
16234
16235# Check whether --with-adds-and-overrides was given.
16236if test "${with_adds_and_overrides+set}" = set; then :
16237  withval=$with_adds_and_overrides;
16238fi
16239
16240
16241  if test "x$with_adds_and_overrides" != x; then
16242    with_add_source_root="$with_adds_and_overrides/adds"
16243    with_override_source_root="$with_adds_and_overrides/overrides"
16244  fi
16245
16246  if test "x$with_add_source_root" != x; then
16247    if ! test -d $with_add_source_root; then
16248      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16249    fi
16250    CURDIR="$PWD"
16251    cd "$with_add_source_root"
16252    ADD_SRC_ROOT="`pwd`"
16253    cd "$CURDIR"
16254    # Verify that the addon source root does not have any root makefiles.
16255    # If it does, then it is usually an error, prevent this.
16256    if test -f $with_add_source_root/langtools/make/Makefile; then
16257      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
16258    fi
16259    if test -f $with_add_source_root/corba/make/Makefile; then
16260      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
16261    fi
16262    if test -f $with_add_source_root/jaxp/make/Makefile; then
16263      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
16264    fi
16265    if test -f $with_add_source_root/jaxws/make/Makefile; then
16266      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
16267    fi
16268    if test -f $with_add_source_root/hotspot/make/Makefile; then
16269      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
16270    fi
16271    if test -f $with_add_source_root/nashorn/make/Makefile; then
16272      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
16273    fi
16274    if test -f $with_add_source_root/jdk/make/Makefile; then
16275      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
16276    fi
16277  fi
16278
16279
16280  if test "x$with_override_source_root" != x; then
16281    if ! test -d $with_override_source_root; then
16282      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16283    fi
16284    CURDIR="$PWD"
16285    cd "$with_override_source_root"
16286    OVERRIDE_SRC_ROOT="`pwd`"
16287    cd "$CURDIR"
16288    if test -f $with_override_source_root/langtools/make/Makefile; then
16289      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
16290    fi
16291    if test -f $with_override_source_root/corba/make/Makefile; then
16292      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
16293    fi
16294    if test -f $with_override_source_root/jaxp/make/Makefile; then
16295      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
16296    fi
16297    if test -f $with_override_source_root/jaxws/make/Makefile; then
16298      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
16299    fi
16300    if test -f $with_override_source_root/hotspot/make/Makefile; then
16301      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
16302    fi
16303    if test -f $with_override_source_root/nashorn/make/Makefile; then
16304      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
16305    fi
16306    if test -f $with_override_source_root/jdk/make/Makefile; then
16307      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
16308    fi
16309  fi
16310
16311
16312  ###############################################################################
16313  #
16314  # Override a repo completely, this is used for example when you have 3 small
16315  # development sandboxes of the langtools sources and want to avoid having 3 full
16316  # OpenJDK sources checked out on disk.
16317  #
16318  # Assuming that the 3 langtools sandboxes are located here:
16319  # /home/fredrik/sandbox1/langtools
16320  # /home/fredrik/sandbox2/langtools
16321  # /home/fredrik/sandbox3/langtools
16322  #
16323  # From the source root you create build subdirs manually:
16324  #     mkdir -p build1 build2 build3
16325  # in each build directory run:
16326  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16327  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16328  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16329  #
16330
16331
16332# Check whether --with-override-langtools was given.
16333if test "${with_override_langtools+set}" = set; then :
16334  withval=$with_override_langtools;
16335fi
16336
16337
16338
16339# Check whether --with-override-corba was given.
16340if test "${with_override_corba+set}" = set; then :
16341  withval=$with_override_corba;
16342fi
16343
16344
16345
16346# Check whether --with-override-jaxp was given.
16347if test "${with_override_jaxp+set}" = set; then :
16348  withval=$with_override_jaxp;
16349fi
16350
16351
16352
16353# Check whether --with-override-jaxws was given.
16354if test "${with_override_jaxws+set}" = set; then :
16355  withval=$with_override_jaxws;
16356fi
16357
16358
16359
16360# Check whether --with-override-hotspot was given.
16361if test "${with_override_hotspot+set}" = set; then :
16362  withval=$with_override_hotspot;
16363fi
16364
16365
16366
16367# Check whether --with-override-nashorn was given.
16368if test "${with_override_nashorn+set}" = set; then :
16369  withval=$with_override_nashorn;
16370fi
16371
16372
16373
16374# Check whether --with-override-jdk was given.
16375if test "${with_override_jdk+set}" = set; then :
16376  withval=$with_override_jdk;
16377fi
16378
16379
16380  if test "x$with_override_langtools" != x; then
16381    CURDIR="$PWD"
16382    cd "$with_override_langtools"
16383    LANGTOOLS_TOPDIR="`pwd`"
16384    cd "$CURDIR"
16385    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16386      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16387    fi
16388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16389$as_echo_n "checking if langtools should be overridden... " >&6; }
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16391$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16392  fi
16393  if test "x$with_override_corba" != x; then
16394    CURDIR="$PWD"
16395    cd "$with_override_corba"
16396    CORBA_TOPDIR="`pwd`"
16397    cd "$CURDIR"
16398    if ! test -f $CORBA_TOPDIR/make/Makefile; then
16399      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16400    fi
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16402$as_echo_n "checking if corba should be overridden... " >&6; }
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16404$as_echo "yes with $CORBA_TOPDIR" >&6; }
16405  fi
16406  if test "x$with_override_jaxp" != x; then
16407    CURDIR="$PWD"
16408    cd "$with_override_jaxp"
16409    JAXP_TOPDIR="`pwd`"
16410    cd "$CURDIR"
16411    if ! test -f $JAXP_TOPDIR/make/Makefile; then
16412      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16413    fi
16414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16415$as_echo_n "checking if jaxp should be overridden... " >&6; }
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16417$as_echo "yes with $JAXP_TOPDIR" >&6; }
16418  fi
16419  if test "x$with_override_jaxws" != x; then
16420    CURDIR="$PWD"
16421    cd "$with_override_jaxws"
16422    JAXWS_TOPDIR="`pwd`"
16423    cd "$CURDIR"
16424    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16425      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16426    fi
16427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16428$as_echo_n "checking if jaxws should be overridden... " >&6; }
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16430$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16431  fi
16432  if test "x$with_override_hotspot" != x; then
16433    CURDIR="$PWD"
16434    cd "$with_override_hotspot"
16435    HOTSPOT_TOPDIR="`pwd`"
16436    cd "$CURDIR"
16437    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16438      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16439    fi
16440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16441$as_echo_n "checking if hotspot should be overridden... " >&6; }
16442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16443$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16444  fi
16445  if test "x$with_override_nashorn" != x; then
16446    CURDIR="$PWD"
16447    cd "$with_override_nashorn"
16448    NASHORN_TOPDIR="`pwd`"
16449    cd "$CURDIR"
16450    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16451      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16452    fi
16453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16454$as_echo_n "checking if nashorn should be overridden... " >&6; }
16455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16456$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16457  fi
16458  if test "x$with_override_jdk" != x; then
16459    CURDIR="$PWD"
16460    cd "$with_override_jdk"
16461    JDK_TOPDIR="`pwd`"
16462    cd "$CURDIR"
16463    if ! test -f $JDK_TOPDIR/make/Makefile; then
16464      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16465    fi
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16467$as_echo_n "checking if JDK should be overridden... " >&6; }
16468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16469$as_echo "yes with $JDK_TOPDIR" >&6; }
16470  fi
16471
16472
16473  BUILD_OUTPUT="$OUTPUT_ROOT"
16474
16475
16476  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16477  BUILD_HOTSPOT=true
16478
16479
16480
16481# Check whether --with-import-hotspot was given.
16482if test "${with_import_hotspot+set}" = set; then :
16483  withval=$with_import_hotspot;
16484fi
16485
16486  if test "x$with_import_hotspot" != x; then
16487    CURDIR="$PWD"
16488    cd "$with_import_hotspot"
16489    HOTSPOT_DIST="`pwd`"
16490    cd "$CURDIR"
16491    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16492      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16493    fi
16494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16495$as_echo_n "checking if hotspot should be imported... " >&6; }
16496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16497$as_echo "yes from $HOTSPOT_DIST" >&6; }
16498    BUILD_HOTSPOT=false
16499  fi
16500
16501  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16502
16503
16504###############################################################################
16505#
16506# Setup the toolchain (compilers etc), i.e. the tools that need to be
16507# cross-compilation aware.
16508#
16509###############################################################################
16510
16511
16512  ###############################################################################
16513  #
16514  # Configure the development tool paths and potential sysroot.
16515  #
16516  ac_ext=cpp
16517ac_cpp='$CXXCPP $CPPFLAGS'
16518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16521
16522
16523  # The option used to specify the target .o,.a or .so file.
16524  # When compiling, how to specify the to be created object file.
16525  CC_OUT_OPTION='-o$(SPACE)'
16526  # When linking, how to specify the to be created executable.
16527  EXE_OUT_OPTION='-o$(SPACE)'
16528  # When linking, how to specify the to be created dynamically linkable library.
16529  LD_OUT_OPTION='-o$(SPACE)'
16530  # When archiving, how to specify the to be create static archive for object files.
16531  AR_OUT_OPTION='rcs$(SPACE)'
16532
16533
16534
16535
16536
16537# Locate the actual tools
16538
16539
16540# Check whether --with-jtreg was given.
16541if test "${with_jtreg+set}" = set; then :
16542  withval=$with_jtreg;
16543else
16544  with_jtreg=no
16545fi
16546
16547
16548  if test "x$with_jtreg" = xno; then
16549    # jtreg disabled
16550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16551$as_echo_n "checking for jtreg... " >&6; }
16552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16553$as_echo "no" >&6; }
16554  else
16555    if test "x$with_jtreg" != xyes; then
16556      # with path specified.
16557      JT_HOME="$with_jtreg"
16558    fi
16559
16560    if test "x$JT_HOME" != x; then
16561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16562$as_echo_n "checking for jtreg... " >&6; }
16563
16564      # use JT_HOME enviroment var.
16565
16566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567
16568  # Input might be given as Windows format, start by converting to
16569  # unix format.
16570  path="$JT_HOME"
16571  new_path=`$CYGPATH -u "$path"`
16572
16573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16576  # "foo.exe" is OK but "foo" is an error.
16577  #
16578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16579  # It is also a way to make sure we got the proper file name for the real test later on.
16580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16581  if test "x$test_shortpath" = x; then
16582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16583$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16584    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16585  fi
16586
16587  # Call helper function which possibly converts this using DOS-style short mode.
16588  # If so, the updated path is stored in $new_path.
16589
16590  input_path="$new_path"
16591  # Check if we need to convert this using DOS-style short mode. If the path
16592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16593  # take no chances and rewrite it.
16594  # Note: m4 eats our [], so we need to use [ and ] instead.
16595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16596  if test "x$has_forbidden_chars" != x; then
16597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16601      # Going to short mode and back again did indeed matter. Since short mode is
16602      # case insensitive, let's make it lowercase to improve readability.
16603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16604      # Now convert it back to Unix-stile (cygpath)
16605      input_path=`$CYGPATH -u "$shortmode_path"`
16606      new_path="$input_path"
16607    fi
16608  fi
16609
16610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16611  if test "x$test_cygdrive_prefix" = x; then
16612    # As a simple fix, exclude /usr/bin since it's not a real path.
16613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16615      # a path prefixed by /cygdrive for fixpath to work.
16616      new_path="$CYGWIN_ROOT_PATH$input_path"
16617    fi
16618  fi
16619
16620
16621  if test "x$path" != "x$new_path"; then
16622    JT_HOME="$new_path"
16623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16624$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16625  fi
16626
16627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16628
16629  path="$JT_HOME"
16630  has_colon=`$ECHO $path | $GREP ^.:`
16631  new_path="$path"
16632  if test "x$has_colon" = x; then
16633    # Not in mixed or Windows style, start by that.
16634    new_path=`cmd //c echo $path`
16635  fi
16636
16637
16638  input_path="$new_path"
16639  # Check if we need to convert this using DOS-style short mode. If the path
16640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16641  # take no chances and rewrite it.
16642  # Note: m4 eats our [], so we need to use [ and ] instead.
16643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16644  if test "x$has_forbidden_chars" != x; then
16645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16647  fi
16648
16649
16650  windows_path="$new_path"
16651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16652    unix_path=`$CYGPATH -u "$windows_path"`
16653    new_path="$unix_path"
16654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16656    new_path="$unix_path"
16657  fi
16658
16659  if test "x$path" != "x$new_path"; then
16660    JT_HOME="$new_path"
16661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16662$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16663  fi
16664
16665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16667
16668  else
16669    # We're on a posix platform. Hooray! :)
16670    path="$JT_HOME"
16671    has_space=`$ECHO "$path" | $GREP " "`
16672    if test "x$has_space" != x; then
16673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16674$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16675      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16676    fi
16677
16678    # Use eval to expand a potential ~
16679    eval path="$path"
16680    if test ! -f "$path" && test ! -d "$path"; then
16681      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16682    fi
16683
16684    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16685  fi
16686
16687
16688      # jtreg win32 script works for everybody
16689      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16690
16691      if test ! -f "$JTREGEXE"; then
16692        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16693      fi
16694
16695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16696$as_echo "$JTREGEXE" >&6; }
16697    else
16698      # try to find jtreg on path
16699
16700  for ac_prog in jtreg
16701do
16702  # Extract the first word of "$ac_prog", so it can be a program name with args.
16703set dummy $ac_prog; ac_word=$2
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16705$as_echo_n "checking for $ac_word... " >&6; }
16706if ${ac_cv_path_JTREGEXE+:} false; then :
16707  $as_echo_n "(cached) " >&6
16708else
16709  case $JTREGEXE in
16710  [\\/]* | ?:[\\/]*)
16711  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16712  ;;
16713  *)
16714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16715for as_dir in $PATH
16716do
16717  IFS=$as_save_IFS
16718  test -z "$as_dir" && as_dir=.
16719    for ac_exec_ext in '' $ac_executable_extensions; do
16720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16721    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16723    break 2
16724  fi
16725done
16726  done
16727IFS=$as_save_IFS
16728
16729  ;;
16730esac
16731fi
16732JTREGEXE=$ac_cv_path_JTREGEXE
16733if test -n "$JTREGEXE"; then
16734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16735$as_echo "$JTREGEXE" >&6; }
16736else
16737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16738$as_echo "no" >&6; }
16739fi
16740
16741
16742  test -n "$JTREGEXE" && break
16743done
16744
16745
16746  if test "x$JTREGEXE" = x; then
16747    if test "xjtreg" = x; then
16748      PROG_NAME=jtregexe
16749    else
16750      PROG_NAME=jtreg
16751    fi
16752    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16753$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16754    as_fn_error $? "Cannot continue" "$LINENO" 5
16755  fi
16756
16757
16758      JT_HOME="`$DIRNAME $JTREGEXE`"
16759    fi
16760  fi
16761
16762
16763
16764
16765
16766  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16767
16768  # Store path to cygwin link.exe to help excluding it when searching for
16769  # VS linker. This must be done before changing the PATH when looking for VS.
16770  # Extract the first word of "link", so it can be a program name with args.
16771set dummy link; ac_word=$2
16772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16773$as_echo_n "checking for $ac_word... " >&6; }
16774if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16775  $as_echo_n "(cached) " >&6
16776else
16777  case $CYGWIN_LINK in
16778  [\\/]* | ?:[\\/]*)
16779  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16780  ;;
16781  *)
16782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16783for as_dir in $PATH
16784do
16785  IFS=$as_save_IFS
16786  test -z "$as_dir" && as_dir=.
16787    for ac_exec_ext in '' $ac_executable_extensions; do
16788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16789    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16791    break 2
16792  fi
16793done
16794  done
16795IFS=$as_save_IFS
16796
16797  ;;
16798esac
16799fi
16800CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16801if test -n "$CYGWIN_LINK"; then
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16803$as_echo "$CYGWIN_LINK" >&6; }
16804else
16805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16806$as_echo "no" >&6; }
16807fi
16808
16809
16810  if test "x$CYGWIN_LINK" != x; then
16811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16812$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16813    "$CYGWIN_LINK" --version > /dev/null
16814    if test $? -eq 0 ; then
16815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16816$as_echo "yes" >&6; }
16817    else
16818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16819$as_echo "no" >&6; }
16820      # This might be the VS linker. Don't exclude it later on.
16821      CYGWIN_LINK=""
16822    fi
16823  fi
16824
16825  # First-hand choice is to locate and run the vsvars bat file.
16826
16827  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16828    VCVARSFILE="vc/bin/vcvars32.bat"
16829  else
16830    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16831  fi
16832
16833  VS_ENV_CMD=""
16834  VS_ENV_ARGS=""
16835  if test "x$with_toolsdir" != x; then
16836
16837  if test "x$VS_ENV_CMD" = x; then
16838    VS100BASE="$with_toolsdir/../.."
16839    METHOD="--with-tools-dir"
16840
16841  windows_path="$VS100BASE"
16842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16843    unix_path=`$CYGPATH -u "$windows_path"`
16844    VS100BASE="$unix_path"
16845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16847    VS100BASE="$unix_path"
16848  fi
16849
16850    if test -d "$VS100BASE"; then
16851      if test -f "$VS100BASE/$VCVARSFILE"; then
16852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16853$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16854        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16855      else
16856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16857$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16858        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16859$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16860      fi
16861    fi
16862  fi
16863
16864  fi
16865
16866  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16867    # Having specified an argument which is incorrect will produce an instant failure;
16868    # we should not go on looking
16869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16870$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16871    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16872$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16873    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16874  fi
16875
16876  if test "x$VS100COMNTOOLS" != x; then
16877
16878  if test "x$VS_ENV_CMD" = x; then
16879    VS100BASE="$VS100COMNTOOLS/../.."
16880    METHOD="VS100COMNTOOLS variable"
16881
16882  windows_path="$VS100BASE"
16883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16884    unix_path=`$CYGPATH -u "$windows_path"`
16885    VS100BASE="$unix_path"
16886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16888    VS100BASE="$unix_path"
16889  fi
16890
16891    if test -d "$VS100BASE"; then
16892      if test -f "$VS100BASE/$VCVARSFILE"; then
16893        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16894$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16895        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16896      else
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16898$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16900$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16901      fi
16902    fi
16903  fi
16904
16905  fi
16906  if test "x$PROGRAMFILES" != x; then
16907
16908  if test "x$VS_ENV_CMD" = x; then
16909    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16910    METHOD="well-known name"
16911
16912  windows_path="$VS100BASE"
16913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16914    unix_path=`$CYGPATH -u "$windows_path"`
16915    VS100BASE="$unix_path"
16916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16918    VS100BASE="$unix_path"
16919  fi
16920
16921    if test -d "$VS100BASE"; then
16922      if test -f "$VS100BASE/$VCVARSFILE"; then
16923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16924$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16925        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16926      else
16927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16928$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16929        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16930$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16931      fi
16932    fi
16933  fi
16934
16935  fi
16936
16937  if test "x$VS_ENV_CMD" = x; then
16938    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16939    METHOD="well-known name"
16940
16941  windows_path="$VS100BASE"
16942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16943    unix_path=`$CYGPATH -u "$windows_path"`
16944    VS100BASE="$unix_path"
16945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16947    VS100BASE="$unix_path"
16948  fi
16949
16950    if test -d "$VS100BASE"; then
16951      if test -f "$VS100BASE/$VCVARSFILE"; then
16952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16953$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16954        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16955      else
16956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16957$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16958        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16959$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16960      fi
16961    fi
16962  fi
16963
16964
16965  if test "x$VS_ENV_CMD" = x; then
16966    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16967    METHOD="well-known name"
16968
16969  windows_path="$VS100BASE"
16970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16971    unix_path=`$CYGPATH -u "$windows_path"`
16972    VS100BASE="$unix_path"
16973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16975    VS100BASE="$unix_path"
16976  fi
16977
16978    if test -d "$VS100BASE"; then
16979      if test -f "$VS100BASE/$VCVARSFILE"; then
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16981$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16982        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16983      else
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16985$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16987$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16988      fi
16989    fi
16990  fi
16991
16992
16993  if test "x$ProgramW6432" != x; then
16994
16995  if test "x$VS_ENV_CMD" = x; then
16996    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16997    METHOD="well-known name"
16998
16999  windows_path="$WIN_SDK_BASE"
17000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17001    unix_path=`$CYGPATH -u "$windows_path"`
17002    WIN_SDK_BASE="$unix_path"
17003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17005    WIN_SDK_BASE="$unix_path"
17006  fi
17007
17008    if test -d "$WIN_SDK_BASE"; then
17009      # There have been cases of partial or broken SDK installations. A missing
17010      # lib dir is not going to work.
17011      if test ! -d "$WIN_SDK_BASE/../lib"; then
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17015$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17016      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17018$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17019        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17020        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17021          VS_ENV_ARGS="/x86"
17022        else
17023          VS_ENV_ARGS="/x64"
17024        fi
17025      else
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17027$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17028        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17029$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17030      fi
17031    fi
17032  fi
17033
17034  fi
17035  if test "x$PROGRAMW6432" != x; then
17036
17037  if test "x$VS_ENV_CMD" = x; then
17038    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17039    METHOD="well-known name"
17040
17041  windows_path="$WIN_SDK_BASE"
17042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17043    unix_path=`$CYGPATH -u "$windows_path"`
17044    WIN_SDK_BASE="$unix_path"
17045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17047    WIN_SDK_BASE="$unix_path"
17048  fi
17049
17050    if test -d "$WIN_SDK_BASE"; then
17051      # There have been cases of partial or broken SDK installations. A missing
17052      # lib dir is not going to work.
17053      if test ! -d "$WIN_SDK_BASE/../lib"; then
17054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17055$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17057$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17058      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17061        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17062        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17063          VS_ENV_ARGS="/x86"
17064        else
17065          VS_ENV_ARGS="/x64"
17066        fi
17067      else
17068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17069$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17071$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17072      fi
17073    fi
17074  fi
17075
17076  fi
17077  if test "x$PROGRAMFILES" != x; then
17078
17079  if test "x$VS_ENV_CMD" = x; then
17080    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17081    METHOD="well-known name"
17082
17083  windows_path="$WIN_SDK_BASE"
17084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17085    unix_path=`$CYGPATH -u "$windows_path"`
17086    WIN_SDK_BASE="$unix_path"
17087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17089    WIN_SDK_BASE="$unix_path"
17090  fi
17091
17092    if test -d "$WIN_SDK_BASE"; then
17093      # There have been cases of partial or broken SDK installations. A missing
17094      # lib dir is not going to work.
17095      if test ! -d "$WIN_SDK_BASE/../lib"; then
17096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17098        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17099$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17100      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17104        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17105          VS_ENV_ARGS="/x86"
17106        else
17107          VS_ENV_ARGS="/x64"
17108        fi
17109      else
17110        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17111$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17112        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17113$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17114      fi
17115    fi
17116  fi
17117
17118  fi
17119
17120  if test "x$VS_ENV_CMD" = x; then
17121    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17122    METHOD="well-known name"
17123
17124  windows_path="$WIN_SDK_BASE"
17125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17126    unix_path=`$CYGPATH -u "$windows_path"`
17127    WIN_SDK_BASE="$unix_path"
17128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17130    WIN_SDK_BASE="$unix_path"
17131  fi
17132
17133    if test -d "$WIN_SDK_BASE"; then
17134      # There have been cases of partial or broken SDK installations. A missing
17135      # lib dir is not going to work.
17136      if test ! -d "$WIN_SDK_BASE/../lib"; then
17137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17140$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17141      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17144        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17145        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17146          VS_ENV_ARGS="/x86"
17147        else
17148          VS_ENV_ARGS="/x64"
17149        fi
17150      else
17151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17152$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17153        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17154$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17155      fi
17156    fi
17157  fi
17158
17159
17160  if test "x$VS_ENV_CMD" = x; then
17161    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17162    METHOD="well-known name"
17163
17164  windows_path="$WIN_SDK_BASE"
17165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17166    unix_path=`$CYGPATH -u "$windows_path"`
17167    WIN_SDK_BASE="$unix_path"
17168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17170    WIN_SDK_BASE="$unix_path"
17171  fi
17172
17173    if test -d "$WIN_SDK_BASE"; then
17174      # There have been cases of partial or broken SDK installations. A missing
17175      # lib dir is not going to work.
17176      if test ! -d "$WIN_SDK_BASE/../lib"; then
17177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17180$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17181      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17183$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17184        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17185        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17186          VS_ENV_ARGS="/x86"
17187        else
17188          VS_ENV_ARGS="/x64"
17189        fi
17190      else
17191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17192$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17193        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17194$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17195      fi
17196    fi
17197  fi
17198
17199
17200  if test "x$VS_ENV_CMD" != x; then
17201    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17202
17203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17204
17205  # First separate the path from the arguments. This will split at the first
17206  # space.
17207  complete="$VS_ENV_CMD"
17208  path="${complete%% *}"
17209  tmp="$complete EOL"
17210  arguments="${tmp#* }"
17211
17212  # Input might be given as Windows format, start by converting to
17213  # unix format.
17214  new_path=`$CYGPATH -u "$path"`
17215
17216  # Now try to locate executable using which
17217  new_path=`$WHICH "$new_path" 2> /dev/null`
17218  # bat and cmd files are not always considered executable in cygwin causing which
17219  # to not find them
17220  if test "x$new_path" = x \
17221      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17222      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17223    new_path=`$CYGPATH -u "$path"`
17224  fi
17225  if test "x$new_path" = x; then
17226    # Oops. Which didn't find the executable.
17227    # The splitting of arguments from the executable at a space might have been incorrect,
17228    # since paths with space are more likely in Windows. Give it another try with the whole
17229    # argument.
17230    path="$complete"
17231    arguments="EOL"
17232    new_path=`$CYGPATH -u "$path"`
17233    new_path=`$WHICH "$new_path" 2> /dev/null`
17234    # bat and cmd files are not always considered executable in cygwin causing which
17235    # to not find them
17236    if test "x$new_path" = x \
17237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17239      new_path=`$CYGPATH -u "$path"`
17240    fi
17241    if test "x$new_path" = x; then
17242      # It's still not found. Now this is an unrecoverable error.
17243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17244$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17245      has_space=`$ECHO "$complete" | $GREP " "`
17246      if test "x$has_space" != x; then
17247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17249      fi
17250      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17251    fi
17252  fi
17253
17254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17257  # "foo.exe" is OK but "foo" is an error.
17258  #
17259  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17260  # It is also a way to make sure we got the proper file name for the real test later on.
17261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17262  if test "x$test_shortpath" = x; then
17263    # Short path failed, file does not exist as specified.
17264    # Try adding .exe or .cmd
17265    if test -f "${new_path}.exe"; then
17266      input_to_shortpath="${new_path}.exe"
17267    elif test -f "${new_path}.cmd"; then
17268      input_to_shortpath="${new_path}.cmd"
17269    else
17270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17271$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17274      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17275    fi
17276  else
17277    input_to_shortpath="$new_path"
17278  fi
17279
17280  # Call helper function which possibly converts this using DOS-style short mode.
17281  # If so, the updated path is stored in $new_path.
17282  new_path="$input_to_shortpath"
17283
17284  input_path="$input_to_shortpath"
17285  # Check if we need to convert this using DOS-style short mode. If the path
17286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17287  # take no chances and rewrite it.
17288  # Note: m4 eats our [], so we need to use [ and ] instead.
17289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17290  if test "x$has_forbidden_chars" != x; then
17291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17295      # Going to short mode and back again did indeed matter. Since short mode is
17296      # case insensitive, let's make it lowercase to improve readability.
17297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17298      # Now convert it back to Unix-stile (cygpath)
17299      input_path=`$CYGPATH -u "$shortmode_path"`
17300      new_path="$input_path"
17301    fi
17302  fi
17303
17304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17305  if test "x$test_cygdrive_prefix" = x; then
17306    # As a simple fix, exclude /usr/bin since it's not a real path.
17307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17309      # a path prefixed by /cygdrive for fixpath to work.
17310      new_path="$CYGWIN_ROOT_PATH$input_path"
17311    fi
17312  fi
17313
17314  # remove trailing .exe if any
17315  new_path="${new_path/%.exe/}"
17316
17317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17318
17319  # First separate the path from the arguments. This will split at the first
17320  # space.
17321  complete="$VS_ENV_CMD"
17322  path="${complete%% *}"
17323  tmp="$complete EOL"
17324  arguments="${tmp#* }"
17325
17326  # Input might be given as Windows format, start by converting to
17327  # unix format.
17328  new_path="$path"
17329
17330  windows_path="$new_path"
17331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17332    unix_path=`$CYGPATH -u "$windows_path"`
17333    new_path="$unix_path"
17334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17336    new_path="$unix_path"
17337  fi
17338
17339
17340  # Now try to locate executable using which
17341  new_path=`$WHICH "$new_path" 2> /dev/null`
17342
17343  if test "x$new_path" = x; then
17344    # Oops. Which didn't find the executable.
17345    # The splitting of arguments from the executable at a space might have been incorrect,
17346    # since paths with space are more likely in Windows. Give it another try with the whole
17347    # argument.
17348    path="$complete"
17349    arguments="EOL"
17350    new_path="$path"
17351
17352  windows_path="$new_path"
17353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17354    unix_path=`$CYGPATH -u "$windows_path"`
17355    new_path="$unix_path"
17356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17358    new_path="$unix_path"
17359  fi
17360
17361
17362    new_path=`$WHICH "$new_path" 2> /dev/null`
17363
17364    if test "x$new_path" = x; then
17365      # It's still not found. Now this is an unrecoverable error.
17366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17367$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17368      has_space=`$ECHO "$complete" | $GREP " "`
17369      if test "x$has_space" != x; then
17370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17372      fi
17373      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17374    fi
17375  fi
17376
17377  # Now new_path has a complete unix path to the binary
17378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17379    # Keep paths in /bin as-is, but remove trailing .exe if any
17380    new_path="${new_path/%.exe/}"
17381    # Do not save /bin paths to all_fixpath_prefixes!
17382  else
17383    # Not in mixed or Windows style, start by that.
17384    new_path=`cmd //c echo $new_path`
17385
17386  input_path="$new_path"
17387  # Check if we need to convert this using DOS-style short mode. If the path
17388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17389  # take no chances and rewrite it.
17390  # Note: m4 eats our [], so we need to use [ and ] instead.
17391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17392  if test "x$has_forbidden_chars" != x; then
17393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17395  fi
17396
17397    # Output is in $new_path
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408    # remove trailing .exe if any
17409    new_path="${new_path/%.exe/}"
17410
17411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17413  fi
17414
17415  else
17416    # We're on a posix platform. Hooray! :)
17417    # First separate the path from the arguments. This will split at the first
17418    # space.
17419    complete="$VS_ENV_CMD"
17420    path="${complete%% *}"
17421    tmp="$complete EOL"
17422    arguments="${tmp#* }"
17423
17424    # Cannot rely on the command "which" here since it doesn't always work.
17425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17426    if test -z "$is_absolute_path"; then
17427      # Path to executable is not absolute. Find it.
17428      IFS_save="$IFS"
17429      IFS=:
17430      for p in $PATH; do
17431        if test -f "$p/$path" && test -x "$p/$path"; then
17432          new_path="$p/$path"
17433          break
17434        fi
17435      done
17436      IFS="$IFS_save"
17437    else
17438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17439$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17440      new_path="$path"
17441    fi
17442
17443    if test "x$new_path" = x; then
17444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17445$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17446      has_space=`$ECHO "$complete" | $GREP " "`
17447      if test "x$has_space" != x; then
17448        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17450      fi
17451      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17452    fi
17453  fi
17454
17455  # Now join together the path and the arguments once again
17456  if test "x$arguments" != xEOL; then
17457    new_complete="$new_path ${arguments% *}"
17458  else
17459    new_complete="$new_path"
17460  fi
17461
17462  if test "x$complete" != "x$new_complete"; then
17463    VS_ENV_CMD="$new_complete"
17464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17465$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17466  fi
17467
17468
17469    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17470    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17471$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17472    cd $OUTPUT_ROOT
17473    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17474    # to autoconf standards.
17475
17476    #----
17477
17478    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17479    # but calculate the difference in Cygwin environment before/after running it and then
17480    # apply the diff.
17481
17482    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17483      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17484      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17485      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17486    else
17487      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17488      _dosbash=`cmd //c echo \`which bash\``
17489    fi
17490
17491    # generate the set of exported vars before/after the vs10 setup
17492    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17493    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17494    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17495    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17496
17497    # Now execute the newly created bat file.
17498    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17499    cmd /c localdevenvtmp.bat | cat
17500
17501    # apply the diff (less some non-vs10 vars named by "!")
17502    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17503    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17504    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17505
17506    # cleanup
17507    $RM localdevenvtmp*
17508    #----
17509    cd $CURDIR
17510    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17511      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17512$as_echo "no" >&6; }
17513      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17514$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17516$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17517      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17518$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17519      as_fn_error $? "Cannot continue" "$LINENO" 5
17520    fi
17521
17522    # Now set all paths and other env variables. This will allow the rest of
17523    # the configure script to find and run the compiler in the proper way.
17524    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17525$as_echo "$as_me: Setting extracted environment variables" >&6;}
17526    . $OUTPUT_ROOT/localdevenv.sh
17527  else
17528    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17529    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17530$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17531  fi
17532
17533  # At this point, we should have corrent variables in the environment, or we can't continue.
17534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17535$as_echo_n "checking for Visual Studio variables... " >&6; }
17536
17537  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17538    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17539      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17540$as_echo "present but broken" >&6; }
17541      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17542    else
17543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17544$as_echo "ok" >&6; }
17545      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17546      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17547      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17548      # Remove any paths containing # (typically F#) as that messes up make
17549      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17550      VS_PATH="$PATH"
17551
17552
17553
17554    fi
17555  else
17556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17557$as_echo "not found" >&6; }
17558
17559    if test "x$VS_ENV_CMD" = x; then
17560      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17561$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17562      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17563$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17564    else
17565      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17566$as_echo "$as_me: Running the extraction script failed." >&6;}
17567    fi
17568    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17569$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17570    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17571$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17572    as_fn_error $? "Cannot continue" "$LINENO" 5
17573  fi
17574
17575
17576
17577# Check whether --with-msvcr-dll was given.
17578if test "${with_msvcr_dll+set}" = set; then :
17579  withval=$with_msvcr_dll;
17580fi
17581
17582
17583  if test "x$with_msvcr_dll" != x; then
17584    # If given explicitely by user, do not probe. If not present, fail directly.
17585
17586  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17587  METHOD="--with-msvcr-dll"
17588  if test -e "$POSSIBLE_MSVCR_DLL"; then
17589    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17590$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17591
17592    # Need to check if the found msvcr is correct architecture
17593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17594$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17595    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17596    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17597      CORRECT_MSVCR_ARCH=386
17598    else
17599      CORRECT_MSVCR_ARCH=x86-64
17600    fi
17601    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17603$as_echo "ok" >&6; }
17604      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17606$as_echo_n "checking for msvcr100.dll... " >&6; }
17607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17608$as_echo "$MSVCR_DLL" >&6; }
17609    else
17610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17611$as_echo "incorrect, ignoring" >&6; }
17612      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17613$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17614    fi
17615  fi
17616
17617    if test "x$MSVCR_DLL" = x; then
17618      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17619    fi
17620  fi
17621
17622  if test "x$MSVCR_DLL" = x; then
17623    # Probe: Using well-known location from Visual Studio 10.0
17624    if test "x$VCINSTALLDIR" != x; then
17625      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17626
17627  windows_path="$CYGWIN_VC_INSTALL_DIR"
17628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17629    unix_path=`$CYGPATH -u "$windows_path"`
17630    CYGWIN_VC_INSTALL_DIR="$unix_path"
17631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17633    CYGWIN_VC_INSTALL_DIR="$unix_path"
17634  fi
17635
17636      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17637        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17638      else
17639        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17640      fi
17641
17642  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17643  METHOD="well-known location in VCINSTALLDIR"
17644  if test -e "$POSSIBLE_MSVCR_DLL"; then
17645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17646$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17647
17648    # Need to check if the found msvcr is correct architecture
17649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17650$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17651    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17652    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17653      CORRECT_MSVCR_ARCH=386
17654    else
17655      CORRECT_MSVCR_ARCH=x86-64
17656    fi
17657    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17659$as_echo "ok" >&6; }
17660      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17662$as_echo_n "checking for msvcr100.dll... " >&6; }
17663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17664$as_echo "$MSVCR_DLL" >&6; }
17665    else
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17667$as_echo "incorrect, ignoring" >&6; }
17668      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17669$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17670    fi
17671  fi
17672
17673    fi
17674  fi
17675
17676  if test "x$MSVCR_DLL" = x; then
17677    # Probe: Check in the Boot JDK directory.
17678    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17679
17680  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17681  METHOD="well-known location in Boot JDK"
17682  if test -e "$POSSIBLE_MSVCR_DLL"; then
17683    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17684$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17685
17686    # Need to check if the found msvcr is correct architecture
17687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17688$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17689    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17690    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17691      CORRECT_MSVCR_ARCH=386
17692    else
17693      CORRECT_MSVCR_ARCH=x86-64
17694    fi
17695    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17697$as_echo "ok" >&6; }
17698      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17699      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17700$as_echo_n "checking for msvcr100.dll... " >&6; }
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17702$as_echo "$MSVCR_DLL" >&6; }
17703    else
17704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17705$as_echo "incorrect, ignoring" >&6; }
17706      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17707$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17708    fi
17709  fi
17710
17711  fi
17712
17713  if test "x$MSVCR_DLL" = x; then
17714    # Probe: Look in the Windows system32 directory
17715    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17716
17717  windows_path="$CYGWIN_SYSTEMROOT"
17718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17719    unix_path=`$CYGPATH -u "$windows_path"`
17720    CYGWIN_SYSTEMROOT="$unix_path"
17721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17723    CYGWIN_SYSTEMROOT="$unix_path"
17724  fi
17725
17726    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17727
17728  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17729  METHOD="well-known location in SYSTEMROOT"
17730  if test -e "$POSSIBLE_MSVCR_DLL"; then
17731    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17732$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17733
17734    # Need to check if the found msvcr is correct architecture
17735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17736$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17737    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17738    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17739      CORRECT_MSVCR_ARCH=386
17740    else
17741      CORRECT_MSVCR_ARCH=x86-64
17742    fi
17743    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17745$as_echo "ok" >&6; }
17746      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17748$as_echo_n "checking for msvcr100.dll... " >&6; }
17749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17750$as_echo "$MSVCR_DLL" >&6; }
17751    else
17752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17753$as_echo "incorrect, ignoring" >&6; }
17754      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17755$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17756    fi
17757  fi
17758
17759  fi
17760
17761  if test "x$MSVCR_DLL" = x; then
17762    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17763    if test "x$VS100COMNTOOLS" != x; then
17764      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17765
17766  windows_path="$CYGWIN_VS_TOOLS_DIR"
17767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17768    unix_path=`$CYGPATH -u "$windows_path"`
17769    CYGWIN_VS_TOOLS_DIR="$unix_path"
17770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17772    CYGWIN_VS_TOOLS_DIR="$unix_path"
17773  fi
17774
17775      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17776        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17777      else
17778        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17779      fi
17780
17781  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17782  METHOD="search of VS100COMNTOOLS"
17783  if test -e "$POSSIBLE_MSVCR_DLL"; then
17784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17785$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17786
17787    # Need to check if the found msvcr is correct architecture
17788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17789$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17790    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17791    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17792      CORRECT_MSVCR_ARCH=386
17793    else
17794      CORRECT_MSVCR_ARCH=x86-64
17795    fi
17796    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17798$as_echo "ok" >&6; }
17799      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17801$as_echo_n "checking for msvcr100.dll... " >&6; }
17802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17803$as_echo "$MSVCR_DLL" >&6; }
17804    else
17805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17806$as_echo "incorrect, ignoring" >&6; }
17807      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17808$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17809    fi
17810  fi
17811
17812    fi
17813  fi
17814
17815  if test "x$MSVCR_DLL" = x; then
17816    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17817    # (This was the original behaviour; kept since it might turn up something)
17818    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17819      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17820        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17821      else
17822        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17823        if test "x$POSSIBLE_MSVCR_DLL" = x; then
17824          # We're grasping at straws now...
17825          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17826        fi
17827      fi
17828
17829
17830  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17831  METHOD="search of VCINSTALLDIR"
17832  if test -e "$POSSIBLE_MSVCR_DLL"; then
17833    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17834$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17835
17836    # Need to check if the found msvcr is correct architecture
17837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17838$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17839    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17840    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17841      CORRECT_MSVCR_ARCH=386
17842    else
17843      CORRECT_MSVCR_ARCH=x86-64
17844    fi
17845    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17847$as_echo "ok" >&6; }
17848      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17850$as_echo_n "checking for msvcr100.dll... " >&6; }
17851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17852$as_echo "$MSVCR_DLL" >&6; }
17853    else
17854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17855$as_echo "incorrect, ignoring" >&6; }
17856      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17857$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17858    fi
17859  fi
17860
17861    fi
17862  fi
17863
17864  if test "x$MSVCR_DLL" = x; then
17865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17866$as_echo_n "checking for msvcr100.dll... " >&6; }
17867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17868$as_echo "no" >&6; }
17869    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17870  fi
17871
17872
17873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17874
17875  # Input might be given as Windows format, start by converting to
17876  # unix format.
17877  path="$MSVCR_DLL"
17878  new_path=`$CYGPATH -u "$path"`
17879
17880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17883  # "foo.exe" is OK but "foo" is an error.
17884  #
17885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17886  # It is also a way to make sure we got the proper file name for the real test later on.
17887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17888  if test "x$test_shortpath" = x; then
17889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17890$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17891    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17892  fi
17893
17894  # Call helper function which possibly converts this using DOS-style short mode.
17895  # If so, the updated path is stored in $new_path.
17896
17897  input_path="$new_path"
17898  # Check if we need to convert this using DOS-style short mode. If the path
17899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17900  # take no chances and rewrite it.
17901  # Note: m4 eats our [], so we need to use [ and ] instead.
17902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17903  if test "x$has_forbidden_chars" != x; then
17904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17908      # Going to short mode and back again did indeed matter. Since short mode is
17909      # case insensitive, let's make it lowercase to improve readability.
17910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17911      # Now convert it back to Unix-stile (cygpath)
17912      input_path=`$CYGPATH -u "$shortmode_path"`
17913      new_path="$input_path"
17914    fi
17915  fi
17916
17917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17918  if test "x$test_cygdrive_prefix" = x; then
17919    # As a simple fix, exclude /usr/bin since it's not a real path.
17920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17922      # a path prefixed by /cygdrive for fixpath to work.
17923      new_path="$CYGWIN_ROOT_PATH$input_path"
17924    fi
17925  fi
17926
17927
17928  if test "x$path" != "x$new_path"; then
17929    MSVCR_DLL="$new_path"
17930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17931$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17932  fi
17933
17934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17935
17936  path="$MSVCR_DLL"
17937  has_colon=`$ECHO $path | $GREP ^.:`
17938  new_path="$path"
17939  if test "x$has_colon" = x; then
17940    # Not in mixed or Windows style, start by that.
17941    new_path=`cmd //c echo $path`
17942  fi
17943
17944
17945  input_path="$new_path"
17946  # Check if we need to convert this using DOS-style short mode. If the path
17947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17948  # take no chances and rewrite it.
17949  # Note: m4 eats our [], so we need to use [ and ] instead.
17950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17951  if test "x$has_forbidden_chars" != x; then
17952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17954  fi
17955
17956
17957  windows_path="$new_path"
17958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17959    unix_path=`$CYGPATH -u "$windows_path"`
17960    new_path="$unix_path"
17961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17963    new_path="$unix_path"
17964  fi
17965
17966  if test "x$path" != "x$new_path"; then
17967    MSVCR_DLL="$new_path"
17968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17969$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17970  fi
17971
17972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17974
17975  else
17976    # We're on a posix platform. Hooray! :)
17977    path="$MSVCR_DLL"
17978    has_space=`$ECHO "$path" | $GREP " "`
17979    if test "x$has_space" != x; then
17980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17981$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17982      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17983    fi
17984
17985    # Use eval to expand a potential ~
17986    eval path="$path"
17987    if test ! -f "$path" && test ! -d "$path"; then
17988      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17989    fi
17990
17991    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17992  fi
17993
17994
17995
17996
17997# Check whether --with-dxsdk was given.
17998if test "${with_dxsdk+set}" = set; then :
17999  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18000$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18001fi
18002
18003
18004
18005
18006# Check whether --with-dxsdk-lib was given.
18007if test "${with_dxsdk_lib+set}" = set; then :
18008  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18009$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18010fi
18011
18012
18013
18014
18015# Check whether --with-dxsdk-include was given.
18016if test "${with_dxsdk_include+set}" = set; then :
18017  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18018$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18019fi
18020
18021
18022  fi
18023
18024
18025
18026  # If --build AND --host is set, then the configure script will find any
18027  # cross compilation tools in the PATH. Cross compilation tools
18028  # follows the cross compilation standard where they are prefixed with ${host}.
18029  # For example the binary i686-sun-solaris2.10-gcc
18030  # will cross compile for i686-sun-solaris2.10
18031  # If neither of build and host is not set, then build=host and the
18032  # default compiler found in the path will be used.
18033  # Setting only --host, does not seem to be really supported.
18034  # Please set both --build and --host if you want to cross compile.
18035
18036  if test "x$COMPILE_TYPE" = "xcross"; then
18037    # Now we to find a C/C++ compiler that can build executables for the build
18038    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18039    # once. Also, we need to do this before adding a tools dir to the path,
18040    # otherwise we might pick up cross-compilers which don't use standard naming.
18041    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18042    # to wait until they are properly discovered.
18043    for ac_prog in cl cc gcc
18044do
18045  # Extract the first word of "$ac_prog", so it can be a program name with args.
18046set dummy $ac_prog; ac_word=$2
18047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18048$as_echo_n "checking for $ac_word... " >&6; }
18049if ${ac_cv_path_BUILD_CC+:} false; then :
18050  $as_echo_n "(cached) " >&6
18051else
18052  case $BUILD_CC in
18053  [\\/]* | ?:[\\/]*)
18054  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18055  ;;
18056  *)
18057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18058for as_dir in $PATH
18059do
18060  IFS=$as_save_IFS
18061  test -z "$as_dir" && as_dir=.
18062    for ac_exec_ext in '' $ac_executable_extensions; do
18063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18064    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18066    break 2
18067  fi
18068done
18069  done
18070IFS=$as_save_IFS
18071
18072  ;;
18073esac
18074fi
18075BUILD_CC=$ac_cv_path_BUILD_CC
18076if test -n "$BUILD_CC"; then
18077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18078$as_echo "$BUILD_CC" >&6; }
18079else
18080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18081$as_echo "no" >&6; }
18082fi
18083
18084
18085  test -n "$BUILD_CC" && break
18086done
18087
18088
18089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18090
18091  # First separate the path from the arguments. This will split at the first
18092  # space.
18093  complete="$BUILD_CC"
18094  path="${complete%% *}"
18095  tmp="$complete EOL"
18096  arguments="${tmp#* }"
18097
18098  # Input might be given as Windows format, start by converting to
18099  # unix format.
18100  new_path=`$CYGPATH -u "$path"`
18101
18102  # Now try to locate executable using which
18103  new_path=`$WHICH "$new_path" 2> /dev/null`
18104  # bat and cmd files are not always considered executable in cygwin causing which
18105  # to not find them
18106  if test "x$new_path" = x \
18107      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18108      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18109    new_path=`$CYGPATH -u "$path"`
18110  fi
18111  if test "x$new_path" = x; then
18112    # Oops. Which didn't find the executable.
18113    # The splitting of arguments from the executable at a space might have been incorrect,
18114    # since paths with space are more likely in Windows. Give it another try with the whole
18115    # argument.
18116    path="$complete"
18117    arguments="EOL"
18118    new_path=`$CYGPATH -u "$path"`
18119    new_path=`$WHICH "$new_path" 2> /dev/null`
18120    # bat and cmd files are not always considered executable in cygwin causing which
18121    # to not find them
18122    if test "x$new_path" = x \
18123        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18124        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18125      new_path=`$CYGPATH -u "$path"`
18126    fi
18127    if test "x$new_path" = x; then
18128      # It's still not found. Now this is an unrecoverable error.
18129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18130$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18131      has_space=`$ECHO "$complete" | $GREP " "`
18132      if test "x$has_space" != x; then
18133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18135      fi
18136      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18137    fi
18138  fi
18139
18140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18143  # "foo.exe" is OK but "foo" is an error.
18144  #
18145  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18146  # It is also a way to make sure we got the proper file name for the real test later on.
18147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18148  if test "x$test_shortpath" = x; then
18149    # Short path failed, file does not exist as specified.
18150    # Try adding .exe or .cmd
18151    if test -f "${new_path}.exe"; then
18152      input_to_shortpath="${new_path}.exe"
18153    elif test -f "${new_path}.cmd"; then
18154      input_to_shortpath="${new_path}.cmd"
18155    else
18156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18157$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18158      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18159$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18160      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18161    fi
18162  else
18163    input_to_shortpath="$new_path"
18164  fi
18165
18166  # Call helper function which possibly converts this using DOS-style short mode.
18167  # If so, the updated path is stored in $new_path.
18168  new_path="$input_to_shortpath"
18169
18170  input_path="$input_to_shortpath"
18171  # Check if we need to convert this using DOS-style short mode. If the path
18172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18173  # take no chances and rewrite it.
18174  # Note: m4 eats our [], so we need to use [ and ] instead.
18175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18176  if test "x$has_forbidden_chars" != x; then
18177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18181      # Going to short mode and back again did indeed matter. Since short mode is
18182      # case insensitive, let's make it lowercase to improve readability.
18183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18184      # Now convert it back to Unix-stile (cygpath)
18185      input_path=`$CYGPATH -u "$shortmode_path"`
18186      new_path="$input_path"
18187    fi
18188  fi
18189
18190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18191  if test "x$test_cygdrive_prefix" = x; then
18192    # As a simple fix, exclude /usr/bin since it's not a real path.
18193    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18195      # a path prefixed by /cygdrive for fixpath to work.
18196      new_path="$CYGWIN_ROOT_PATH$input_path"
18197    fi
18198  fi
18199
18200  # remove trailing .exe if any
18201  new_path="${new_path/%.exe/}"
18202
18203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18204
18205  # First separate the path from the arguments. This will split at the first
18206  # space.
18207  complete="$BUILD_CC"
18208  path="${complete%% *}"
18209  tmp="$complete EOL"
18210  arguments="${tmp#* }"
18211
18212  # Input might be given as Windows format, start by converting to
18213  # unix format.
18214  new_path="$path"
18215
18216  windows_path="$new_path"
18217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18218    unix_path=`$CYGPATH -u "$windows_path"`
18219    new_path="$unix_path"
18220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18222    new_path="$unix_path"
18223  fi
18224
18225
18226  # Now try to locate executable using which
18227  new_path=`$WHICH "$new_path" 2> /dev/null`
18228
18229  if test "x$new_path" = x; then
18230    # Oops. Which didn't find the executable.
18231    # The splitting of arguments from the executable at a space might have been incorrect,
18232    # since paths with space are more likely in Windows. Give it another try with the whole
18233    # argument.
18234    path="$complete"
18235    arguments="EOL"
18236    new_path="$path"
18237
18238  windows_path="$new_path"
18239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18240    unix_path=`$CYGPATH -u "$windows_path"`
18241    new_path="$unix_path"
18242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18244    new_path="$unix_path"
18245  fi
18246
18247
18248    new_path=`$WHICH "$new_path" 2> /dev/null`
18249
18250    if test "x$new_path" = x; then
18251      # It's still not found. Now this is an unrecoverable error.
18252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18253$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18254      has_space=`$ECHO "$complete" | $GREP " "`
18255      if test "x$has_space" != x; then
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18258      fi
18259      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18260    fi
18261  fi
18262
18263  # Now new_path has a complete unix path to the binary
18264  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18265    # Keep paths in /bin as-is, but remove trailing .exe if any
18266    new_path="${new_path/%.exe/}"
18267    # Do not save /bin paths to all_fixpath_prefixes!
18268  else
18269    # Not in mixed or Windows style, start by that.
18270    new_path=`cmd //c echo $new_path`
18271
18272  input_path="$new_path"
18273  # Check if we need to convert this using DOS-style short mode. If the path
18274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18275  # take no chances and rewrite it.
18276  # Note: m4 eats our [], so we need to use [ and ] instead.
18277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18278  if test "x$has_forbidden_chars" != x; then
18279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18281  fi
18282
18283    # Output is in $new_path
18284
18285  windows_path="$new_path"
18286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18287    unix_path=`$CYGPATH -u "$windows_path"`
18288    new_path="$unix_path"
18289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18291    new_path="$unix_path"
18292  fi
18293
18294    # remove trailing .exe if any
18295    new_path="${new_path/%.exe/}"
18296
18297    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18298    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18299  fi
18300
18301  else
18302    # We're on a posix platform. Hooray! :)
18303    # First separate the path from the arguments. This will split at the first
18304    # space.
18305    complete="$BUILD_CC"
18306    path="${complete%% *}"
18307    tmp="$complete EOL"
18308    arguments="${tmp#* }"
18309
18310    # Cannot rely on the command "which" here since it doesn't always work.
18311    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18312    if test -z "$is_absolute_path"; then
18313      # Path to executable is not absolute. Find it.
18314      IFS_save="$IFS"
18315      IFS=:
18316      for p in $PATH; do
18317        if test -f "$p/$path" && test -x "$p/$path"; then
18318          new_path="$p/$path"
18319          break
18320        fi
18321      done
18322      IFS="$IFS_save"
18323    else
18324      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18325$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18326      new_path="$path"
18327    fi
18328
18329    if test "x$new_path" = x; then
18330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18331$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18332      has_space=`$ECHO "$complete" | $GREP " "`
18333      if test "x$has_space" != x; then
18334        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18336      fi
18337      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18338    fi
18339  fi
18340
18341  # Now join together the path and the arguments once again
18342  if test "x$arguments" != xEOL; then
18343    new_complete="$new_path ${arguments% *}"
18344  else
18345    new_complete="$new_path"
18346  fi
18347
18348  if test "x$complete" != "x$new_complete"; then
18349    BUILD_CC="$new_complete"
18350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18351$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18352  fi
18353
18354    for ac_prog in cl CC g++
18355do
18356  # Extract the first word of "$ac_prog", so it can be a program name with args.
18357set dummy $ac_prog; ac_word=$2
18358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18359$as_echo_n "checking for $ac_word... " >&6; }
18360if ${ac_cv_path_BUILD_CXX+:} false; then :
18361  $as_echo_n "(cached) " >&6
18362else
18363  case $BUILD_CXX in
18364  [\\/]* | ?:[\\/]*)
18365  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18366  ;;
18367  *)
18368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18369for as_dir in $PATH
18370do
18371  IFS=$as_save_IFS
18372  test -z "$as_dir" && as_dir=.
18373    for ac_exec_ext in '' $ac_executable_extensions; do
18374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18375    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18377    break 2
18378  fi
18379done
18380  done
18381IFS=$as_save_IFS
18382
18383  ;;
18384esac
18385fi
18386BUILD_CXX=$ac_cv_path_BUILD_CXX
18387if test -n "$BUILD_CXX"; then
18388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18389$as_echo "$BUILD_CXX" >&6; }
18390else
18391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18392$as_echo "no" >&6; }
18393fi
18394
18395
18396  test -n "$BUILD_CXX" && break
18397done
18398
18399
18400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18401
18402  # First separate the path from the arguments. This will split at the first
18403  # space.
18404  complete="$BUILD_CXX"
18405  path="${complete%% *}"
18406  tmp="$complete EOL"
18407  arguments="${tmp#* }"
18408
18409  # Input might be given as Windows format, start by converting to
18410  # unix format.
18411  new_path=`$CYGPATH -u "$path"`
18412
18413  # Now try to locate executable using which
18414  new_path=`$WHICH "$new_path" 2> /dev/null`
18415  # bat and cmd files are not always considered executable in cygwin causing which
18416  # to not find them
18417  if test "x$new_path" = x \
18418      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18419      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18420    new_path=`$CYGPATH -u "$path"`
18421  fi
18422  if test "x$new_path" = x; then
18423    # Oops. Which didn't find the executable.
18424    # The splitting of arguments from the executable at a space might have been incorrect,
18425    # since paths with space are more likely in Windows. Give it another try with the whole
18426    # argument.
18427    path="$complete"
18428    arguments="EOL"
18429    new_path=`$CYGPATH -u "$path"`
18430    new_path=`$WHICH "$new_path" 2> /dev/null`
18431    # bat and cmd files are not always considered executable in cygwin causing which
18432    # to not find them
18433    if test "x$new_path" = x \
18434        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18435        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18436      new_path=`$CYGPATH -u "$path"`
18437    fi
18438    if test "x$new_path" = x; then
18439      # It's still not found. Now this is an unrecoverable error.
18440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18441$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18442      has_space=`$ECHO "$complete" | $GREP " "`
18443      if test "x$has_space" != x; then
18444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18446      fi
18447      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18448    fi
18449  fi
18450
18451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18454  # "foo.exe" is OK but "foo" is an error.
18455  #
18456  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18457  # It is also a way to make sure we got the proper file name for the real test later on.
18458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18459  if test "x$test_shortpath" = x; then
18460    # Short path failed, file does not exist as specified.
18461    # Try adding .exe or .cmd
18462    if test -f "${new_path}.exe"; then
18463      input_to_shortpath="${new_path}.exe"
18464    elif test -f "${new_path}.cmd"; then
18465      input_to_shortpath="${new_path}.cmd"
18466    else
18467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18468$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18469      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18470$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18471      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18472    fi
18473  else
18474    input_to_shortpath="$new_path"
18475  fi
18476
18477  # Call helper function which possibly converts this using DOS-style short mode.
18478  # If so, the updated path is stored in $new_path.
18479  new_path="$input_to_shortpath"
18480
18481  input_path="$input_to_shortpath"
18482  # Check if we need to convert this using DOS-style short mode. If the path
18483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18484  # take no chances and rewrite it.
18485  # Note: m4 eats our [], so we need to use [ and ] instead.
18486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18487  if test "x$has_forbidden_chars" != x; then
18488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18492      # Going to short mode and back again did indeed matter. Since short mode is
18493      # case insensitive, let's make it lowercase to improve readability.
18494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18495      # Now convert it back to Unix-stile (cygpath)
18496      input_path=`$CYGPATH -u "$shortmode_path"`
18497      new_path="$input_path"
18498    fi
18499  fi
18500
18501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18502  if test "x$test_cygdrive_prefix" = x; then
18503    # As a simple fix, exclude /usr/bin since it's not a real path.
18504    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18506      # a path prefixed by /cygdrive for fixpath to work.
18507      new_path="$CYGWIN_ROOT_PATH$input_path"
18508    fi
18509  fi
18510
18511  # remove trailing .exe if any
18512  new_path="${new_path/%.exe/}"
18513
18514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18515
18516  # First separate the path from the arguments. This will split at the first
18517  # space.
18518  complete="$BUILD_CXX"
18519  path="${complete%% *}"
18520  tmp="$complete EOL"
18521  arguments="${tmp#* }"
18522
18523  # Input might be given as Windows format, start by converting to
18524  # unix format.
18525  new_path="$path"
18526
18527  windows_path="$new_path"
18528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18529    unix_path=`$CYGPATH -u "$windows_path"`
18530    new_path="$unix_path"
18531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18533    new_path="$unix_path"
18534  fi
18535
18536
18537  # Now try to locate executable using which
18538  new_path=`$WHICH "$new_path" 2> /dev/null`
18539
18540  if test "x$new_path" = x; then
18541    # Oops. Which didn't find the executable.
18542    # The splitting of arguments from the executable at a space might have been incorrect,
18543    # since paths with space are more likely in Windows. Give it another try with the whole
18544    # argument.
18545    path="$complete"
18546    arguments="EOL"
18547    new_path="$path"
18548
18549  windows_path="$new_path"
18550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18551    unix_path=`$CYGPATH -u "$windows_path"`
18552    new_path="$unix_path"
18553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18555    new_path="$unix_path"
18556  fi
18557
18558
18559    new_path=`$WHICH "$new_path" 2> /dev/null`
18560
18561    if test "x$new_path" = x; then
18562      # It's still not found. Now this is an unrecoverable error.
18563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18564$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18565      has_space=`$ECHO "$complete" | $GREP " "`
18566      if test "x$has_space" != x; then
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18569      fi
18570      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18571    fi
18572  fi
18573
18574  # Now new_path has a complete unix path to the binary
18575  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18576    # Keep paths in /bin as-is, but remove trailing .exe if any
18577    new_path="${new_path/%.exe/}"
18578    # Do not save /bin paths to all_fixpath_prefixes!
18579  else
18580    # Not in mixed or Windows style, start by that.
18581    new_path=`cmd //c echo $new_path`
18582
18583  input_path="$new_path"
18584  # Check if we need to convert this using DOS-style short mode. If the path
18585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18586  # take no chances and rewrite it.
18587  # Note: m4 eats our [], so we need to use [ and ] instead.
18588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18589  if test "x$has_forbidden_chars" != x; then
18590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18592  fi
18593
18594    # Output is in $new_path
18595
18596  windows_path="$new_path"
18597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18598    unix_path=`$CYGPATH -u "$windows_path"`
18599    new_path="$unix_path"
18600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18602    new_path="$unix_path"
18603  fi
18604
18605    # remove trailing .exe if any
18606    new_path="${new_path/%.exe/}"
18607
18608    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18609    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18610  fi
18611
18612  else
18613    # We're on a posix platform. Hooray! :)
18614    # First separate the path from the arguments. This will split at the first
18615    # space.
18616    complete="$BUILD_CXX"
18617    path="${complete%% *}"
18618    tmp="$complete EOL"
18619    arguments="${tmp#* }"
18620
18621    # Cannot rely on the command "which" here since it doesn't always work.
18622    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18623    if test -z "$is_absolute_path"; then
18624      # Path to executable is not absolute. Find it.
18625      IFS_save="$IFS"
18626      IFS=:
18627      for p in $PATH; do
18628        if test -f "$p/$path" && test -x "$p/$path"; then
18629          new_path="$p/$path"
18630          break
18631        fi
18632      done
18633      IFS="$IFS_save"
18634    else
18635      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18636$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18637      new_path="$path"
18638    fi
18639
18640    if test "x$new_path" = x; then
18641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18642$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18643      has_space=`$ECHO "$complete" | $GREP " "`
18644      if test "x$has_space" != x; then
18645        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18646$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18647      fi
18648      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18649    fi
18650  fi
18651
18652  # Now join together the path and the arguments once again
18653  if test "x$arguments" != xEOL; then
18654    new_complete="$new_path ${arguments% *}"
18655  else
18656    new_complete="$new_path"
18657  fi
18658
18659  if test "x$complete" != "x$new_complete"; then
18660    BUILD_CXX="$new_complete"
18661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18662$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18663  fi
18664
18665    # Extract the first word of "ld", so it can be a program name with args.
18666set dummy ld; ac_word=$2
18667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18668$as_echo_n "checking for $ac_word... " >&6; }
18669if ${ac_cv_path_BUILD_LD+:} false; then :
18670  $as_echo_n "(cached) " >&6
18671else
18672  case $BUILD_LD in
18673  [\\/]* | ?:[\\/]*)
18674  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18675  ;;
18676  *)
18677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18678for as_dir in $PATH
18679do
18680  IFS=$as_save_IFS
18681  test -z "$as_dir" && as_dir=.
18682    for ac_exec_ext in '' $ac_executable_extensions; do
18683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18684    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18686    break 2
18687  fi
18688done
18689  done
18690IFS=$as_save_IFS
18691
18692  ;;
18693esac
18694fi
18695BUILD_LD=$ac_cv_path_BUILD_LD
18696if test -n "$BUILD_LD"; then
18697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18698$as_echo "$BUILD_LD" >&6; }
18699else
18700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18701$as_echo "no" >&6; }
18702fi
18703
18704
18705
18706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18707
18708  # First separate the path from the arguments. This will split at the first
18709  # space.
18710  complete="$BUILD_LD"
18711  path="${complete%% *}"
18712  tmp="$complete EOL"
18713  arguments="${tmp#* }"
18714
18715  # Input might be given as Windows format, start by converting to
18716  # unix format.
18717  new_path=`$CYGPATH -u "$path"`
18718
18719  # Now try to locate executable using which
18720  new_path=`$WHICH "$new_path" 2> /dev/null`
18721  # bat and cmd files are not always considered executable in cygwin causing which
18722  # to not find them
18723  if test "x$new_path" = x \
18724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18726    new_path=`$CYGPATH -u "$path"`
18727  fi
18728  if test "x$new_path" = x; then
18729    # Oops. Which didn't find the executable.
18730    # The splitting of arguments from the executable at a space might have been incorrect,
18731    # since paths with space are more likely in Windows. Give it another try with the whole
18732    # argument.
18733    path="$complete"
18734    arguments="EOL"
18735    new_path=`$CYGPATH -u "$path"`
18736    new_path=`$WHICH "$new_path" 2> /dev/null`
18737    # bat and cmd files are not always considered executable in cygwin causing which
18738    # to not find them
18739    if test "x$new_path" = x \
18740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18742      new_path=`$CYGPATH -u "$path"`
18743    fi
18744    if test "x$new_path" = x; then
18745      # It's still not found. Now this is an unrecoverable error.
18746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18747$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18748      has_space=`$ECHO "$complete" | $GREP " "`
18749      if test "x$has_space" != x; then
18750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18752      fi
18753      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18754    fi
18755  fi
18756
18757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18760  # "foo.exe" is OK but "foo" is an error.
18761  #
18762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18763  # It is also a way to make sure we got the proper file name for the real test later on.
18764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18765  if test "x$test_shortpath" = x; then
18766    # Short path failed, file does not exist as specified.
18767    # Try adding .exe or .cmd
18768    if test -f "${new_path}.exe"; then
18769      input_to_shortpath="${new_path}.exe"
18770    elif test -f "${new_path}.cmd"; then
18771      input_to_shortpath="${new_path}.cmd"
18772    else
18773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18774$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18777      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18778    fi
18779  else
18780    input_to_shortpath="$new_path"
18781  fi
18782
18783  # Call helper function which possibly converts this using DOS-style short mode.
18784  # If so, the updated path is stored in $new_path.
18785  new_path="$input_to_shortpath"
18786
18787  input_path="$input_to_shortpath"
18788  # Check if we need to convert this using DOS-style short mode. If the path
18789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18790  # take no chances and rewrite it.
18791  # Note: m4 eats our [], so we need to use [ and ] instead.
18792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18793  if test "x$has_forbidden_chars" != x; then
18794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18798      # Going to short mode and back again did indeed matter. Since short mode is
18799      # case insensitive, let's make it lowercase to improve readability.
18800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18801      # Now convert it back to Unix-stile (cygpath)
18802      input_path=`$CYGPATH -u "$shortmode_path"`
18803      new_path="$input_path"
18804    fi
18805  fi
18806
18807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18808  if test "x$test_cygdrive_prefix" = x; then
18809    # As a simple fix, exclude /usr/bin since it's not a real path.
18810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18812      # a path prefixed by /cygdrive for fixpath to work.
18813      new_path="$CYGWIN_ROOT_PATH$input_path"
18814    fi
18815  fi
18816
18817  # remove trailing .exe if any
18818  new_path="${new_path/%.exe/}"
18819
18820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18821
18822  # First separate the path from the arguments. This will split at the first
18823  # space.
18824  complete="$BUILD_LD"
18825  path="${complete%% *}"
18826  tmp="$complete EOL"
18827  arguments="${tmp#* }"
18828
18829  # Input might be given as Windows format, start by converting to
18830  # unix format.
18831  new_path="$path"
18832
18833  windows_path="$new_path"
18834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18835    unix_path=`$CYGPATH -u "$windows_path"`
18836    new_path="$unix_path"
18837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18839    new_path="$unix_path"
18840  fi
18841
18842
18843  # Now try to locate executable using which
18844  new_path=`$WHICH "$new_path" 2> /dev/null`
18845
18846  if test "x$new_path" = x; then
18847    # Oops. Which didn't find the executable.
18848    # The splitting of arguments from the executable at a space might have been incorrect,
18849    # since paths with space are more likely in Windows. Give it another try with the whole
18850    # argument.
18851    path="$complete"
18852    arguments="EOL"
18853    new_path="$path"
18854
18855  windows_path="$new_path"
18856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18857    unix_path=`$CYGPATH -u "$windows_path"`
18858    new_path="$unix_path"
18859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18861    new_path="$unix_path"
18862  fi
18863
18864
18865    new_path=`$WHICH "$new_path" 2> /dev/null`
18866
18867    if test "x$new_path" = x; then
18868      # It's still not found. Now this is an unrecoverable error.
18869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18870$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18871      has_space=`$ECHO "$complete" | $GREP " "`
18872      if test "x$has_space" != x; then
18873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18875      fi
18876      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18877    fi
18878  fi
18879
18880  # Now new_path has a complete unix path to the binary
18881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18882    # Keep paths in /bin as-is, but remove trailing .exe if any
18883    new_path="${new_path/%.exe/}"
18884    # Do not save /bin paths to all_fixpath_prefixes!
18885  else
18886    # Not in mixed or Windows style, start by that.
18887    new_path=`cmd //c echo $new_path`
18888
18889  input_path="$new_path"
18890  # Check if we need to convert this using DOS-style short mode. If the path
18891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18892  # take no chances and rewrite it.
18893  # Note: m4 eats our [], so we need to use [ and ] instead.
18894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18895  if test "x$has_forbidden_chars" != x; then
18896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18898  fi
18899
18900    # Output is in $new_path
18901
18902  windows_path="$new_path"
18903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18904    unix_path=`$CYGPATH -u "$windows_path"`
18905    new_path="$unix_path"
18906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18908    new_path="$unix_path"
18909  fi
18910
18911    # remove trailing .exe if any
18912    new_path="${new_path/%.exe/}"
18913
18914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18916  fi
18917
18918  else
18919    # We're on a posix platform. Hooray! :)
18920    # First separate the path from the arguments. This will split at the first
18921    # space.
18922    complete="$BUILD_LD"
18923    path="${complete%% *}"
18924    tmp="$complete EOL"
18925    arguments="${tmp#* }"
18926
18927    # Cannot rely on the command "which" here since it doesn't always work.
18928    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18929    if test -z "$is_absolute_path"; then
18930      # Path to executable is not absolute. Find it.
18931      IFS_save="$IFS"
18932      IFS=:
18933      for p in $PATH; do
18934        if test -f "$p/$path" && test -x "$p/$path"; then
18935          new_path="$p/$path"
18936          break
18937        fi
18938      done
18939      IFS="$IFS_save"
18940    else
18941      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18942$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18943      new_path="$path"
18944    fi
18945
18946    if test "x$new_path" = x; then
18947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18948$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18949      has_space=`$ECHO "$complete" | $GREP " "`
18950      if test "x$has_space" != x; then
18951        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18953      fi
18954      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18955    fi
18956  fi
18957
18958  # Now join together the path and the arguments once again
18959  if test "x$arguments" != xEOL; then
18960    new_complete="$new_path ${arguments% *}"
18961  else
18962    new_complete="$new_path"
18963  fi
18964
18965  if test "x$complete" != "x$new_complete"; then
18966    BUILD_LD="$new_complete"
18967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18968$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18969  fi
18970
18971  fi
18972
18973
18974
18975
18976  # If a devkit is found on the builddeps server, then prepend its path to the
18977  # PATH variable. If there are cross compilers available in the devkit, these
18978  # will be found by AC_PROG_CC et al.
18979  DEVKIT=
18980
18981
18982  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18983    # Source the builddeps file again, to make sure it uses the latest variables!
18984    . $builddepsfile
18985    # Look for a target and build machine specific resource!
18986    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18987    if test "x$resource" = x; then
18988      # Ok, lets instead look for a target specific resource
18989      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18990    fi
18991    if test "x$resource" = x; then
18992      # Ok, lets instead look for a build specific resource
18993      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18994    fi
18995    if test "x$resource" = x; then
18996      # Ok, lets instead look for a generic resource
18997      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18998      resource=${builddep_devkit}
18999    fi
19000    if test "x$resource" != x; then
19001      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19002$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19003      # If the resource in the builddeps.conf file is an existing directory,
19004      # for example /java/linux/cups
19005      if test -d ${resource}; then
19006        depdir=${resource}
19007      else
19008
19009  # devkit is for example mymodule
19010  # $resource is for example libs/general/libmymod_1_2_3.zip
19011  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19012  # $with_builddeps_dir is for example /localhome/builddeps
19013  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19014  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19015  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19016  filename=`basename $resource`
19017  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19018  filebase=${filename%%.*}
19019  extension=${filename#*.}
19020  installdir=$with_builddeps_dir/$filebase
19021  if test ! -f $installdir/$filename.unpacked; then
19022    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19023$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19024    if test ! -d $installdir; then
19025      mkdir -p $installdir
19026    fi
19027    if test ! -d $installdir; then
19028      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19029    fi
19030    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19031    touch $tmpfile
19032    if test ! -f $tmpfile; then
19033      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19034    fi
19035
19036  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19037  # $tmpfile is the local file name for the downloaded file.
19038  VALID_TOOL=no
19039  if test "x$BDEPS_FTP" = xwget; then
19040    VALID_TOOL=yes
19041    wget -O $tmpfile $with_builddeps_server/$resource
19042  fi
19043  if test "x$BDEPS_FTP" = xlftp; then
19044    VALID_TOOL=yes
19045    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19046  fi
19047  if test "x$BDEPS_FTP" = xftp; then
19048    VALID_TOOL=yes
19049    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19050    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19051    FTPUSERPWD=${FTPSERVER%%@*}
19052    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19053      FTPUSER=${userpwd%%:*}
19054      FTPPWD=${userpwd#*@}
19055      FTPSERVER=${FTPSERVER#*@}
19056    else
19057      FTPUSER=ftp
19058      FTPPWD=ftp
19059    fi
19060    # the "pass" command does not work on some
19061    # ftp clients (read ftp.exe) but if it works,
19062    # passive mode is better!
19063    ( \
19064        echo "user $FTPUSER $FTPPWD"        ; \
19065        echo "pass"                         ; \
19066        echo "bin"                          ; \
19067        echo "get $FTPPATH $tmpfile"              ; \
19068    ) | ftp -in $FTPSERVER
19069  fi
19070  if test "x$VALID_TOOL" != xyes; then
19071    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19072  fi
19073
19074    mv $tmpfile $installdir/$filename
19075    if test ! -s $installdir/$filename; then
19076      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19077    fi
19078    case "$extension" in
19079      zip)  echo "Unzipping $installdir/$filename..."
19080        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19081        ;;
19082      tar.gz) echo "Untaring $installdir/$filename..."
19083        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19084        ;;
19085      tgz) echo "Untaring $installdir/$filename..."
19086        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19087        ;;
19088      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19089        ;;
19090    esac
19091  fi
19092  if test -f $installdir/$filename.unpacked; then
19093    depdir=$installdir
19094  fi
19095
19096      fi
19097      # Source the builddeps file again, because in the previous command, the depdir
19098      # was updated to point at the current build dependency install directory.
19099      . $builddepsfile
19100      # Now extract variables from the builddeps.conf files.
19101      theroot=${builddep_devkit_ROOT}
19102      thecflags=${builddep_devkit_CFLAGS}
19103      thelibs=${builddep_devkit_LIBS}
19104      if test "x$depdir" = x; then
19105        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19106      fi
19107      DEVKIT=$depdir
19108      if test "x$theroot" != x; then
19109        DEVKIT="$theroot"
19110      fi
19111      if test "x$thecflags" != x; then
19112        DEVKIT_CFLAGS="$thecflags"
19113      fi
19114      if test "x$thelibs" != x; then
19115        DEVKIT_LIBS="$thelibs"
19116      fi
19117
19118        # Found devkit
19119        PATH="$DEVKIT/bin:$PATH"
19120        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19121        if test "x$x_includes" = "xNONE"; then
19122          x_includes="$SYS_ROOT/usr/include/X11"
19123        fi
19124        if test "x$x_libraries" = "xNONE"; then
19125          x_libraries="$SYS_ROOT/usr/lib"
19126        fi
19127
19128
19129    fi
19130
19131  fi
19132
19133
19134  # Store the CFLAGS etal passed to the configure script.
19135  ORG_CFLAGS="$CFLAGS"
19136  ORG_CXXFLAGS="$CXXFLAGS"
19137  ORG_OBJCFLAGS="$OBJCFLAGS"
19138
19139  # autoconf magic only relies on PATH, so update it if tools dir is specified
19140  OLD_PATH="$PATH"
19141  if test "x$TOOLS_DIR" != x; then
19142    PATH=$TOOLS_DIR:$PATH
19143  fi
19144
19145
19146  ### Locate C compiler (CC)
19147
19148  # On windows, only cl.exe is supported.
19149  # On Solaris, cc is preferred to gcc.
19150  # Elsewhere, gcc is preferred to cc.
19151
19152  if test "x$CC" != x; then
19153    COMPILER_CHECK_LIST="$CC"
19154  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19155    COMPILER_CHECK_LIST="cl"
19156  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19157    COMPILER_CHECK_LIST="cc gcc"
19158  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19159    # Do not probe for cc on AIX.
19160    COMPILER_CHECK_LIST="xlc_r"
19161  else
19162    COMPILER_CHECK_LIST="gcc cc"
19163  fi
19164
19165
19166  COMPILER_NAME=C
19167
19168  CC=
19169  # If TOOLS_DIR is set, check for all compiler names in there first
19170  # before checking the rest of the PATH.
19171  if test -n "$TOOLS_DIR"; then
19172    PATH_save="$PATH"
19173    PATH="$TOOLS_DIR"
19174    for ac_prog in $COMPILER_CHECK_LIST
19175do
19176  # Extract the first word of "$ac_prog", so it can be a program name with args.
19177set dummy $ac_prog; ac_word=$2
19178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19179$as_echo_n "checking for $ac_word... " >&6; }
19180if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19181  $as_echo_n "(cached) " >&6
19182else
19183  case $TOOLS_DIR_CC in
19184  [\\/]* | ?:[\\/]*)
19185  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19186  ;;
19187  *)
19188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19189for as_dir in $PATH
19190do
19191  IFS=$as_save_IFS
19192  test -z "$as_dir" && as_dir=.
19193    for ac_exec_ext in '' $ac_executable_extensions; do
19194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19195    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19197    break 2
19198  fi
19199done
19200  done
19201IFS=$as_save_IFS
19202
19203  ;;
19204esac
19205fi
19206TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19207if test -n "$TOOLS_DIR_CC"; then
19208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19209$as_echo "$TOOLS_DIR_CC" >&6; }
19210else
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19212$as_echo "no" >&6; }
19213fi
19214
19215
19216  test -n "$TOOLS_DIR_CC" && break
19217done
19218
19219    CC=$TOOLS_DIR_CC
19220    PATH="$PATH_save"
19221  fi
19222
19223  # AC_PATH_PROGS can't be run multiple times with the same variable,
19224  # so create a new name for this run.
19225  if test "x$CC" = x; then
19226    for ac_prog in $COMPILER_CHECK_LIST
19227do
19228  # Extract the first word of "$ac_prog", so it can be a program name with args.
19229set dummy $ac_prog; ac_word=$2
19230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19231$as_echo_n "checking for $ac_word... " >&6; }
19232if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19233  $as_echo_n "(cached) " >&6
19234else
19235  case $POTENTIAL_CC in
19236  [\\/]* | ?:[\\/]*)
19237  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19238  ;;
19239  *)
19240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19241for as_dir in $PATH
19242do
19243  IFS=$as_save_IFS
19244  test -z "$as_dir" && as_dir=.
19245    for ac_exec_ext in '' $ac_executable_extensions; do
19246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19247    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19249    break 2
19250  fi
19251done
19252  done
19253IFS=$as_save_IFS
19254
19255  ;;
19256esac
19257fi
19258POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19259if test -n "$POTENTIAL_CC"; then
19260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19261$as_echo "$POTENTIAL_CC" >&6; }
19262else
19263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19264$as_echo "no" >&6; }
19265fi
19266
19267
19268  test -n "$POTENTIAL_CC" && break
19269done
19270
19271    CC=$POTENTIAL_CC
19272  fi
19273
19274  if test "x$CC" = x; then
19275
19276  # Print a helpful message on how to acquire the necessary build dependency.
19277  # devkit is the help tag: freetype, cups, pulse, alsa etc
19278  MISSING_DEPENDENCY=devkit
19279
19280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19281    cygwin_help $MISSING_DEPENDENCY
19282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19283    msys_help $MISSING_DEPENDENCY
19284  else
19285    PKGHANDLER_COMMAND=
19286
19287    case $PKGHANDLER in
19288      apt-get)
19289        apt_help     $MISSING_DEPENDENCY ;;
19290      yum)
19291        yum_help     $MISSING_DEPENDENCY ;;
19292      port)
19293        port_help    $MISSING_DEPENDENCY ;;
19294      pkgutil)
19295        pkgutil_help $MISSING_DEPENDENCY ;;
19296      pkgadd)
19297        pkgadd_help  $MISSING_DEPENDENCY ;;
19298    esac
19299
19300    if test "x$PKGHANDLER_COMMAND" != x; then
19301      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19302    fi
19303  fi
19304
19305    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19306  fi
19307
19308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19309
19310  # First separate the path from the arguments. This will split at the first
19311  # space.
19312  complete="$CC"
19313  path="${complete%% *}"
19314  tmp="$complete EOL"
19315  arguments="${tmp#* }"
19316
19317  # Input might be given as Windows format, start by converting to
19318  # unix format.
19319  new_path=`$CYGPATH -u "$path"`
19320
19321  # Now try to locate executable using which
19322  new_path=`$WHICH "$new_path" 2> /dev/null`
19323  # bat and cmd files are not always considered executable in cygwin causing which
19324  # to not find them
19325  if test "x$new_path" = x \
19326      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19327      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19328    new_path=`$CYGPATH -u "$path"`
19329  fi
19330  if test "x$new_path" = x; then
19331    # Oops. Which didn't find the executable.
19332    # The splitting of arguments from the executable at a space might have been incorrect,
19333    # since paths with space are more likely in Windows. Give it another try with the whole
19334    # argument.
19335    path="$complete"
19336    arguments="EOL"
19337    new_path=`$CYGPATH -u "$path"`
19338    new_path=`$WHICH "$new_path" 2> /dev/null`
19339    # bat and cmd files are not always considered executable in cygwin causing which
19340    # to not find them
19341    if test "x$new_path" = x \
19342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19344      new_path=`$CYGPATH -u "$path"`
19345    fi
19346    if test "x$new_path" = x; then
19347      # It's still not found. Now this is an unrecoverable error.
19348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19349$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19350      has_space=`$ECHO "$complete" | $GREP " "`
19351      if test "x$has_space" != x; then
19352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19354      fi
19355      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19356    fi
19357  fi
19358
19359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19362  # "foo.exe" is OK but "foo" is an error.
19363  #
19364  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19365  # It is also a way to make sure we got the proper file name for the real test later on.
19366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19367  if test "x$test_shortpath" = x; then
19368    # Short path failed, file does not exist as specified.
19369    # Try adding .exe or .cmd
19370    if test -f "${new_path}.exe"; then
19371      input_to_shortpath="${new_path}.exe"
19372    elif test -f "${new_path}.cmd"; then
19373      input_to_shortpath="${new_path}.cmd"
19374    else
19375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19376$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19379      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19380    fi
19381  else
19382    input_to_shortpath="$new_path"
19383  fi
19384
19385  # Call helper function which possibly converts this using DOS-style short mode.
19386  # If so, the updated path is stored in $new_path.
19387  new_path="$input_to_shortpath"
19388
19389  input_path="$input_to_shortpath"
19390  # Check if we need to convert this using DOS-style short mode. If the path
19391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19392  # take no chances and rewrite it.
19393  # Note: m4 eats our [], so we need to use [ and ] instead.
19394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19395  if test "x$has_forbidden_chars" != x; then
19396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19400      # Going to short mode and back again did indeed matter. Since short mode is
19401      # case insensitive, let's make it lowercase to improve readability.
19402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19403      # Now convert it back to Unix-stile (cygpath)
19404      input_path=`$CYGPATH -u "$shortmode_path"`
19405      new_path="$input_path"
19406    fi
19407  fi
19408
19409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19410  if test "x$test_cygdrive_prefix" = x; then
19411    # As a simple fix, exclude /usr/bin since it's not a real path.
19412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19414      # a path prefixed by /cygdrive for fixpath to work.
19415      new_path="$CYGWIN_ROOT_PATH$input_path"
19416    fi
19417  fi
19418
19419  # remove trailing .exe if any
19420  new_path="${new_path/%.exe/}"
19421
19422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19423
19424  # First separate the path from the arguments. This will split at the first
19425  # space.
19426  complete="$CC"
19427  path="${complete%% *}"
19428  tmp="$complete EOL"
19429  arguments="${tmp#* }"
19430
19431  # Input might be given as Windows format, start by converting to
19432  # unix format.
19433  new_path="$path"
19434
19435  windows_path="$new_path"
19436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19437    unix_path=`$CYGPATH -u "$windows_path"`
19438    new_path="$unix_path"
19439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19441    new_path="$unix_path"
19442  fi
19443
19444
19445  # Now try to locate executable using which
19446  new_path=`$WHICH "$new_path" 2> /dev/null`
19447
19448  if test "x$new_path" = x; then
19449    # Oops. Which didn't find the executable.
19450    # The splitting of arguments from the executable at a space might have been incorrect,
19451    # since paths with space are more likely in Windows. Give it another try with the whole
19452    # argument.
19453    path="$complete"
19454    arguments="EOL"
19455    new_path="$path"
19456
19457  windows_path="$new_path"
19458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19459    unix_path=`$CYGPATH -u "$windows_path"`
19460    new_path="$unix_path"
19461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19463    new_path="$unix_path"
19464  fi
19465
19466
19467    new_path=`$WHICH "$new_path" 2> /dev/null`
19468
19469    if test "x$new_path" = x; then
19470      # It's still not found. Now this is an unrecoverable error.
19471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19472$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19473      has_space=`$ECHO "$complete" | $GREP " "`
19474      if test "x$has_space" != x; then
19475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19477      fi
19478      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19479    fi
19480  fi
19481
19482  # Now new_path has a complete unix path to the binary
19483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19484    # Keep paths in /bin as-is, but remove trailing .exe if any
19485    new_path="${new_path/%.exe/}"
19486    # Do not save /bin paths to all_fixpath_prefixes!
19487  else
19488    # Not in mixed or Windows style, start by that.
19489    new_path=`cmd //c echo $new_path`
19490
19491  input_path="$new_path"
19492  # Check if we need to convert this using DOS-style short mode. If the path
19493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19494  # take no chances and rewrite it.
19495  # Note: m4 eats our [], so we need to use [ and ] instead.
19496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19497  if test "x$has_forbidden_chars" != x; then
19498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19500  fi
19501
19502    # Output is in $new_path
19503
19504  windows_path="$new_path"
19505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506    unix_path=`$CYGPATH -u "$windows_path"`
19507    new_path="$unix_path"
19508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19510    new_path="$unix_path"
19511  fi
19512
19513    # remove trailing .exe if any
19514    new_path="${new_path/%.exe/}"
19515
19516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19518  fi
19519
19520  else
19521    # We're on a posix platform. Hooray! :)
19522    # First separate the path from the arguments. This will split at the first
19523    # space.
19524    complete="$CC"
19525    path="${complete%% *}"
19526    tmp="$complete EOL"
19527    arguments="${tmp#* }"
19528
19529    # Cannot rely on the command "which" here since it doesn't always work.
19530    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19531    if test -z "$is_absolute_path"; then
19532      # Path to executable is not absolute. Find it.
19533      IFS_save="$IFS"
19534      IFS=:
19535      for p in $PATH; do
19536        if test -f "$p/$path" && test -x "$p/$path"; then
19537          new_path="$p/$path"
19538          break
19539        fi
19540      done
19541      IFS="$IFS_save"
19542    else
19543      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19544$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19545      new_path="$path"
19546    fi
19547
19548    if test "x$new_path" = x; then
19549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19550$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19551      has_space=`$ECHO "$complete" | $GREP " "`
19552      if test "x$has_space" != x; then
19553        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19555      fi
19556      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19557    fi
19558  fi
19559
19560  # Now join together the path and the arguments once again
19561  if test "x$arguments" != xEOL; then
19562    new_complete="$new_path ${arguments% *}"
19563  else
19564    new_complete="$new_path"
19565  fi
19566
19567  if test "x$complete" != "x$new_complete"; then
19568    CC="$new_complete"
19569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19570$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19571  fi
19572
19573  TEST_COMPILER="$CC"
19574  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19575  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19576  if test "x$OPENJDK_BUILD_OS" != xaix; then
19577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19578$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19579
19580  if test "x$OPENJDK_BUILD_OS" != xwindows; then
19581    # Follow a chain of symbolic links. Use readlink
19582    # where it exists, else fall back to horribly
19583    # complicated shell code.
19584    if test "x$READLINK_TESTED" != yes; then
19585      # On MacOSX there is a readlink tool with a different
19586      # purpose than the GNU readlink tool. Check the found readlink.
19587      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19588      if test "x$ISGNU" = x; then
19589        # A readlink that we do not know how to use.
19590        # Are there other non-GNU readlinks out there?
19591        READLINK_TESTED=yes
19592        READLINK=
19593      fi
19594    fi
19595
19596    if test "x$READLINK" != x; then
19597      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19598    else
19599      # Save the current directory for restoring afterwards
19600      STARTDIR=$PWD
19601      COUNTER=0
19602      sym_link_dir=`$DIRNAME $TEST_COMPILER`
19603      sym_link_file=`$BASENAME $TEST_COMPILER`
19604      cd $sym_link_dir
19605      # Use -P flag to resolve symlinks in directories.
19606      cd `$THEPWDCMD -P`
19607      sym_link_dir=`$THEPWDCMD -P`
19608      # Resolve file symlinks
19609      while test $COUNTER -lt 20; do
19610        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19611        if test "x$ISLINK" == x; then
19612          # This is not a symbolic link! We are done!
19613          break
19614        fi
19615        # Again resolve directory symlinks since the target of the just found
19616        # link could be in a different directory
19617        cd `$DIRNAME $ISLINK`
19618        sym_link_dir=`$THEPWDCMD -P`
19619        sym_link_file=`$BASENAME $ISLINK`
19620        let COUNTER=COUNTER+1
19621      done
19622      cd $STARTDIR
19623      TEST_COMPILER=$sym_link_dir/$sym_link_file
19624    fi
19625  fi
19626
19627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19628$as_echo "$TEST_COMPILER" >&6; }
19629  fi
19630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19631$as_echo_n "checking if CC is disguised ccache... " >&6; }
19632
19633  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19634  if test "x$COMPILER_BASENAME" = "xccache"; then
19635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19636$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19637    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19638    # We want to control ccache invocation ourselves, so ignore this cc and try
19639    # searching again.
19640
19641    # Remove the path to the fake ccache cc from the PATH
19642    RETRY_COMPILER_SAVED_PATH="$PATH"
19643    COMPILER_DIRNAME=`$DIRNAME $CC`
19644    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19645
19646    # Try again looking for our compiler
19647    if test -n "$ac_tool_prefix"; then
19648  for ac_prog in $COMPILER_CHECK_LIST
19649  do
19650    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19651set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19653$as_echo_n "checking for $ac_word... " >&6; }
19654if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19655  $as_echo_n "(cached) " >&6
19656else
19657  if test -n "$PROPER_COMPILER_CC"; then
19658  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19659else
19660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19661for as_dir in $PATH
19662do
19663  IFS=$as_save_IFS
19664  test -z "$as_dir" && as_dir=.
19665    for ac_exec_ext in '' $ac_executable_extensions; do
19666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19667    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19669    break 2
19670  fi
19671done
19672  done
19673IFS=$as_save_IFS
19674
19675fi
19676fi
19677PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19678if test -n "$PROPER_COMPILER_CC"; then
19679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19680$as_echo "$PROPER_COMPILER_CC" >&6; }
19681else
19682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19683$as_echo "no" >&6; }
19684fi
19685
19686
19687    test -n "$PROPER_COMPILER_CC" && break
19688  done
19689fi
19690if test -z "$PROPER_COMPILER_CC"; then
19691  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19692  for ac_prog in $COMPILER_CHECK_LIST
19693do
19694  # Extract the first word of "$ac_prog", so it can be a program name with args.
19695set dummy $ac_prog; ac_word=$2
19696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19697$as_echo_n "checking for $ac_word... " >&6; }
19698if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19699  $as_echo_n "(cached) " >&6
19700else
19701  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19702  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19703else
19704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19705for as_dir in $PATH
19706do
19707  IFS=$as_save_IFS
19708  test -z "$as_dir" && as_dir=.
19709    for ac_exec_ext in '' $ac_executable_extensions; do
19710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19711    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19713    break 2
19714  fi
19715done
19716  done
19717IFS=$as_save_IFS
19718
19719fi
19720fi
19721ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19722if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19724$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19725else
19726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19727$as_echo "no" >&6; }
19728fi
19729
19730
19731  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19732done
19733
19734  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19735    PROPER_COMPILER_CC=""
19736  else
19737    case $cross_compiling:$ac_tool_warned in
19738yes:)
19739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19741ac_tool_warned=yes ;;
19742esac
19743    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19744  fi
19745fi
19746
19747
19748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749
19750  # First separate the path from the arguments. This will split at the first
19751  # space.
19752  complete="$PROPER_COMPILER_CC"
19753  path="${complete%% *}"
19754  tmp="$complete EOL"
19755  arguments="${tmp#* }"
19756
19757  # Input might be given as Windows format, start by converting to
19758  # unix format.
19759  new_path=`$CYGPATH -u "$path"`
19760
19761  # Now try to locate executable using which
19762  new_path=`$WHICH "$new_path" 2> /dev/null`
19763  # bat and cmd files are not always considered executable in cygwin causing which
19764  # to not find them
19765  if test "x$new_path" = x \
19766      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19767      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19768    new_path=`$CYGPATH -u "$path"`
19769  fi
19770  if test "x$new_path" = x; then
19771    # Oops. Which didn't find the executable.
19772    # The splitting of arguments from the executable at a space might have been incorrect,
19773    # since paths with space are more likely in Windows. Give it another try with the whole
19774    # argument.
19775    path="$complete"
19776    arguments="EOL"
19777    new_path=`$CYGPATH -u "$path"`
19778    new_path=`$WHICH "$new_path" 2> /dev/null`
19779    # bat and cmd files are not always considered executable in cygwin causing which
19780    # to not find them
19781    if test "x$new_path" = x \
19782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19784      new_path=`$CYGPATH -u "$path"`
19785    fi
19786    if test "x$new_path" = x; then
19787      # It's still not found. Now this is an unrecoverable error.
19788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19789$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19790      has_space=`$ECHO "$complete" | $GREP " "`
19791      if test "x$has_space" != x; then
19792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19794      fi
19795      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19796    fi
19797  fi
19798
19799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19802  # "foo.exe" is OK but "foo" is an error.
19803  #
19804  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19805  # It is also a way to make sure we got the proper file name for the real test later on.
19806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19807  if test "x$test_shortpath" = x; then
19808    # Short path failed, file does not exist as specified.
19809    # Try adding .exe or .cmd
19810    if test -f "${new_path}.exe"; then
19811      input_to_shortpath="${new_path}.exe"
19812    elif test -f "${new_path}.cmd"; then
19813      input_to_shortpath="${new_path}.cmd"
19814    else
19815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19816$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19819      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19820    fi
19821  else
19822    input_to_shortpath="$new_path"
19823  fi
19824
19825  # Call helper function which possibly converts this using DOS-style short mode.
19826  # If so, the updated path is stored in $new_path.
19827  new_path="$input_to_shortpath"
19828
19829  input_path="$input_to_shortpath"
19830  # Check if we need to convert this using DOS-style short mode. If the path
19831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19832  # take no chances and rewrite it.
19833  # Note: m4 eats our [], so we need to use [ and ] instead.
19834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19835  if test "x$has_forbidden_chars" != x; then
19836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19840      # Going to short mode and back again did indeed matter. Since short mode is
19841      # case insensitive, let's make it lowercase to improve readability.
19842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19843      # Now convert it back to Unix-stile (cygpath)
19844      input_path=`$CYGPATH -u "$shortmode_path"`
19845      new_path="$input_path"
19846    fi
19847  fi
19848
19849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19850  if test "x$test_cygdrive_prefix" = x; then
19851    # As a simple fix, exclude /usr/bin since it's not a real path.
19852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19854      # a path prefixed by /cygdrive for fixpath to work.
19855      new_path="$CYGWIN_ROOT_PATH$input_path"
19856    fi
19857  fi
19858
19859  # remove trailing .exe if any
19860  new_path="${new_path/%.exe/}"
19861
19862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19863
19864  # First separate the path from the arguments. This will split at the first
19865  # space.
19866  complete="$PROPER_COMPILER_CC"
19867  path="${complete%% *}"
19868  tmp="$complete EOL"
19869  arguments="${tmp#* }"
19870
19871  # Input might be given as Windows format, start by converting to
19872  # unix format.
19873  new_path="$path"
19874
19875  windows_path="$new_path"
19876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19877    unix_path=`$CYGPATH -u "$windows_path"`
19878    new_path="$unix_path"
19879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19881    new_path="$unix_path"
19882  fi
19883
19884
19885  # Now try to locate executable using which
19886  new_path=`$WHICH "$new_path" 2> /dev/null`
19887
19888  if test "x$new_path" = x; then
19889    # Oops. Which didn't find the executable.
19890    # The splitting of arguments from the executable at a space might have been incorrect,
19891    # since paths with space are more likely in Windows. Give it another try with the whole
19892    # argument.
19893    path="$complete"
19894    arguments="EOL"
19895    new_path="$path"
19896
19897  windows_path="$new_path"
19898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19899    unix_path=`$CYGPATH -u "$windows_path"`
19900    new_path="$unix_path"
19901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19903    new_path="$unix_path"
19904  fi
19905
19906
19907    new_path=`$WHICH "$new_path" 2> /dev/null`
19908
19909    if test "x$new_path" = x; then
19910      # It's still not found. Now this is an unrecoverable error.
19911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19912$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19913      has_space=`$ECHO "$complete" | $GREP " "`
19914      if test "x$has_space" != x; then
19915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19917      fi
19918      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19919    fi
19920  fi
19921
19922  # Now new_path has a complete unix path to the binary
19923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19924    # Keep paths in /bin as-is, but remove trailing .exe if any
19925    new_path="${new_path/%.exe/}"
19926    # Do not save /bin paths to all_fixpath_prefixes!
19927  else
19928    # Not in mixed or Windows style, start by that.
19929    new_path=`cmd //c echo $new_path`
19930
19931  input_path="$new_path"
19932  # Check if we need to convert this using DOS-style short mode. If the path
19933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19934  # take no chances and rewrite it.
19935  # Note: m4 eats our [], so we need to use [ and ] instead.
19936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19937  if test "x$has_forbidden_chars" != x; then
19938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19940  fi
19941
19942    # Output is in $new_path
19943
19944  windows_path="$new_path"
19945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19946    unix_path=`$CYGPATH -u "$windows_path"`
19947    new_path="$unix_path"
19948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19950    new_path="$unix_path"
19951  fi
19952
19953    # remove trailing .exe if any
19954    new_path="${new_path/%.exe/}"
19955
19956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19958  fi
19959
19960  else
19961    # We're on a posix platform. Hooray! :)
19962    # First separate the path from the arguments. This will split at the first
19963    # space.
19964    complete="$PROPER_COMPILER_CC"
19965    path="${complete%% *}"
19966    tmp="$complete EOL"
19967    arguments="${tmp#* }"
19968
19969    # Cannot rely on the command "which" here since it doesn't always work.
19970    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19971    if test -z "$is_absolute_path"; then
19972      # Path to executable is not absolute. Find it.
19973      IFS_save="$IFS"
19974      IFS=:
19975      for p in $PATH; do
19976        if test -f "$p/$path" && test -x "$p/$path"; then
19977          new_path="$p/$path"
19978          break
19979        fi
19980      done
19981      IFS="$IFS_save"
19982    else
19983      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19984$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19985      new_path="$path"
19986    fi
19987
19988    if test "x$new_path" = x; then
19989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19990$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19991      has_space=`$ECHO "$complete" | $GREP " "`
19992      if test "x$has_space" != x; then
19993        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19995      fi
19996      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19997    fi
19998  fi
19999
20000  # Now join together the path and the arguments once again
20001  if test "x$arguments" != xEOL; then
20002    new_complete="$new_path ${arguments% *}"
20003  else
20004    new_complete="$new_path"
20005  fi
20006
20007  if test "x$complete" != "x$new_complete"; then
20008    PROPER_COMPILER_CC="$new_complete"
20009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20010$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20011  fi
20012
20013    PATH="$RETRY_COMPILER_SAVED_PATH"
20014
20015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20016$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20017
20018  if test "x$OPENJDK_BUILD_OS" != xwindows; then
20019    # Follow a chain of symbolic links. Use readlink
20020    # where it exists, else fall back to horribly
20021    # complicated shell code.
20022    if test "x$READLINK_TESTED" != yes; then
20023      # On MacOSX there is a readlink tool with a different
20024      # purpose than the GNU readlink tool. Check the found readlink.
20025      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20026      if test "x$ISGNU" = x; then
20027        # A readlink that we do not know how to use.
20028        # Are there other non-GNU readlinks out there?
20029        READLINK_TESTED=yes
20030        READLINK=
20031      fi
20032    fi
20033
20034    if test "x$READLINK" != x; then
20035      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20036    else
20037      # Save the current directory for restoring afterwards
20038      STARTDIR=$PWD
20039      COUNTER=0
20040      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20041      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20042      cd $sym_link_dir
20043      # Use -P flag to resolve symlinks in directories.
20044      cd `$THEPWDCMD -P`
20045      sym_link_dir=`$THEPWDCMD -P`
20046      # Resolve file symlinks
20047      while test $COUNTER -lt 20; do
20048        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20049        if test "x$ISLINK" == x; then
20050          # This is not a symbolic link! We are done!
20051          break
20052        fi
20053        # Again resolve directory symlinks since the target of the just found
20054        # link could be in a different directory
20055        cd `$DIRNAME $ISLINK`
20056        sym_link_dir=`$THEPWDCMD -P`
20057        sym_link_file=`$BASENAME $ISLINK`
20058        let COUNTER=COUNTER+1
20059      done
20060      cd $STARTDIR
20061      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20062    fi
20063  fi
20064
20065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20066$as_echo "$PROPER_COMPILER_CC" >&6; }
20067    CC="$PROPER_COMPILER_CC"
20068  else
20069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20070$as_echo "no, keeping CC" >&6; }
20071    CC="$TEST_COMPILER"
20072  fi
20073
20074  COMPILER=$CC
20075  COMPILER_NAME=$COMPILER_NAME
20076
20077  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20078    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20079    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20080    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20081    if test $? -ne 0; then
20082      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20083
20084      { $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
20085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20087$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20088      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20089    else
20090      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20091      COMPILER_VENDOR="Sun Studio"
20092    fi
20093  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20094      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20095      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20096      if test $? -ne 0; then
20097        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20098      else
20099        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20100        COMPILER_VENDOR='IBM'
20101      fi
20102  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20103    # First line typically looks something like:
20104    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20105    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20106    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20107    COMPILER_VENDOR="Microsoft CL.EXE"
20108    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20109    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20110      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20111        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20112      fi
20113    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20114      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20115        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20116      fi
20117    fi
20118  else
20119    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20120    # Check that this is likely to be GCC.
20121    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20122    if test $? -ne 0; then
20123      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20124$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20125      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20126$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20127      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20128    fi
20129
20130    # First line typically looks something like:
20131    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20132    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20133    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20134  fi
20135  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20136  CC_VERSION="$COMPILER_VERSION"
20137  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20138  CC_VENDOR="$COMPILER_VENDOR"
20139
20140  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20141$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20142
20143
20144  # Now that we have resolved CC ourself, let autoconf have its go at it
20145  ac_ext=c
20146ac_cpp='$CPP $CPPFLAGS'
20147ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20148ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20149ac_compiler_gnu=$ac_cv_c_compiler_gnu
20150if test -n "$ac_tool_prefix"; then
20151  for ac_prog in $CC
20152  do
20153    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20154set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20156$as_echo_n "checking for $ac_word... " >&6; }
20157if ${ac_cv_prog_CC+:} false; then :
20158  $as_echo_n "(cached) " >&6
20159else
20160  if test -n "$CC"; then
20161  ac_cv_prog_CC="$CC" # Let the user override the test.
20162else
20163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20164for as_dir in $PATH
20165do
20166  IFS=$as_save_IFS
20167  test -z "$as_dir" && as_dir=.
20168    for ac_exec_ext in '' $ac_executable_extensions; do
20169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20170    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20172    break 2
20173  fi
20174done
20175  done
20176IFS=$as_save_IFS
20177
20178fi
20179fi
20180CC=$ac_cv_prog_CC
20181if test -n "$CC"; then
20182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20183$as_echo "$CC" >&6; }
20184else
20185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186$as_echo "no" >&6; }
20187fi
20188
20189
20190    test -n "$CC" && break
20191  done
20192fi
20193if test -z "$CC"; then
20194  ac_ct_CC=$CC
20195  for ac_prog in $CC
20196do
20197  # Extract the first word of "$ac_prog", so it can be a program name with args.
20198set dummy $ac_prog; ac_word=$2
20199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20200$as_echo_n "checking for $ac_word... " >&6; }
20201if ${ac_cv_prog_ac_ct_CC+:} false; then :
20202  $as_echo_n "(cached) " >&6
20203else
20204  if test -n "$ac_ct_CC"; then
20205  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20206else
20207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20208for as_dir in $PATH
20209do
20210  IFS=$as_save_IFS
20211  test -z "$as_dir" && as_dir=.
20212    for ac_exec_ext in '' $ac_executable_extensions; do
20213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20214    ac_cv_prog_ac_ct_CC="$ac_prog"
20215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20216    break 2
20217  fi
20218done
20219  done
20220IFS=$as_save_IFS
20221
20222fi
20223fi
20224ac_ct_CC=$ac_cv_prog_ac_ct_CC
20225if test -n "$ac_ct_CC"; then
20226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20227$as_echo "$ac_ct_CC" >&6; }
20228else
20229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20230$as_echo "no" >&6; }
20231fi
20232
20233
20234  test -n "$ac_ct_CC" && break
20235done
20236
20237  if test "x$ac_ct_CC" = x; then
20238    CC=""
20239  else
20240    case $cross_compiling:$ac_tool_warned in
20241yes:)
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20244ac_tool_warned=yes ;;
20245esac
20246    CC=$ac_ct_CC
20247  fi
20248fi
20249
20250
20251test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20253as_fn_error $? "no acceptable C compiler found in \$PATH
20254See \`config.log' for more details" "$LINENO" 5; }
20255
20256# Provide some information about the compiler.
20257$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20258set X $ac_compile
20259ac_compiler=$2
20260for ac_option in --version -v -V -qversion; do
20261  { { ac_try="$ac_compiler $ac_option >&5"
20262case "(($ac_try" in
20263  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20264  *) ac_try_echo=$ac_try;;
20265esac
20266eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20267$as_echo "$ac_try_echo"; } >&5
20268  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20269  ac_status=$?
20270  if test -s conftest.err; then
20271    sed '10a\
20272... rest of stderr output deleted ...
20273         10q' conftest.err >conftest.er1
20274    cat conftest.er1 >&5
20275  fi
20276  rm -f conftest.er1 conftest.err
20277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20278  test $ac_status = 0; }
20279done
20280
20281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20282/* end confdefs.h.  */
20283
20284int
20285main ()
20286{
20287
20288  ;
20289  return 0;
20290}
20291_ACEOF
20292ac_clean_files_save=$ac_clean_files
20293ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20294# Try to create an executable without -o first, disregard a.out.
20295# It will help us diagnose broken compilers, and finding out an intuition
20296# of exeext.
20297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20298$as_echo_n "checking whether the C compiler works... " >&6; }
20299ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20300
20301# The possible output files:
20302ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20303
20304ac_rmfiles=
20305for ac_file in $ac_files
20306do
20307  case $ac_file in
20308    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20309    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20310  esac
20311done
20312rm -f $ac_rmfiles
20313
20314if { { ac_try="$ac_link_default"
20315case "(($ac_try" in
20316  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20317  *) ac_try_echo=$ac_try;;
20318esac
20319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20320$as_echo "$ac_try_echo"; } >&5
20321  (eval "$ac_link_default") 2>&5
20322  ac_status=$?
20323  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20324  test $ac_status = 0; }; then :
20325  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20326# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20327# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20328# so that the user can short-circuit this test for compilers unknown to
20329# Autoconf.
20330for ac_file in $ac_files ''
20331do
20332  test -f "$ac_file" || continue
20333  case $ac_file in
20334    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20335	;;
20336    [ab].out )
20337	# We found the default executable, but exeext='' is most
20338	# certainly right.
20339	break;;
20340    *.* )
20341	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20342	then :; else
20343	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20344	fi
20345	# We set ac_cv_exeext here because the later test for it is not
20346	# safe: cross compilers may not add the suffix if given an `-o'
20347	# argument, so we may need to know it at that point already.
20348	# Even if this section looks crufty: it has the advantage of
20349	# actually working.
20350	break;;
20351    * )
20352	break;;
20353  esac
20354done
20355test "$ac_cv_exeext" = no && ac_cv_exeext=
20356
20357else
20358  ac_file=''
20359fi
20360if test -z "$ac_file"; then :
20361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20362$as_echo "no" >&6; }
20363$as_echo "$as_me: failed program was:" >&5
20364sed 's/^/| /' conftest.$ac_ext >&5
20365
20366{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20368as_fn_error 77 "C compiler cannot create executables
20369See \`config.log' for more details" "$LINENO" 5; }
20370else
20371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20372$as_echo "yes" >&6; }
20373fi
20374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20375$as_echo_n "checking for C compiler default output file name... " >&6; }
20376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20377$as_echo "$ac_file" >&6; }
20378ac_exeext=$ac_cv_exeext
20379
20380rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20381ac_clean_files=$ac_clean_files_save
20382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20383$as_echo_n "checking for suffix of executables... " >&6; }
20384if { { ac_try="$ac_link"
20385case "(($ac_try" in
20386  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20387  *) ac_try_echo=$ac_try;;
20388esac
20389eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20390$as_echo "$ac_try_echo"; } >&5
20391  (eval "$ac_link") 2>&5
20392  ac_status=$?
20393  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20394  test $ac_status = 0; }; then :
20395  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20396# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20397# work properly (i.e., refer to `conftest.exe'), while it won't with
20398# `rm'.
20399for ac_file in conftest.exe conftest conftest.*; do
20400  test -f "$ac_file" || continue
20401  case $ac_file in
20402    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20403    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20404	  break;;
20405    * ) break;;
20406  esac
20407done
20408else
20409  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20411as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20412See \`config.log' for more details" "$LINENO" 5; }
20413fi
20414rm -f conftest conftest$ac_cv_exeext
20415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20416$as_echo "$ac_cv_exeext" >&6; }
20417
20418rm -f conftest.$ac_ext
20419EXEEXT=$ac_cv_exeext
20420ac_exeext=$EXEEXT
20421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20422/* end confdefs.h.  */
20423#include <stdio.h>
20424int
20425main ()
20426{
20427FILE *f = fopen ("conftest.out", "w");
20428 return ferror (f) || fclose (f) != 0;
20429
20430  ;
20431  return 0;
20432}
20433_ACEOF
20434ac_clean_files="$ac_clean_files conftest.out"
20435# Check that the compiler produces executables we can run.  If not, either
20436# the compiler is broken, or we cross compile.
20437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20438$as_echo_n "checking whether we are cross compiling... " >&6; }
20439if test "$cross_compiling" != yes; then
20440  { { ac_try="$ac_link"
20441case "(($ac_try" in
20442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20443  *) ac_try_echo=$ac_try;;
20444esac
20445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20446$as_echo "$ac_try_echo"; } >&5
20447  (eval "$ac_link") 2>&5
20448  ac_status=$?
20449  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20450  test $ac_status = 0; }
20451  if { ac_try='./conftest$ac_cv_exeext'
20452  { { case "(($ac_try" in
20453  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20454  *) ac_try_echo=$ac_try;;
20455esac
20456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20457$as_echo "$ac_try_echo"; } >&5
20458  (eval "$ac_try") 2>&5
20459  ac_status=$?
20460  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20461  test $ac_status = 0; }; }; then
20462    cross_compiling=no
20463  else
20464    if test "$cross_compiling" = maybe; then
20465	cross_compiling=yes
20466    else
20467	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20469as_fn_error $? "cannot run C compiled programs.
20470If you meant to cross compile, use \`--host'.
20471See \`config.log' for more details" "$LINENO" 5; }
20472    fi
20473  fi
20474fi
20475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20476$as_echo "$cross_compiling" >&6; }
20477
20478rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20479ac_clean_files=$ac_clean_files_save
20480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20481$as_echo_n "checking for suffix of object files... " >&6; }
20482if ${ac_cv_objext+:} false; then :
20483  $as_echo_n "(cached) " >&6
20484else
20485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20486/* end confdefs.h.  */
20487
20488int
20489main ()
20490{
20491
20492  ;
20493  return 0;
20494}
20495_ACEOF
20496rm -f conftest.o conftest.obj
20497if { { ac_try="$ac_compile"
20498case "(($ac_try" in
20499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20500  *) ac_try_echo=$ac_try;;
20501esac
20502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20503$as_echo "$ac_try_echo"; } >&5
20504  (eval "$ac_compile") 2>&5
20505  ac_status=$?
20506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20507  test $ac_status = 0; }; then :
20508  for ac_file in conftest.o conftest.obj conftest.*; do
20509  test -f "$ac_file" || continue;
20510  case $ac_file in
20511    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20512    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20513       break;;
20514  esac
20515done
20516else
20517  $as_echo "$as_me: failed program was:" >&5
20518sed 's/^/| /' conftest.$ac_ext >&5
20519
20520{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20521$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20522as_fn_error $? "cannot compute suffix of object files: cannot compile
20523See \`config.log' for more details" "$LINENO" 5; }
20524fi
20525rm -f conftest.$ac_cv_objext conftest.$ac_ext
20526fi
20527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20528$as_echo "$ac_cv_objext" >&6; }
20529OBJEXT=$ac_cv_objext
20530ac_objext=$OBJEXT
20531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20532$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20533if ${ac_cv_c_compiler_gnu+:} false; then :
20534  $as_echo_n "(cached) " >&6
20535else
20536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20537/* end confdefs.h.  */
20538
20539int
20540main ()
20541{
20542#ifndef __GNUC__
20543       choke me
20544#endif
20545
20546  ;
20547  return 0;
20548}
20549_ACEOF
20550if ac_fn_c_try_compile "$LINENO"; then :
20551  ac_compiler_gnu=yes
20552else
20553  ac_compiler_gnu=no
20554fi
20555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20556ac_cv_c_compiler_gnu=$ac_compiler_gnu
20557
20558fi
20559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20560$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20561if test $ac_compiler_gnu = yes; then
20562  GCC=yes
20563else
20564  GCC=
20565fi
20566ac_test_CFLAGS=${CFLAGS+set}
20567ac_save_CFLAGS=$CFLAGS
20568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20569$as_echo_n "checking whether $CC accepts -g... " >&6; }
20570if ${ac_cv_prog_cc_g+:} false; then :
20571  $as_echo_n "(cached) " >&6
20572else
20573  ac_save_c_werror_flag=$ac_c_werror_flag
20574   ac_c_werror_flag=yes
20575   ac_cv_prog_cc_g=no
20576   CFLAGS="-g"
20577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20578/* end confdefs.h.  */
20579
20580int
20581main ()
20582{
20583
20584  ;
20585  return 0;
20586}
20587_ACEOF
20588if ac_fn_c_try_compile "$LINENO"; then :
20589  ac_cv_prog_cc_g=yes
20590else
20591  CFLAGS=""
20592      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20593/* end confdefs.h.  */
20594
20595int
20596main ()
20597{
20598
20599  ;
20600  return 0;
20601}
20602_ACEOF
20603if ac_fn_c_try_compile "$LINENO"; then :
20604
20605else
20606  ac_c_werror_flag=$ac_save_c_werror_flag
20607	 CFLAGS="-g"
20608	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609/* end confdefs.h.  */
20610
20611int
20612main ()
20613{
20614
20615  ;
20616  return 0;
20617}
20618_ACEOF
20619if ac_fn_c_try_compile "$LINENO"; then :
20620  ac_cv_prog_cc_g=yes
20621fi
20622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20623fi
20624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20625fi
20626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20627   ac_c_werror_flag=$ac_save_c_werror_flag
20628fi
20629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20630$as_echo "$ac_cv_prog_cc_g" >&6; }
20631if test "$ac_test_CFLAGS" = set; then
20632  CFLAGS=$ac_save_CFLAGS
20633elif test $ac_cv_prog_cc_g = yes; then
20634  if test "$GCC" = yes; then
20635    CFLAGS="-g -O2"
20636  else
20637    CFLAGS="-g"
20638  fi
20639else
20640  if test "$GCC" = yes; then
20641    CFLAGS="-O2"
20642  else
20643    CFLAGS=
20644  fi
20645fi
20646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20647$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20648if ${ac_cv_prog_cc_c89+:} false; then :
20649  $as_echo_n "(cached) " >&6
20650else
20651  ac_cv_prog_cc_c89=no
20652ac_save_CC=$CC
20653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20654/* end confdefs.h.  */
20655#include <stdarg.h>
20656#include <stdio.h>
20657struct stat;
20658/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20659struct buf { int x; };
20660FILE * (*rcsopen) (struct buf *, struct stat *, int);
20661static char *e (p, i)
20662     char **p;
20663     int i;
20664{
20665  return p[i];
20666}
20667static char *f (char * (*g) (char **, int), char **p, ...)
20668{
20669  char *s;
20670  va_list v;
20671  va_start (v,p);
20672  s = g (p, va_arg (v,int));
20673  va_end (v);
20674  return s;
20675}
20676
20677/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20678   function prototypes and stuff, but not '\xHH' hex character constants.
20679   These don't provoke an error unfortunately, instead are silently treated
20680   as 'x'.  The following induces an error, until -std is added to get
20681   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20682   array size at least.  It's necessary to write '\x00'==0 to get something
20683   that's true only with -std.  */
20684int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20685
20686/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20687   inside strings and character constants.  */
20688#define FOO(x) 'x'
20689int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20690
20691int test (int i, double x);
20692struct s1 {int (*f) (int a);};
20693struct s2 {int (*f) (double a);};
20694int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20695int argc;
20696char **argv;
20697int
20698main ()
20699{
20700return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20701  ;
20702  return 0;
20703}
20704_ACEOF
20705for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20706	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20707do
20708  CC="$ac_save_CC $ac_arg"
20709  if ac_fn_c_try_compile "$LINENO"; then :
20710  ac_cv_prog_cc_c89=$ac_arg
20711fi
20712rm -f core conftest.err conftest.$ac_objext
20713  test "x$ac_cv_prog_cc_c89" != "xno" && break
20714done
20715rm -f conftest.$ac_ext
20716CC=$ac_save_CC
20717
20718fi
20719# AC_CACHE_VAL
20720case "x$ac_cv_prog_cc_c89" in
20721  x)
20722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20723$as_echo "none needed" >&6; } ;;
20724  xno)
20725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20726$as_echo "unsupported" >&6; } ;;
20727  *)
20728    CC="$CC $ac_cv_prog_cc_c89"
20729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20730$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20731esac
20732if test "x$ac_cv_prog_cc_c89" != xno; then :
20733
20734fi
20735
20736ac_ext=cpp
20737ac_cpp='$CXXCPP $CPPFLAGS'
20738ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20739ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20740ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20741
20742
20743  # Option used to tell the compiler whether to create 32- or 64-bit executables
20744  # Notice that CC contains the full compiler path at this point.
20745  case $CC in
20746    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20747    *)      COMPILER_TARGET_BITS_FLAG="-m";;
20748  esac
20749
20750
20751  ### Locate C++ compiler (CXX)
20752
20753  if test "x$CXX" != x; then
20754    COMPILER_CHECK_LIST="$CXX"
20755  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20756    COMPILER_CHECK_LIST="cl"
20757  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20758    COMPILER_CHECK_LIST="CC g++"
20759  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20760    # Do not probe for CC on AIX .
20761    COMPILER_CHECK_LIST="xlC_r"
20762  else
20763    COMPILER_CHECK_LIST="g++ CC"
20764  fi
20765
20766
20767  COMPILER_NAME=C++
20768
20769  CXX=
20770  # If TOOLS_DIR is set, check for all compiler names in there first
20771  # before checking the rest of the PATH.
20772  if test -n "$TOOLS_DIR"; then
20773    PATH_save="$PATH"
20774    PATH="$TOOLS_DIR"
20775    for ac_prog in $COMPILER_CHECK_LIST
20776do
20777  # Extract the first word of "$ac_prog", so it can be a program name with args.
20778set dummy $ac_prog; ac_word=$2
20779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20780$as_echo_n "checking for $ac_word... " >&6; }
20781if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20782  $as_echo_n "(cached) " >&6
20783else
20784  case $TOOLS_DIR_CXX in
20785  [\\/]* | ?:[\\/]*)
20786  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20787  ;;
20788  *)
20789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20790for as_dir in $PATH
20791do
20792  IFS=$as_save_IFS
20793  test -z "$as_dir" && as_dir=.
20794    for ac_exec_ext in '' $ac_executable_extensions; do
20795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20796    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20798    break 2
20799  fi
20800done
20801  done
20802IFS=$as_save_IFS
20803
20804  ;;
20805esac
20806fi
20807TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20808if test -n "$TOOLS_DIR_CXX"; then
20809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20810$as_echo "$TOOLS_DIR_CXX" >&6; }
20811else
20812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20813$as_echo "no" >&6; }
20814fi
20815
20816
20817  test -n "$TOOLS_DIR_CXX" && break
20818done
20819
20820    CXX=$TOOLS_DIR_CXX
20821    PATH="$PATH_save"
20822  fi
20823
20824  # AC_PATH_PROGS can't be run multiple times with the same variable,
20825  # so create a new name for this run.
20826  if test "x$CXX" = x; then
20827    for ac_prog in $COMPILER_CHECK_LIST
20828do
20829  # Extract the first word of "$ac_prog", so it can be a program name with args.
20830set dummy $ac_prog; ac_word=$2
20831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20832$as_echo_n "checking for $ac_word... " >&6; }
20833if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20834  $as_echo_n "(cached) " >&6
20835else
20836  case $POTENTIAL_CXX in
20837  [\\/]* | ?:[\\/]*)
20838  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20839  ;;
20840  *)
20841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20842for as_dir in $PATH
20843do
20844  IFS=$as_save_IFS
20845  test -z "$as_dir" && as_dir=.
20846    for ac_exec_ext in '' $ac_executable_extensions; do
20847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20848    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20850    break 2
20851  fi
20852done
20853  done
20854IFS=$as_save_IFS
20855
20856  ;;
20857esac
20858fi
20859POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20860if test -n "$POTENTIAL_CXX"; then
20861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20862$as_echo "$POTENTIAL_CXX" >&6; }
20863else
20864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20865$as_echo "no" >&6; }
20866fi
20867
20868
20869  test -n "$POTENTIAL_CXX" && break
20870done
20871
20872    CXX=$POTENTIAL_CXX
20873  fi
20874
20875  if test "x$CXX" = x; then
20876
20877  # Print a helpful message on how to acquire the necessary build dependency.
20878  # devkit is the help tag: freetype, cups, pulse, alsa etc
20879  MISSING_DEPENDENCY=devkit
20880
20881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20882    cygwin_help $MISSING_DEPENDENCY
20883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20884    msys_help $MISSING_DEPENDENCY
20885  else
20886    PKGHANDLER_COMMAND=
20887
20888    case $PKGHANDLER in
20889      apt-get)
20890        apt_help     $MISSING_DEPENDENCY ;;
20891      yum)
20892        yum_help     $MISSING_DEPENDENCY ;;
20893      port)
20894        port_help    $MISSING_DEPENDENCY ;;
20895      pkgutil)
20896        pkgutil_help $MISSING_DEPENDENCY ;;
20897      pkgadd)
20898        pkgadd_help  $MISSING_DEPENDENCY ;;
20899    esac
20900
20901    if test "x$PKGHANDLER_COMMAND" != x; then
20902      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20903    fi
20904  fi
20905
20906    as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20907  fi
20908
20909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20910
20911  # First separate the path from the arguments. This will split at the first
20912  # space.
20913  complete="$CXX"
20914  path="${complete%% *}"
20915  tmp="$complete EOL"
20916  arguments="${tmp#* }"
20917
20918  # Input might be given as Windows format, start by converting to
20919  # unix format.
20920  new_path=`$CYGPATH -u "$path"`
20921
20922  # Now try to locate executable using which
20923  new_path=`$WHICH "$new_path" 2> /dev/null`
20924  # bat and cmd files are not always considered executable in cygwin causing which
20925  # to not find them
20926  if test "x$new_path" = x \
20927      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20928      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20929    new_path=`$CYGPATH -u "$path"`
20930  fi
20931  if test "x$new_path" = x; then
20932    # Oops. Which didn't find the executable.
20933    # The splitting of arguments from the executable at a space might have been incorrect,
20934    # since paths with space are more likely in Windows. Give it another try with the whole
20935    # argument.
20936    path="$complete"
20937    arguments="EOL"
20938    new_path=`$CYGPATH -u "$path"`
20939    new_path=`$WHICH "$new_path" 2> /dev/null`
20940    # bat and cmd files are not always considered executable in cygwin causing which
20941    # to not find them
20942    if test "x$new_path" = x \
20943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20945      new_path=`$CYGPATH -u "$path"`
20946    fi
20947    if test "x$new_path" = x; then
20948      # It's still not found. Now this is an unrecoverable error.
20949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20950$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20951      has_space=`$ECHO "$complete" | $GREP " "`
20952      if test "x$has_space" != x; then
20953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20955      fi
20956      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20957    fi
20958  fi
20959
20960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20963  # "foo.exe" is OK but "foo" is an error.
20964  #
20965  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20966  # It is also a way to make sure we got the proper file name for the real test later on.
20967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20968  if test "x$test_shortpath" = x; then
20969    # Short path failed, file does not exist as specified.
20970    # Try adding .exe or .cmd
20971    if test -f "${new_path}.exe"; then
20972      input_to_shortpath="${new_path}.exe"
20973    elif test -f "${new_path}.cmd"; then
20974      input_to_shortpath="${new_path}.cmd"
20975    else
20976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20977$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20978      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20979$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20980      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20981    fi
20982  else
20983    input_to_shortpath="$new_path"
20984  fi
20985
20986  # Call helper function which possibly converts this using DOS-style short mode.
20987  # If so, the updated path is stored in $new_path.
20988  new_path="$input_to_shortpath"
20989
20990  input_path="$input_to_shortpath"
20991  # Check if we need to convert this using DOS-style short mode. If the path
20992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20993  # take no chances and rewrite it.
20994  # Note: m4 eats our [], so we need to use [ and ] instead.
20995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20996  if test "x$has_forbidden_chars" != x; then
20997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21001      # Going to short mode and back again did indeed matter. Since short mode is
21002      # case insensitive, let's make it lowercase to improve readability.
21003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21004      # Now convert it back to Unix-stile (cygpath)
21005      input_path=`$CYGPATH -u "$shortmode_path"`
21006      new_path="$input_path"
21007    fi
21008  fi
21009
21010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21011  if test "x$test_cygdrive_prefix" = x; then
21012    # As a simple fix, exclude /usr/bin since it's not a real path.
21013    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21015      # a path prefixed by /cygdrive for fixpath to work.
21016      new_path="$CYGWIN_ROOT_PATH$input_path"
21017    fi
21018  fi
21019
21020  # remove trailing .exe if any
21021  new_path="${new_path/%.exe/}"
21022
21023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21024
21025  # First separate the path from the arguments. This will split at the first
21026  # space.
21027  complete="$CXX"
21028  path="${complete%% *}"
21029  tmp="$complete EOL"
21030  arguments="${tmp#* }"
21031
21032  # Input might be given as Windows format, start by converting to
21033  # unix format.
21034  new_path="$path"
21035
21036  windows_path="$new_path"
21037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21038    unix_path=`$CYGPATH -u "$windows_path"`
21039    new_path="$unix_path"
21040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21042    new_path="$unix_path"
21043  fi
21044
21045
21046  # Now try to locate executable using which
21047  new_path=`$WHICH "$new_path" 2> /dev/null`
21048
21049  if test "x$new_path" = x; then
21050    # Oops. Which didn't find the executable.
21051    # The splitting of arguments from the executable at a space might have been incorrect,
21052    # since paths with space are more likely in Windows. Give it another try with the whole
21053    # argument.
21054    path="$complete"
21055    arguments="EOL"
21056    new_path="$path"
21057
21058  windows_path="$new_path"
21059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21060    unix_path=`$CYGPATH -u "$windows_path"`
21061    new_path="$unix_path"
21062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21064    new_path="$unix_path"
21065  fi
21066
21067
21068    new_path=`$WHICH "$new_path" 2> /dev/null`
21069
21070    if test "x$new_path" = x; then
21071      # It's still not found. Now this is an unrecoverable error.
21072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21073$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21074      has_space=`$ECHO "$complete" | $GREP " "`
21075      if test "x$has_space" != x; then
21076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21078      fi
21079      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21080    fi
21081  fi
21082
21083  # Now new_path has a complete unix path to the binary
21084  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21085    # Keep paths in /bin as-is, but remove trailing .exe if any
21086    new_path="${new_path/%.exe/}"
21087    # Do not save /bin paths to all_fixpath_prefixes!
21088  else
21089    # Not in mixed or Windows style, start by that.
21090    new_path=`cmd //c echo $new_path`
21091
21092  input_path="$new_path"
21093  # Check if we need to convert this using DOS-style short mode. If the path
21094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21095  # take no chances and rewrite it.
21096  # Note: m4 eats our [], so we need to use [ and ] instead.
21097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21098  if test "x$has_forbidden_chars" != x; then
21099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21101  fi
21102
21103    # Output is in $new_path
21104
21105  windows_path="$new_path"
21106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21107    unix_path=`$CYGPATH -u "$windows_path"`
21108    new_path="$unix_path"
21109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21111    new_path="$unix_path"
21112  fi
21113
21114    # remove trailing .exe if any
21115    new_path="${new_path/%.exe/}"
21116
21117    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21118    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21119  fi
21120
21121  else
21122    # We're on a posix platform. Hooray! :)
21123    # First separate the path from the arguments. This will split at the first
21124    # space.
21125    complete="$CXX"
21126    path="${complete%% *}"
21127    tmp="$complete EOL"
21128    arguments="${tmp#* }"
21129
21130    # Cannot rely on the command "which" here since it doesn't always work.
21131    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21132    if test -z "$is_absolute_path"; then
21133      # Path to executable is not absolute. Find it.
21134      IFS_save="$IFS"
21135      IFS=:
21136      for p in $PATH; do
21137        if test -f "$p/$path" && test -x "$p/$path"; then
21138          new_path="$p/$path"
21139          break
21140        fi
21141      done
21142      IFS="$IFS_save"
21143    else
21144      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21145$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21146      new_path="$path"
21147    fi
21148
21149    if test "x$new_path" = x; then
21150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21151$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21152      has_space=`$ECHO "$complete" | $GREP " "`
21153      if test "x$has_space" != x; then
21154        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21155$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21156      fi
21157      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21158    fi
21159  fi
21160
21161  # Now join together the path and the arguments once again
21162  if test "x$arguments" != xEOL; then
21163    new_complete="$new_path ${arguments% *}"
21164  else
21165    new_complete="$new_path"
21166  fi
21167
21168  if test "x$complete" != "x$new_complete"; then
21169    CXX="$new_complete"
21170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21171$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21172  fi
21173
21174  TEST_COMPILER="$CXX"
21175  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21176  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21177  if test "x$OPENJDK_BUILD_OS" != xaix; then
21178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21179$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21180
21181  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21182    # Follow a chain of symbolic links. Use readlink
21183    # where it exists, else fall back to horribly
21184    # complicated shell code.
21185    if test "x$READLINK_TESTED" != yes; then
21186      # On MacOSX there is a readlink tool with a different
21187      # purpose than the GNU readlink tool. Check the found readlink.
21188      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21189      if test "x$ISGNU" = x; then
21190        # A readlink that we do not know how to use.
21191        # Are there other non-GNU readlinks out there?
21192        READLINK_TESTED=yes
21193        READLINK=
21194      fi
21195    fi
21196
21197    if test "x$READLINK" != x; then
21198      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21199    else
21200      # Save the current directory for restoring afterwards
21201      STARTDIR=$PWD
21202      COUNTER=0
21203      sym_link_dir=`$DIRNAME $TEST_COMPILER`
21204      sym_link_file=`$BASENAME $TEST_COMPILER`
21205      cd $sym_link_dir
21206      # Use -P flag to resolve symlinks in directories.
21207      cd `$THEPWDCMD -P`
21208      sym_link_dir=`$THEPWDCMD -P`
21209      # Resolve file symlinks
21210      while test $COUNTER -lt 20; do
21211        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21212        if test "x$ISLINK" == x; then
21213          # This is not a symbolic link! We are done!
21214          break
21215        fi
21216        # Again resolve directory symlinks since the target of the just found
21217        # link could be in a different directory
21218        cd `$DIRNAME $ISLINK`
21219        sym_link_dir=`$THEPWDCMD -P`
21220        sym_link_file=`$BASENAME $ISLINK`
21221        let COUNTER=COUNTER+1
21222      done
21223      cd $STARTDIR
21224      TEST_COMPILER=$sym_link_dir/$sym_link_file
21225    fi
21226  fi
21227
21228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21229$as_echo "$TEST_COMPILER" >&6; }
21230  fi
21231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21232$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21233
21234  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21235  if test "x$COMPILER_BASENAME" = "xccache"; then
21236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21237$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21238    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21239    # We want to control ccache invocation ourselves, so ignore this cc and try
21240    # searching again.
21241
21242    # Remove the path to the fake ccache cc from the PATH
21243    RETRY_COMPILER_SAVED_PATH="$PATH"
21244    COMPILER_DIRNAME=`$DIRNAME $CXX`
21245    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21246
21247    # Try again looking for our compiler
21248    if test -n "$ac_tool_prefix"; then
21249  for ac_prog in $COMPILER_CHECK_LIST
21250  do
21251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21254$as_echo_n "checking for $ac_word... " >&6; }
21255if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21256  $as_echo_n "(cached) " >&6
21257else
21258  if test -n "$PROPER_COMPILER_CXX"; then
21259  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21260else
21261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21262for as_dir in $PATH
21263do
21264  IFS=$as_save_IFS
21265  test -z "$as_dir" && as_dir=.
21266    for ac_exec_ext in '' $ac_executable_extensions; do
21267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21268    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21270    break 2
21271  fi
21272done
21273  done
21274IFS=$as_save_IFS
21275
21276fi
21277fi
21278PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21279if test -n "$PROPER_COMPILER_CXX"; then
21280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21281$as_echo "$PROPER_COMPILER_CXX" >&6; }
21282else
21283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21284$as_echo "no" >&6; }
21285fi
21286
21287
21288    test -n "$PROPER_COMPILER_CXX" && break
21289  done
21290fi
21291if test -z "$PROPER_COMPILER_CXX"; then
21292  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21293  for ac_prog in $COMPILER_CHECK_LIST
21294do
21295  # Extract the first word of "$ac_prog", so it can be a program name with args.
21296set dummy $ac_prog; ac_word=$2
21297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21298$as_echo_n "checking for $ac_word... " >&6; }
21299if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21300  $as_echo_n "(cached) " >&6
21301else
21302  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21303  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21304else
21305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21306for as_dir in $PATH
21307do
21308  IFS=$as_save_IFS
21309  test -z "$as_dir" && as_dir=.
21310    for ac_exec_ext in '' $ac_executable_extensions; do
21311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21312    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21314    break 2
21315  fi
21316done
21317  done
21318IFS=$as_save_IFS
21319
21320fi
21321fi
21322ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21323if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21325$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21326else
21327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21328$as_echo "no" >&6; }
21329fi
21330
21331
21332  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21333done
21334
21335  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21336    PROPER_COMPILER_CXX=""
21337  else
21338    case $cross_compiling:$ac_tool_warned in
21339yes:)
21340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21342ac_tool_warned=yes ;;
21343esac
21344    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21345  fi
21346fi
21347
21348
21349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21350
21351  # First separate the path from the arguments. This will split at the first
21352  # space.
21353  complete="$PROPER_COMPILER_CXX"
21354  path="${complete%% *}"
21355  tmp="$complete EOL"
21356  arguments="${tmp#* }"
21357
21358  # Input might be given as Windows format, start by converting to
21359  # unix format.
21360  new_path=`$CYGPATH -u "$path"`
21361
21362  # Now try to locate executable using which
21363  new_path=`$WHICH "$new_path" 2> /dev/null`
21364  # bat and cmd files are not always considered executable in cygwin causing which
21365  # to not find them
21366  if test "x$new_path" = x \
21367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21369    new_path=`$CYGPATH -u "$path"`
21370  fi
21371  if test "x$new_path" = x; then
21372    # Oops. Which didn't find the executable.
21373    # The splitting of arguments from the executable at a space might have been incorrect,
21374    # since paths with space are more likely in Windows. Give it another try with the whole
21375    # argument.
21376    path="$complete"
21377    arguments="EOL"
21378    new_path=`$CYGPATH -u "$path"`
21379    new_path=`$WHICH "$new_path" 2> /dev/null`
21380    # bat and cmd files are not always considered executable in cygwin causing which
21381    # to not find them
21382    if test "x$new_path" = x \
21383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21385      new_path=`$CYGPATH -u "$path"`
21386    fi
21387    if test "x$new_path" = x; then
21388      # It's still not found. Now this is an unrecoverable error.
21389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21390$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21391      has_space=`$ECHO "$complete" | $GREP " "`
21392      if test "x$has_space" != x; then
21393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21395      fi
21396      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21397    fi
21398  fi
21399
21400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21403  # "foo.exe" is OK but "foo" is an error.
21404  #
21405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21406  # It is also a way to make sure we got the proper file name for the real test later on.
21407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21408  if test "x$test_shortpath" = x; then
21409    # Short path failed, file does not exist as specified.
21410    # Try adding .exe or .cmd
21411    if test -f "${new_path}.exe"; then
21412      input_to_shortpath="${new_path}.exe"
21413    elif test -f "${new_path}.cmd"; then
21414      input_to_shortpath="${new_path}.cmd"
21415    else
21416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21417$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21420      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21421    fi
21422  else
21423    input_to_shortpath="$new_path"
21424  fi
21425
21426  # Call helper function which possibly converts this using DOS-style short mode.
21427  # If so, the updated path is stored in $new_path.
21428  new_path="$input_to_shortpath"
21429
21430  input_path="$input_to_shortpath"
21431  # Check if we need to convert this using DOS-style short mode. If the path
21432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21433  # take no chances and rewrite it.
21434  # Note: m4 eats our [], so we need to use [ and ] instead.
21435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21436  if test "x$has_forbidden_chars" != x; then
21437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21441      # Going to short mode and back again did indeed matter. Since short mode is
21442      # case insensitive, let's make it lowercase to improve readability.
21443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21444      # Now convert it back to Unix-stile (cygpath)
21445      input_path=`$CYGPATH -u "$shortmode_path"`
21446      new_path="$input_path"
21447    fi
21448  fi
21449
21450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21451  if test "x$test_cygdrive_prefix" = x; then
21452    # As a simple fix, exclude /usr/bin since it's not a real path.
21453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21455      # a path prefixed by /cygdrive for fixpath to work.
21456      new_path="$CYGWIN_ROOT_PATH$input_path"
21457    fi
21458  fi
21459
21460  # remove trailing .exe if any
21461  new_path="${new_path/%.exe/}"
21462
21463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21464
21465  # First separate the path from the arguments. This will split at the first
21466  # space.
21467  complete="$PROPER_COMPILER_CXX"
21468  path="${complete%% *}"
21469  tmp="$complete EOL"
21470  arguments="${tmp#* }"
21471
21472  # Input might be given as Windows format, start by converting to
21473  # unix format.
21474  new_path="$path"
21475
21476  windows_path="$new_path"
21477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21478    unix_path=`$CYGPATH -u "$windows_path"`
21479    new_path="$unix_path"
21480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21482    new_path="$unix_path"
21483  fi
21484
21485
21486  # Now try to locate executable using which
21487  new_path=`$WHICH "$new_path" 2> /dev/null`
21488
21489  if test "x$new_path" = x; then
21490    # Oops. Which didn't find the executable.
21491    # The splitting of arguments from the executable at a space might have been incorrect,
21492    # since paths with space are more likely in Windows. Give it another try with the whole
21493    # argument.
21494    path="$complete"
21495    arguments="EOL"
21496    new_path="$path"
21497
21498  windows_path="$new_path"
21499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21500    unix_path=`$CYGPATH -u "$windows_path"`
21501    new_path="$unix_path"
21502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21504    new_path="$unix_path"
21505  fi
21506
21507
21508    new_path=`$WHICH "$new_path" 2> /dev/null`
21509
21510    if test "x$new_path" = x; then
21511      # It's still not found. Now this is an unrecoverable error.
21512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21513$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21514      has_space=`$ECHO "$complete" | $GREP " "`
21515      if test "x$has_space" != x; then
21516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21518      fi
21519      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21520    fi
21521  fi
21522
21523  # Now new_path has a complete unix path to the binary
21524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21525    # Keep paths in /bin as-is, but remove trailing .exe if any
21526    new_path="${new_path/%.exe/}"
21527    # Do not save /bin paths to all_fixpath_prefixes!
21528  else
21529    # Not in mixed or Windows style, start by that.
21530    new_path=`cmd //c echo $new_path`
21531
21532  input_path="$new_path"
21533  # Check if we need to convert this using DOS-style short mode. If the path
21534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21535  # take no chances and rewrite it.
21536  # Note: m4 eats our [], so we need to use [ and ] instead.
21537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21538  if test "x$has_forbidden_chars" != x; then
21539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21541  fi
21542
21543    # Output is in $new_path
21544
21545  windows_path="$new_path"
21546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21547    unix_path=`$CYGPATH -u "$windows_path"`
21548    new_path="$unix_path"
21549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21551    new_path="$unix_path"
21552  fi
21553
21554    # remove trailing .exe if any
21555    new_path="${new_path/%.exe/}"
21556
21557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21559  fi
21560
21561  else
21562    # We're on a posix platform. Hooray! :)
21563    # First separate the path from the arguments. This will split at the first
21564    # space.
21565    complete="$PROPER_COMPILER_CXX"
21566    path="${complete%% *}"
21567    tmp="$complete EOL"
21568    arguments="${tmp#* }"
21569
21570    # Cannot rely on the command "which" here since it doesn't always work.
21571    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21572    if test -z "$is_absolute_path"; then
21573      # Path to executable is not absolute. Find it.
21574      IFS_save="$IFS"
21575      IFS=:
21576      for p in $PATH; do
21577        if test -f "$p/$path" && test -x "$p/$path"; then
21578          new_path="$p/$path"
21579          break
21580        fi
21581      done
21582      IFS="$IFS_save"
21583    else
21584      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21585$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21586      new_path="$path"
21587    fi
21588
21589    if test "x$new_path" = x; then
21590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21591$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21592      has_space=`$ECHO "$complete" | $GREP " "`
21593      if test "x$has_space" != x; then
21594        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21596      fi
21597      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21598    fi
21599  fi
21600
21601  # Now join together the path and the arguments once again
21602  if test "x$arguments" != xEOL; then
21603    new_complete="$new_path ${arguments% *}"
21604  else
21605    new_complete="$new_path"
21606  fi
21607
21608  if test "x$complete" != "x$new_complete"; then
21609    PROPER_COMPILER_CXX="$new_complete"
21610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21611$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21612  fi
21613
21614    PATH="$RETRY_COMPILER_SAVED_PATH"
21615
21616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21617$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21618
21619  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21620    # Follow a chain of symbolic links. Use readlink
21621    # where it exists, else fall back to horribly
21622    # complicated shell code.
21623    if test "x$READLINK_TESTED" != yes; then
21624      # On MacOSX there is a readlink tool with a different
21625      # purpose than the GNU readlink tool. Check the found readlink.
21626      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21627      if test "x$ISGNU" = x; then
21628        # A readlink that we do not know how to use.
21629        # Are there other non-GNU readlinks out there?
21630        READLINK_TESTED=yes
21631        READLINK=
21632      fi
21633    fi
21634
21635    if test "x$READLINK" != x; then
21636      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21637    else
21638      # Save the current directory for restoring afterwards
21639      STARTDIR=$PWD
21640      COUNTER=0
21641      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21642      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21643      cd $sym_link_dir
21644      # Use -P flag to resolve symlinks in directories.
21645      cd `$THEPWDCMD -P`
21646      sym_link_dir=`$THEPWDCMD -P`
21647      # Resolve file symlinks
21648      while test $COUNTER -lt 20; do
21649        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21650        if test "x$ISLINK" == x; then
21651          # This is not a symbolic link! We are done!
21652          break
21653        fi
21654        # Again resolve directory symlinks since the target of the just found
21655        # link could be in a different directory
21656        cd `$DIRNAME $ISLINK`
21657        sym_link_dir=`$THEPWDCMD -P`
21658        sym_link_file=`$BASENAME $ISLINK`
21659        let COUNTER=COUNTER+1
21660      done
21661      cd $STARTDIR
21662      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21663    fi
21664  fi
21665
21666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21667$as_echo "$PROPER_COMPILER_CXX" >&6; }
21668    CXX="$PROPER_COMPILER_CXX"
21669  else
21670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21671$as_echo "no, keeping CXX" >&6; }
21672    CXX="$TEST_COMPILER"
21673  fi
21674
21675  COMPILER=$CXX
21676  COMPILER_NAME=$COMPILER_NAME
21677
21678  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21679    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21680    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21681    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21682    if test $? -ne 0; then
21683      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21684
21685      { $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
21686$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21687      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21688$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21689      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21690    else
21691      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21692      COMPILER_VENDOR="Sun Studio"
21693    fi
21694  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21695      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21696      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21697      if test $? -ne 0; then
21698        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21699      else
21700        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21701        COMPILER_VENDOR='IBM'
21702      fi
21703  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21704    # First line typically looks something like:
21705    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21706    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21707    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21708    COMPILER_VENDOR="Microsoft CL.EXE"
21709    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21710    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21711      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21712        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21713      fi
21714    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21715      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21716        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21717      fi
21718    fi
21719  else
21720    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21721    # Check that this is likely to be GCC.
21722    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21723    if test $? -ne 0; then
21724      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21725$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21726      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21727$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21728      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21729    fi
21730
21731    # First line typically looks something like:
21732    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21733    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21734    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21735  fi
21736  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21737  CXX_VERSION="$COMPILER_VERSION"
21738  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21739  CXX_VENDOR="$COMPILER_VENDOR"
21740
21741  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21742$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21743
21744
21745  # Now that we have resolved CXX ourself, let autoconf have its go at it
21746  ac_ext=cpp
21747ac_cpp='$CXXCPP $CPPFLAGS'
21748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21751if test -z "$CXX"; then
21752  if test -n "$CCC"; then
21753    CXX=$CCC
21754  else
21755    if test -n "$ac_tool_prefix"; then
21756  for ac_prog in $CXX
21757  do
21758    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21759set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21761$as_echo_n "checking for $ac_word... " >&6; }
21762if ${ac_cv_prog_CXX+:} false; then :
21763  $as_echo_n "(cached) " >&6
21764else
21765  if test -n "$CXX"; then
21766  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21767else
21768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21769for as_dir in $PATH
21770do
21771  IFS=$as_save_IFS
21772  test -z "$as_dir" && as_dir=.
21773    for ac_exec_ext in '' $ac_executable_extensions; do
21774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21775    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21777    break 2
21778  fi
21779done
21780  done
21781IFS=$as_save_IFS
21782
21783fi
21784fi
21785CXX=$ac_cv_prog_CXX
21786if test -n "$CXX"; then
21787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21788$as_echo "$CXX" >&6; }
21789else
21790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21791$as_echo "no" >&6; }
21792fi
21793
21794
21795    test -n "$CXX" && break
21796  done
21797fi
21798if test -z "$CXX"; then
21799  ac_ct_CXX=$CXX
21800  for ac_prog in $CXX
21801do
21802  # Extract the first word of "$ac_prog", so it can be a program name with args.
21803set dummy $ac_prog; ac_word=$2
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21805$as_echo_n "checking for $ac_word... " >&6; }
21806if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21807  $as_echo_n "(cached) " >&6
21808else
21809  if test -n "$ac_ct_CXX"; then
21810  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21811else
21812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21813for as_dir in $PATH
21814do
21815  IFS=$as_save_IFS
21816  test -z "$as_dir" && as_dir=.
21817    for ac_exec_ext in '' $ac_executable_extensions; do
21818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21819    ac_cv_prog_ac_ct_CXX="$ac_prog"
21820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21821    break 2
21822  fi
21823done
21824  done
21825IFS=$as_save_IFS
21826
21827fi
21828fi
21829ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21830if test -n "$ac_ct_CXX"; then
21831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21832$as_echo "$ac_ct_CXX" >&6; }
21833else
21834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21835$as_echo "no" >&6; }
21836fi
21837
21838
21839  test -n "$ac_ct_CXX" && break
21840done
21841
21842  if test "x$ac_ct_CXX" = x; then
21843    CXX="g++"
21844  else
21845    case $cross_compiling:$ac_tool_warned in
21846yes:)
21847{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21848$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21849ac_tool_warned=yes ;;
21850esac
21851    CXX=$ac_ct_CXX
21852  fi
21853fi
21854
21855  fi
21856fi
21857# Provide some information about the compiler.
21858$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21859set X $ac_compile
21860ac_compiler=$2
21861for ac_option in --version -v -V -qversion; do
21862  { { ac_try="$ac_compiler $ac_option >&5"
21863case "(($ac_try" in
21864  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21865  *) ac_try_echo=$ac_try;;
21866esac
21867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21868$as_echo "$ac_try_echo"; } >&5
21869  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21870  ac_status=$?
21871  if test -s conftest.err; then
21872    sed '10a\
21873... rest of stderr output deleted ...
21874         10q' conftest.err >conftest.er1
21875    cat conftest.er1 >&5
21876  fi
21877  rm -f conftest.er1 conftest.err
21878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21879  test $ac_status = 0; }
21880done
21881
21882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21883$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21884if ${ac_cv_cxx_compiler_gnu+:} false; then :
21885  $as_echo_n "(cached) " >&6
21886else
21887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21888/* end confdefs.h.  */
21889
21890int
21891main ()
21892{
21893#ifndef __GNUC__
21894       choke me
21895#endif
21896
21897  ;
21898  return 0;
21899}
21900_ACEOF
21901if ac_fn_cxx_try_compile "$LINENO"; then :
21902  ac_compiler_gnu=yes
21903else
21904  ac_compiler_gnu=no
21905fi
21906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21907ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21908
21909fi
21910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21911$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21912if test $ac_compiler_gnu = yes; then
21913  GXX=yes
21914else
21915  GXX=
21916fi
21917ac_test_CXXFLAGS=${CXXFLAGS+set}
21918ac_save_CXXFLAGS=$CXXFLAGS
21919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21920$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21921if ${ac_cv_prog_cxx_g+:} false; then :
21922  $as_echo_n "(cached) " >&6
21923else
21924  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21925   ac_cxx_werror_flag=yes
21926   ac_cv_prog_cxx_g=no
21927   CXXFLAGS="-g"
21928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21929/* end confdefs.h.  */
21930
21931int
21932main ()
21933{
21934
21935  ;
21936  return 0;
21937}
21938_ACEOF
21939if ac_fn_cxx_try_compile "$LINENO"; then :
21940  ac_cv_prog_cxx_g=yes
21941else
21942  CXXFLAGS=""
21943      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21944/* end confdefs.h.  */
21945
21946int
21947main ()
21948{
21949
21950  ;
21951  return 0;
21952}
21953_ACEOF
21954if ac_fn_cxx_try_compile "$LINENO"; then :
21955
21956else
21957  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21958	 CXXFLAGS="-g"
21959	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21960/* end confdefs.h.  */
21961
21962int
21963main ()
21964{
21965
21966  ;
21967  return 0;
21968}
21969_ACEOF
21970if ac_fn_cxx_try_compile "$LINENO"; then :
21971  ac_cv_prog_cxx_g=yes
21972fi
21973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21974fi
21975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21976fi
21977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21978   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21979fi
21980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21981$as_echo "$ac_cv_prog_cxx_g" >&6; }
21982if test "$ac_test_CXXFLAGS" = set; then
21983  CXXFLAGS=$ac_save_CXXFLAGS
21984elif test $ac_cv_prog_cxx_g = yes; then
21985  if test "$GXX" = yes; then
21986    CXXFLAGS="-g -O2"
21987  else
21988    CXXFLAGS="-g"
21989  fi
21990else
21991  if test "$GXX" = yes; then
21992    CXXFLAGS="-O2"
21993  else
21994    CXXFLAGS=
21995  fi
21996fi
21997ac_ext=cpp
21998ac_cpp='$CXXCPP $CPPFLAGS'
21999ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22000ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22001ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22002
22003
22004  ### Locate other tools
22005
22006  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22007    ac_ext=m
22008ac_cpp='$OBJCPP $CPPFLAGS'
22009ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22010ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22011ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22012if test -n "$ac_tool_prefix"; then
22013  for ac_prog in gcc objcc objc cc CC
22014  do
22015    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22016set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22018$as_echo_n "checking for $ac_word... " >&6; }
22019if ${ac_cv_prog_OBJC+:} false; then :
22020  $as_echo_n "(cached) " >&6
22021else
22022  if test -n "$OBJC"; then
22023  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22024else
22025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22026for as_dir in $PATH
22027do
22028  IFS=$as_save_IFS
22029  test -z "$as_dir" && as_dir=.
22030    for ac_exec_ext in '' $ac_executable_extensions; do
22031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22032    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22034    break 2
22035  fi
22036done
22037  done
22038IFS=$as_save_IFS
22039
22040fi
22041fi
22042OBJC=$ac_cv_prog_OBJC
22043if test -n "$OBJC"; then
22044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22045$as_echo "$OBJC" >&6; }
22046else
22047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22048$as_echo "no" >&6; }
22049fi
22050
22051
22052    test -n "$OBJC" && break
22053  done
22054fi
22055if test -z "$OBJC"; then
22056  ac_ct_OBJC=$OBJC
22057  for ac_prog in gcc objcc objc cc CC
22058do
22059  # Extract the first word of "$ac_prog", so it can be a program name with args.
22060set dummy $ac_prog; ac_word=$2
22061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22062$as_echo_n "checking for $ac_word... " >&6; }
22063if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22064  $as_echo_n "(cached) " >&6
22065else
22066  if test -n "$ac_ct_OBJC"; then
22067  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22068else
22069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22070for as_dir in $PATH
22071do
22072  IFS=$as_save_IFS
22073  test -z "$as_dir" && as_dir=.
22074    for ac_exec_ext in '' $ac_executable_extensions; do
22075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22076    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22078    break 2
22079  fi
22080done
22081  done
22082IFS=$as_save_IFS
22083
22084fi
22085fi
22086ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22087if test -n "$ac_ct_OBJC"; then
22088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22089$as_echo "$ac_ct_OBJC" >&6; }
22090else
22091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22092$as_echo "no" >&6; }
22093fi
22094
22095
22096  test -n "$ac_ct_OBJC" && break
22097done
22098
22099  if test "x$ac_ct_OBJC" = x; then
22100    OBJC="gcc"
22101  else
22102    case $cross_compiling:$ac_tool_warned in
22103yes:)
22104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22106ac_tool_warned=yes ;;
22107esac
22108    OBJC=$ac_ct_OBJC
22109  fi
22110fi
22111
22112# Provide some information about the compiler.
22113$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22114set X $ac_compile
22115ac_compiler=$2
22116for ac_option in --version -v -V -qversion; do
22117  { { ac_try="$ac_compiler $ac_option >&5"
22118case "(($ac_try" in
22119  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22120  *) ac_try_echo=$ac_try;;
22121esac
22122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22123$as_echo "$ac_try_echo"; } >&5
22124  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22125  ac_status=$?
22126  if test -s conftest.err; then
22127    sed '10a\
22128... rest of stderr output deleted ...
22129         10q' conftest.err >conftest.er1
22130    cat conftest.er1 >&5
22131  fi
22132  rm -f conftest.er1 conftest.err
22133  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22134  test $ac_status = 0; }
22135done
22136
22137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22138$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22139if ${ac_cv_objc_compiler_gnu+:} false; then :
22140  $as_echo_n "(cached) " >&6
22141else
22142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22143/* end confdefs.h.  */
22144
22145int
22146main ()
22147{
22148#ifndef __GNUC__
22149       choke me
22150#endif
22151
22152  ;
22153  return 0;
22154}
22155_ACEOF
22156if ac_fn_objc_try_compile "$LINENO"; then :
22157  ac_compiler_gnu=yes
22158else
22159  ac_compiler_gnu=no
22160fi
22161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22162ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22163
22164fi
22165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22166$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22167if test $ac_compiler_gnu = yes; then
22168  GOBJC=yes
22169else
22170  GOBJC=
22171fi
22172ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22173ac_save_OBJCFLAGS=$OBJCFLAGS
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22175$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22176if ${ac_cv_prog_objc_g+:} false; then :
22177  $as_echo_n "(cached) " >&6
22178else
22179  ac_save_objc_werror_flag=$ac_objc_werror_flag
22180   ac_objc_werror_flag=yes
22181   ac_cv_prog_objc_g=no
22182   OBJCFLAGS="-g"
22183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22184/* end confdefs.h.  */
22185
22186int
22187main ()
22188{
22189
22190  ;
22191  return 0;
22192}
22193_ACEOF
22194if ac_fn_objc_try_compile "$LINENO"; then :
22195  ac_cv_prog_objc_g=yes
22196else
22197  OBJCFLAGS=""
22198      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199/* end confdefs.h.  */
22200
22201int
22202main ()
22203{
22204
22205  ;
22206  return 0;
22207}
22208_ACEOF
22209if ac_fn_objc_try_compile "$LINENO"; then :
22210
22211else
22212  ac_objc_werror_flag=$ac_save_objc_werror_flag
22213	 OBJCFLAGS="-g"
22214	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22215/* end confdefs.h.  */
22216
22217int
22218main ()
22219{
22220
22221  ;
22222  return 0;
22223}
22224_ACEOF
22225if ac_fn_objc_try_compile "$LINENO"; then :
22226  ac_cv_prog_objc_g=yes
22227fi
22228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22229fi
22230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22231fi
22232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22233   ac_objc_werror_flag=$ac_save_objc_werror_flag
22234fi
22235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22236$as_echo "$ac_cv_prog_objc_g" >&6; }
22237if test "$ac_test_OBJCFLAGS" = set; then
22238  OBJCFLAGS=$ac_save_OBJCFLAGS
22239elif test $ac_cv_prog_objc_g = yes; then
22240  if test "$GOBJC" = yes; then
22241    OBJCFLAGS="-g -O2"
22242  else
22243    OBJCFLAGS="-g"
22244  fi
22245else
22246  if test "$GOBJC" = yes; then
22247    OBJCFLAGS="-O2"
22248  else
22249    OBJCFLAGS=
22250  fi
22251fi
22252ac_ext=cpp
22253ac_cpp='$CXXCPP $CPPFLAGS'
22254ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22255ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22256ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22257
22258
22259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22260
22261  # First separate the path from the arguments. This will split at the first
22262  # space.
22263  complete="$OBJC"
22264  path="${complete%% *}"
22265  tmp="$complete EOL"
22266  arguments="${tmp#* }"
22267
22268  # Input might be given as Windows format, start by converting to
22269  # unix format.
22270  new_path=`$CYGPATH -u "$path"`
22271
22272  # Now try to locate executable using which
22273  new_path=`$WHICH "$new_path" 2> /dev/null`
22274  # bat and cmd files are not always considered executable in cygwin causing which
22275  # to not find them
22276  if test "x$new_path" = x \
22277      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22278      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22279    new_path=`$CYGPATH -u "$path"`
22280  fi
22281  if test "x$new_path" = x; then
22282    # Oops. Which didn't find the executable.
22283    # The splitting of arguments from the executable at a space might have been incorrect,
22284    # since paths with space are more likely in Windows. Give it another try with the whole
22285    # argument.
22286    path="$complete"
22287    arguments="EOL"
22288    new_path=`$CYGPATH -u "$path"`
22289    new_path=`$WHICH "$new_path" 2> /dev/null`
22290    # bat and cmd files are not always considered executable in cygwin causing which
22291    # to not find them
22292    if test "x$new_path" = x \
22293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22295      new_path=`$CYGPATH -u "$path"`
22296    fi
22297    if test "x$new_path" = x; then
22298      # It's still not found. Now this is an unrecoverable error.
22299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22300$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22301      has_space=`$ECHO "$complete" | $GREP " "`
22302      if test "x$has_space" != x; then
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22305      fi
22306      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22307    fi
22308  fi
22309
22310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22313  # "foo.exe" is OK but "foo" is an error.
22314  #
22315  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22316  # It is also a way to make sure we got the proper file name for the real test later on.
22317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22318  if test "x$test_shortpath" = x; then
22319    # Short path failed, file does not exist as specified.
22320    # Try adding .exe or .cmd
22321    if test -f "${new_path}.exe"; then
22322      input_to_shortpath="${new_path}.exe"
22323    elif test -f "${new_path}.cmd"; then
22324      input_to_shortpath="${new_path}.cmd"
22325    else
22326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22327$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22328      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22329$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22330      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22331    fi
22332  else
22333    input_to_shortpath="$new_path"
22334  fi
22335
22336  # Call helper function which possibly converts this using DOS-style short mode.
22337  # If so, the updated path is stored in $new_path.
22338  new_path="$input_to_shortpath"
22339
22340  input_path="$input_to_shortpath"
22341  # Check if we need to convert this using DOS-style short mode. If the path
22342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22343  # take no chances and rewrite it.
22344  # Note: m4 eats our [], so we need to use [ and ] instead.
22345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22346  if test "x$has_forbidden_chars" != x; then
22347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22351      # Going to short mode and back again did indeed matter. Since short mode is
22352      # case insensitive, let's make it lowercase to improve readability.
22353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22354      # Now convert it back to Unix-stile (cygpath)
22355      input_path=`$CYGPATH -u "$shortmode_path"`
22356      new_path="$input_path"
22357    fi
22358  fi
22359
22360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22361  if test "x$test_cygdrive_prefix" = x; then
22362    # As a simple fix, exclude /usr/bin since it's not a real path.
22363    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22365      # a path prefixed by /cygdrive for fixpath to work.
22366      new_path="$CYGWIN_ROOT_PATH$input_path"
22367    fi
22368  fi
22369
22370  # remove trailing .exe if any
22371  new_path="${new_path/%.exe/}"
22372
22373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22374
22375  # First separate the path from the arguments. This will split at the first
22376  # space.
22377  complete="$OBJC"
22378  path="${complete%% *}"
22379  tmp="$complete EOL"
22380  arguments="${tmp#* }"
22381
22382  # Input might be given as Windows format, start by converting to
22383  # unix format.
22384  new_path="$path"
22385
22386  windows_path="$new_path"
22387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22388    unix_path=`$CYGPATH -u "$windows_path"`
22389    new_path="$unix_path"
22390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22392    new_path="$unix_path"
22393  fi
22394
22395
22396  # Now try to locate executable using which
22397  new_path=`$WHICH "$new_path" 2> /dev/null`
22398
22399  if test "x$new_path" = x; then
22400    # Oops. Which didn't find the executable.
22401    # The splitting of arguments from the executable at a space might have been incorrect,
22402    # since paths with space are more likely in Windows. Give it another try with the whole
22403    # argument.
22404    path="$complete"
22405    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
22419
22420    if test "x$new_path" = x; then
22421      # It's still not found. Now this is an unrecoverable error.
22422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22423$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22424      has_space=`$ECHO "$complete" | $GREP " "`
22425      if test "x$has_space" != x; then
22426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22428      fi
22429      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22430    fi
22431  fi
22432
22433  # Now new_path has a complete unix path to the binary
22434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22435    # Keep paths in /bin as-is, but remove trailing .exe if any
22436    new_path="${new_path/%.exe/}"
22437    # Do not save /bin paths to all_fixpath_prefixes!
22438  else
22439    # Not in mixed or Windows style, start by that.
22440    new_path=`cmd //c echo $new_path`
22441
22442  input_path="$new_path"
22443  # Check if we need to convert this using DOS-style short mode. If the path
22444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22445  # take no chances and rewrite it.
22446  # Note: m4 eats our [], so we need to use [ and ] instead.
22447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22448  if test "x$has_forbidden_chars" != x; then
22449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22451  fi
22452
22453    # Output is in $new_path
22454
22455  windows_path="$new_path"
22456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22457    unix_path=`$CYGPATH -u "$windows_path"`
22458    new_path="$unix_path"
22459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22461    new_path="$unix_path"
22462  fi
22463
22464    # remove trailing .exe if any
22465    new_path="${new_path/%.exe/}"
22466
22467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22469  fi
22470
22471  else
22472    # We're on a posix platform. Hooray! :)
22473    # First separate the path from the arguments. This will split at the first
22474    # space.
22475    complete="$OBJC"
22476    path="${complete%% *}"
22477    tmp="$complete EOL"
22478    arguments="${tmp#* }"
22479
22480    # Cannot rely on the command "which" here since it doesn't always work.
22481    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22482    if test -z "$is_absolute_path"; then
22483      # Path to executable is not absolute. Find it.
22484      IFS_save="$IFS"
22485      IFS=:
22486      for p in $PATH; do
22487        if test -f "$p/$path" && test -x "$p/$path"; then
22488          new_path="$p/$path"
22489          break
22490        fi
22491      done
22492      IFS="$IFS_save"
22493    else
22494      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22495$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22496      new_path="$path"
22497    fi
22498
22499    if test "x$new_path" = x; then
22500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22501$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22502      has_space=`$ECHO "$complete" | $GREP " "`
22503      if test "x$has_space" != x; then
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22506      fi
22507      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22508    fi
22509  fi
22510
22511  # Now join together the path and the arguments once again
22512  if test "x$arguments" != xEOL; then
22513    new_complete="$new_path ${arguments% *}"
22514  else
22515    new_complete="$new_path"
22516  fi
22517
22518  if test "x$complete" != "x$new_complete"; then
22519    OBJC="$new_complete"
22520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22521$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22522  fi
22523
22524  else
22525    OBJC=
22526  fi
22527
22528  # Restore the flags to the user specified values.
22529  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22530  CFLAGS="$ORG_CFLAGS"
22531  CXXFLAGS="$ORG_CXXFLAGS"
22532  OBJCFLAGS="$ORG_OBJCFLAGS"
22533
22534  LD="$CC"
22535  LDEXE="$CC"
22536  LDCXX="$CXX"
22537  LDEXECXX="$CXX"
22538
22539  # LDEXE is the linker to use, when creating executables.
22540
22541  # Linking C++ libraries.
22542
22543  # Linking C++ executables.
22544
22545
22546  if test "x$OPENJDK_TARGET_OS" != xwindows; then
22547    if test -n "$ac_tool_prefix"; then
22548  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22549set dummy ${ac_tool_prefix}ar; ac_word=$2
22550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22551$as_echo_n "checking for $ac_word... " >&6; }
22552if ${ac_cv_prog_AR+:} false; then :
22553  $as_echo_n "(cached) " >&6
22554else
22555  if test -n "$AR"; then
22556  ac_cv_prog_AR="$AR" # Let the user override the test.
22557else
22558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22559for as_dir in $PATH
22560do
22561  IFS=$as_save_IFS
22562  test -z "$as_dir" && as_dir=.
22563    for ac_exec_ext in '' $ac_executable_extensions; do
22564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22565    ac_cv_prog_AR="${ac_tool_prefix}ar"
22566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22567    break 2
22568  fi
22569done
22570  done
22571IFS=$as_save_IFS
22572
22573fi
22574fi
22575AR=$ac_cv_prog_AR
22576if test -n "$AR"; then
22577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22578$as_echo "$AR" >&6; }
22579else
22580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22581$as_echo "no" >&6; }
22582fi
22583
22584
22585fi
22586if test -z "$ac_cv_prog_AR"; then
22587  ac_ct_AR=$AR
22588  # Extract the first word of "ar", so it can be a program name with args.
22589set dummy ar; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_prog_ac_ct_AR+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  if test -n "$ac_ct_AR"; then
22596  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22597else
22598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22599for as_dir in $PATH
22600do
22601  IFS=$as_save_IFS
22602  test -z "$as_dir" && as_dir=.
22603    for ac_exec_ext in '' $ac_executable_extensions; do
22604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22605    ac_cv_prog_ac_ct_AR="ar"
22606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22607    break 2
22608  fi
22609done
22610  done
22611IFS=$as_save_IFS
22612
22613fi
22614fi
22615ac_ct_AR=$ac_cv_prog_ac_ct_AR
22616if test -n "$ac_ct_AR"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22618$as_echo "$ac_ct_AR" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624  if test "x$ac_ct_AR" = x; then
22625    AR=""
22626  else
22627    case $cross_compiling:$ac_tool_warned in
22628yes:)
22629{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22630$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22631ac_tool_warned=yes ;;
22632esac
22633    AR=$ac_ct_AR
22634  fi
22635else
22636  AR="$ac_cv_prog_AR"
22637fi
22638
22639
22640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22641
22642  # First separate the path from the arguments. This will split at the first
22643  # space.
22644  complete="$AR"
22645  path="${complete%% *}"
22646  tmp="$complete EOL"
22647  arguments="${tmp#* }"
22648
22649  # Input might be given as Windows format, start by converting to
22650  # unix format.
22651  new_path=`$CYGPATH -u "$path"`
22652
22653  # Now try to locate executable using which
22654  new_path=`$WHICH "$new_path" 2> /dev/null`
22655  # bat and cmd files are not always considered executable in cygwin causing which
22656  # to not find them
22657  if test "x$new_path" = x \
22658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22660    new_path=`$CYGPATH -u "$path"`
22661  fi
22662  if test "x$new_path" = x; then
22663    # Oops. Which didn't find the executable.
22664    # The splitting of arguments from the executable at a space might have been incorrect,
22665    # since paths with space are more likely in Windows. Give it another try with the whole
22666    # argument.
22667    path="$complete"
22668    arguments="EOL"
22669    new_path=`$CYGPATH -u "$path"`
22670    new_path=`$WHICH "$new_path" 2> /dev/null`
22671    # bat and cmd files are not always considered executable in cygwin causing which
22672    # to not find them
22673    if test "x$new_path" = x \
22674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22676      new_path=`$CYGPATH -u "$path"`
22677    fi
22678    if test "x$new_path" = x; then
22679      # It's still not found. Now this is an unrecoverable error.
22680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22681$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22682      has_space=`$ECHO "$complete" | $GREP " "`
22683      if test "x$has_space" != x; then
22684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22686      fi
22687      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22688    fi
22689  fi
22690
22691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22694  # "foo.exe" is OK but "foo" is an error.
22695  #
22696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
22697  # It is also a way to make sure we got the proper file name for the real test later on.
22698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22699  if test "x$test_shortpath" = x; then
22700    # Short path failed, file does not exist as specified.
22701    # Try adding .exe or .cmd
22702    if test -f "${new_path}.exe"; then
22703      input_to_shortpath="${new_path}.exe"
22704    elif test -f "${new_path}.cmd"; then
22705      input_to_shortpath="${new_path}.cmd"
22706    else
22707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22708$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22711      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22712    fi
22713  else
22714    input_to_shortpath="$new_path"
22715  fi
22716
22717  # Call helper function which possibly converts this using DOS-style short mode.
22718  # If so, the updated path is stored in $new_path.
22719  new_path="$input_to_shortpath"
22720
22721  input_path="$input_to_shortpath"
22722  # Check if we need to convert this using DOS-style short mode. If the path
22723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22724  # take no chances and rewrite it.
22725  # Note: m4 eats our [], so we need to use [ and ] instead.
22726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22727  if test "x$has_forbidden_chars" != x; then
22728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22732      # Going to short mode and back again did indeed matter. Since short mode is
22733      # case insensitive, let's make it lowercase to improve readability.
22734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22735      # Now convert it back to Unix-stile (cygpath)
22736      input_path=`$CYGPATH -u "$shortmode_path"`
22737      new_path="$input_path"
22738    fi
22739  fi
22740
22741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22742  if test "x$test_cygdrive_prefix" = x; then
22743    # As a simple fix, exclude /usr/bin since it's not a real path.
22744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22746      # a path prefixed by /cygdrive for fixpath to work.
22747      new_path="$CYGWIN_ROOT_PATH$input_path"
22748    fi
22749  fi
22750
22751  # remove trailing .exe if any
22752  new_path="${new_path/%.exe/}"
22753
22754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22755
22756  # First separate the path from the arguments. This will split at the first
22757  # space.
22758  complete="$AR"
22759  path="${complete%% *}"
22760  tmp="$complete EOL"
22761  arguments="${tmp#* }"
22762
22763  # Input might be given as Windows format, start by converting to
22764  # unix format.
22765  new_path="$path"
22766
22767  windows_path="$new_path"
22768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22769    unix_path=`$CYGPATH -u "$windows_path"`
22770    new_path="$unix_path"
22771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22773    new_path="$unix_path"
22774  fi
22775
22776
22777  # Now try to locate executable using which
22778  new_path=`$WHICH "$new_path" 2> /dev/null`
22779
22780  if test "x$new_path" = x; then
22781    # Oops. Which didn't find the executable.
22782    # The splitting of arguments from the executable at a space might have been incorrect,
22783    # since paths with space are more likely in Windows. Give it another try with the whole
22784    # argument.
22785    path="$complete"
22786    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
22800
22801    if test "x$new_path" = x; then
22802      # It's still not found. Now this is an unrecoverable error.
22803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22804$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22805      has_space=`$ECHO "$complete" | $GREP " "`
22806      if test "x$has_space" != x; then
22807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22809      fi
22810      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22811    fi
22812  fi
22813
22814  # Now new_path has a complete unix path to the binary
22815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22816    # Keep paths in /bin as-is, but remove trailing .exe if any
22817    new_path="${new_path/%.exe/}"
22818    # Do not save /bin paths to all_fixpath_prefixes!
22819  else
22820    # Not in mixed or Windows style, start by that.
22821    new_path=`cmd //c echo $new_path`
22822
22823  input_path="$new_path"
22824  # Check if we need to convert this using DOS-style short mode. If the path
22825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22826  # take no chances and rewrite it.
22827  # Note: m4 eats our [], so we need to use [ and ] instead.
22828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22829  if test "x$has_forbidden_chars" != x; then
22830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22832  fi
22833
22834    # Output is in $new_path
22835
22836  windows_path="$new_path"
22837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22838    unix_path=`$CYGPATH -u "$windows_path"`
22839    new_path="$unix_path"
22840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22842    new_path="$unix_path"
22843  fi
22844
22845    # remove trailing .exe if any
22846    new_path="${new_path/%.exe/}"
22847
22848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22850  fi
22851
22852  else
22853    # We're on a posix platform. Hooray! :)
22854    # First separate the path from the arguments. This will split at the first
22855    # space.
22856    complete="$AR"
22857    path="${complete%% *}"
22858    tmp="$complete EOL"
22859    arguments="${tmp#* }"
22860
22861    # Cannot rely on the command "which" here since it doesn't always work.
22862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22863    if test -z "$is_absolute_path"; then
22864      # Path to executable is not absolute. Find it.
22865      IFS_save="$IFS"
22866      IFS=:
22867      for p in $PATH; do
22868        if test -f "$p/$path" && test -x "$p/$path"; then
22869          new_path="$p/$path"
22870          break
22871        fi
22872      done
22873      IFS="$IFS_save"
22874    else
22875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22876$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22877      new_path="$path"
22878    fi
22879
22880    if test "x$new_path" = x; then
22881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22882$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22883      has_space=`$ECHO "$complete" | $GREP " "`
22884      if test "x$has_space" != x; then
22885        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22887      fi
22888      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22889    fi
22890  fi
22891
22892  # Now join together the path and the arguments once again
22893  if test "x$arguments" != xEOL; then
22894    new_complete="$new_path ${arguments% *}"
22895  else
22896    new_complete="$new_path"
22897  fi
22898
22899  if test "x$complete" != "x$new_complete"; then
22900    AR="$new_complete"
22901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22902$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22903  fi
22904
22905  fi
22906  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22907    ARFLAGS="-r"
22908  elif test "x$OPENJDK_TARGET_OS" = xaix; then
22909    ARFLAGS="-X64"
22910  else
22911    ARFLAGS=""
22912  fi
22913
22914
22915  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22916  HOTSPOT_CXX="$CXX"
22917  HOTSPOT_LD="$LD"
22918
22919
22920
22921  COMPILER_NAME=gcc
22922  COMPILER_TYPE=CC
22923  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22924
22925    # For now, assume that we are always compiling using cl.exe.
22926    CC_OUT_OPTION=-Fo
22927    EXE_OUT_OPTION=-out:
22928    LD_OUT_OPTION=-out:
22929    AR_OUT_OPTION=-out:
22930    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22931    # program for something completely different.
22932    # Extract the first word of "link", so it can be a program name with args.
22933set dummy link; ac_word=$2
22934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22935$as_echo_n "checking for $ac_word... " >&6; }
22936if ${ac_cv_prog_WINLD+:} false; then :
22937  $as_echo_n "(cached) " >&6
22938else
22939  if test -n "$WINLD"; then
22940  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22941else
22942  ac_prog_rejected=no
22943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22944for as_dir in $PATH
22945do
22946  IFS=$as_save_IFS
22947  test -z "$as_dir" && as_dir=.
22948    for ac_exec_ext in '' $ac_executable_extensions; do
22949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22950    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22951       ac_prog_rejected=yes
22952       continue
22953     fi
22954    ac_cv_prog_WINLD="link"
22955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22956    break 2
22957  fi
22958done
22959  done
22960IFS=$as_save_IFS
22961
22962if test $ac_prog_rejected = yes; then
22963  # We found a bogon in the path, so make sure we never use it.
22964  set dummy $ac_cv_prog_WINLD
22965  shift
22966  if test $# != 0; then
22967    # We chose a different compiler from the bogus one.
22968    # However, it has the same basename, so the bogon will be chosen
22969    # first if we set WINLD to just the basename; use the full file name.
22970    shift
22971    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22972  fi
22973fi
22974fi
22975fi
22976WINLD=$ac_cv_prog_WINLD
22977if test -n "$WINLD"; then
22978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22979$as_echo "$WINLD" >&6; }
22980else
22981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22982$as_echo "no" >&6; }
22983fi
22984
22985
22986    # Since we must ignore the first found link, WINLD will contain
22987    # the full path to the link.exe program.
22988
22989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22990
22991  # First separate the path from the arguments. This will split at the first
22992  # space.
22993  complete="$WINLD"
22994  path="${complete%% *}"
22995  tmp="$complete EOL"
22996  arguments="${tmp#* }"
22997
22998  # Input might be given as Windows format, start by converting to
22999  # unix format.
23000  new_path=`$CYGPATH -u "$path"`
23001
23002  # Now try to locate executable using which
23003  new_path=`$WHICH "$new_path" 2> /dev/null`
23004  # bat and cmd files are not always considered executable in cygwin causing which
23005  # to not find them
23006  if test "x$new_path" = x \
23007      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23008      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23009    new_path=`$CYGPATH -u "$path"`
23010  fi
23011  if test "x$new_path" = x; then
23012    # Oops. Which didn't find the executable.
23013    # The splitting of arguments from the executable at a space might have been incorrect,
23014    # since paths with space are more likely in Windows. Give it another try with the whole
23015    # argument.
23016    path="$complete"
23017    arguments="EOL"
23018    new_path=`$CYGPATH -u "$path"`
23019    new_path=`$WHICH "$new_path" 2> /dev/null`
23020    # bat and cmd files are not always considered executable in cygwin causing which
23021    # to not find them
23022    if test "x$new_path" = x \
23023        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23024        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23025      new_path=`$CYGPATH -u "$path"`
23026    fi
23027    if test "x$new_path" = x; then
23028      # It's still not found. Now this is an unrecoverable error.
23029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23030$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23031      has_space=`$ECHO "$complete" | $GREP " "`
23032      if test "x$has_space" != x; then
23033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23035      fi
23036      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23037    fi
23038  fi
23039
23040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23043  # "foo.exe" is OK but "foo" is an error.
23044  #
23045  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23046  # It is also a way to make sure we got the proper file name for the real test later on.
23047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23048  if test "x$test_shortpath" = x; then
23049    # Short path failed, file does not exist as specified.
23050    # Try adding .exe or .cmd
23051    if test -f "${new_path}.exe"; then
23052      input_to_shortpath="${new_path}.exe"
23053    elif test -f "${new_path}.cmd"; then
23054      input_to_shortpath="${new_path}.cmd"
23055    else
23056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23057$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23060      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23061    fi
23062  else
23063    input_to_shortpath="$new_path"
23064  fi
23065
23066  # Call helper function which possibly converts this using DOS-style short mode.
23067  # If so, the updated path is stored in $new_path.
23068  new_path="$input_to_shortpath"
23069
23070  input_path="$input_to_shortpath"
23071  # Check if we need to convert this using DOS-style short mode. If the path
23072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23073  # take no chances and rewrite it.
23074  # Note: m4 eats our [], so we need to use [ and ] instead.
23075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23076  if test "x$has_forbidden_chars" != x; then
23077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23081      # Going to short mode and back again did indeed matter. Since short mode is
23082      # case insensitive, let's make it lowercase to improve readability.
23083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23084      # Now convert it back to Unix-stile (cygpath)
23085      input_path=`$CYGPATH -u "$shortmode_path"`
23086      new_path="$input_path"
23087    fi
23088  fi
23089
23090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23091  if test "x$test_cygdrive_prefix" = x; then
23092    # As a simple fix, exclude /usr/bin since it's not a real path.
23093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23095      # a path prefixed by /cygdrive for fixpath to work.
23096      new_path="$CYGWIN_ROOT_PATH$input_path"
23097    fi
23098  fi
23099
23100  # remove trailing .exe if any
23101  new_path="${new_path/%.exe/}"
23102
23103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23104
23105  # First separate the path from the arguments. This will split at the first
23106  # space.
23107  complete="$WINLD"
23108  path="${complete%% *}"
23109  tmp="$complete EOL"
23110  arguments="${tmp#* }"
23111
23112  # Input might be given as Windows format, start by converting to
23113  # unix format.
23114  new_path="$path"
23115
23116  windows_path="$new_path"
23117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23118    unix_path=`$CYGPATH -u "$windows_path"`
23119    new_path="$unix_path"
23120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23122    new_path="$unix_path"
23123  fi
23124
23125
23126  # Now try to locate executable using which
23127  new_path=`$WHICH "$new_path" 2> /dev/null`
23128
23129  if test "x$new_path" = x; then
23130    # Oops. Which didn't find the executable.
23131    # The splitting of arguments from the executable at a space might have been incorrect,
23132    # since paths with space are more likely in Windows. Give it another try with the whole
23133    # argument.
23134    path="$complete"
23135    arguments="EOL"
23136    new_path="$path"
23137
23138  windows_path="$new_path"
23139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23140    unix_path=`$CYGPATH -u "$windows_path"`
23141    new_path="$unix_path"
23142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23144    new_path="$unix_path"
23145  fi
23146
23147
23148    new_path=`$WHICH "$new_path" 2> /dev/null`
23149
23150    if test "x$new_path" = x; then
23151      # It's still not found. Now this is an unrecoverable error.
23152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23153$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23154      has_space=`$ECHO "$complete" | $GREP " "`
23155      if test "x$has_space" != x; then
23156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23158      fi
23159      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23160    fi
23161  fi
23162
23163  # Now new_path has a complete unix path to the binary
23164  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23165    # Keep paths in /bin as-is, but remove trailing .exe if any
23166    new_path="${new_path/%.exe/}"
23167    # Do not save /bin paths to all_fixpath_prefixes!
23168  else
23169    # Not in mixed or Windows style, start by that.
23170    new_path=`cmd //c echo $new_path`
23171
23172  input_path="$new_path"
23173  # Check if we need to convert this using DOS-style short mode. If the path
23174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23175  # take no chances and rewrite it.
23176  # Note: m4 eats our [], so we need to use [ and ] instead.
23177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23178  if test "x$has_forbidden_chars" != x; then
23179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181  fi
23182
23183    # Output is in $new_path
23184
23185  windows_path="$new_path"
23186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23187    unix_path=`$CYGPATH -u "$windows_path"`
23188    new_path="$unix_path"
23189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23191    new_path="$unix_path"
23192  fi
23193
23194    # remove trailing .exe if any
23195    new_path="${new_path/%.exe/}"
23196
23197    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23198    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23199  fi
23200
23201  else
23202    # We're on a posix platform. Hooray! :)
23203    # First separate the path from the arguments. This will split at the first
23204    # space.
23205    complete="$WINLD"
23206    path="${complete%% *}"
23207    tmp="$complete EOL"
23208    arguments="${tmp#* }"
23209
23210    # Cannot rely on the command "which" here since it doesn't always work.
23211    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23212    if test -z "$is_absolute_path"; then
23213      # Path to executable is not absolute. Find it.
23214      IFS_save="$IFS"
23215      IFS=:
23216      for p in $PATH; do
23217        if test -f "$p/$path" && test -x "$p/$path"; then
23218          new_path="$p/$path"
23219          break
23220        fi
23221      done
23222      IFS="$IFS_save"
23223    else
23224      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23225$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23226      new_path="$path"
23227    fi
23228
23229    if test "x$new_path" = x; then
23230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23231$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23232      has_space=`$ECHO "$complete" | $GREP " "`
23233      if test "x$has_space" != x; then
23234        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23235$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23236      fi
23237      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23238    fi
23239  fi
23240
23241  # Now join together the path and the arguments once again
23242  if test "x$arguments" != xEOL; then
23243    new_complete="$new_path ${arguments% *}"
23244  else
23245    new_complete="$new_path"
23246  fi
23247
23248  if test "x$complete" != "x$new_complete"; then
23249    WINLD="$new_complete"
23250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23251$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23252  fi
23253
23254    printf "Windows linker was found at $WINLD\n"
23255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23256$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23257    "$WINLD" --version > /dev/null
23258    if test $? -eq 0 ; then
23259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23260$as_echo "no" >&6; }
23261      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23262    else
23263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23264$as_echo "yes" >&6; }
23265    fi
23266    LD="$WINLD"
23267    LDEXE="$WINLD"
23268    LDCXX="$WINLD"
23269    LDEXECXX="$WINLD"
23270
23271    # Extract the first word of "mt", so it can be a program name with args.
23272set dummy mt; ac_word=$2
23273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23274$as_echo_n "checking for $ac_word... " >&6; }
23275if ${ac_cv_prog_MT+:} false; then :
23276  $as_echo_n "(cached) " >&6
23277else
23278  if test -n "$MT"; then
23279  ac_cv_prog_MT="$MT" # Let the user override the test.
23280else
23281  ac_prog_rejected=no
23282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23283for as_dir in $PATH
23284do
23285  IFS=$as_save_IFS
23286  test -z "$as_dir" && as_dir=.
23287    for ac_exec_ext in '' $ac_executable_extensions; do
23288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23289    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23290       ac_prog_rejected=yes
23291       continue
23292     fi
23293    ac_cv_prog_MT="mt"
23294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23295    break 2
23296  fi
23297done
23298  done
23299IFS=$as_save_IFS
23300
23301if test $ac_prog_rejected = yes; then
23302  # We found a bogon in the path, so make sure we never use it.
23303  set dummy $ac_cv_prog_MT
23304  shift
23305  if test $# != 0; then
23306    # We chose a different compiler from the bogus one.
23307    # However, it has the same basename, so the bogon will be chosen
23308    # first if we set MT to just the basename; use the full file name.
23309    shift
23310    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23311  fi
23312fi
23313fi
23314fi
23315MT=$ac_cv_prog_MT
23316if test -n "$MT"; then
23317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23318$as_echo "$MT" >&6; }
23319else
23320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23321$as_echo "no" >&6; }
23322fi
23323
23324
23325
23326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23327
23328  # First separate the path from the arguments. This will split at the first
23329  # space.
23330  complete="$MT"
23331  path="${complete%% *}"
23332  tmp="$complete EOL"
23333  arguments="${tmp#* }"
23334
23335  # Input might be given as Windows format, start by converting to
23336  # unix format.
23337  new_path=`$CYGPATH -u "$path"`
23338
23339  # Now try to locate executable using which
23340  new_path=`$WHICH "$new_path" 2> /dev/null`
23341  # bat and cmd files are not always considered executable in cygwin causing which
23342  # to not find them
23343  if test "x$new_path" = x \
23344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23346    new_path=`$CYGPATH -u "$path"`
23347  fi
23348  if test "x$new_path" = x; then
23349    # Oops. Which didn't find the executable.
23350    # The splitting of arguments from the executable at a space might have been incorrect,
23351    # since paths with space are more likely in Windows. Give it another try with the whole
23352    # argument.
23353    path="$complete"
23354    arguments="EOL"
23355    new_path=`$CYGPATH -u "$path"`
23356    new_path=`$WHICH "$new_path" 2> /dev/null`
23357    # bat and cmd files are not always considered executable in cygwin causing which
23358    # to not find them
23359    if test "x$new_path" = x \
23360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23362      new_path=`$CYGPATH -u "$path"`
23363    fi
23364    if test "x$new_path" = x; then
23365      # It's still not found. Now this is an unrecoverable error.
23366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23367$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23368      has_space=`$ECHO "$complete" | $GREP " "`
23369      if test "x$has_space" != x; then
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23372      fi
23373      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23374    fi
23375  fi
23376
23377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23380  # "foo.exe" is OK but "foo" is an error.
23381  #
23382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23383  # It is also a way to make sure we got the proper file name for the real test later on.
23384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23385  if test "x$test_shortpath" = x; then
23386    # Short path failed, file does not exist as specified.
23387    # Try adding .exe or .cmd
23388    if test -f "${new_path}.exe"; then
23389      input_to_shortpath="${new_path}.exe"
23390    elif test -f "${new_path}.cmd"; then
23391      input_to_shortpath="${new_path}.cmd"
23392    else
23393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23394$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23397      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23398    fi
23399  else
23400    input_to_shortpath="$new_path"
23401  fi
23402
23403  # Call helper function which possibly converts this using DOS-style short mode.
23404  # If so, the updated path is stored in $new_path.
23405  new_path="$input_to_shortpath"
23406
23407  input_path="$input_to_shortpath"
23408  # Check if we need to convert this using DOS-style short mode. If the path
23409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23410  # take no chances and rewrite it.
23411  # Note: m4 eats our [], so we need to use [ and ] instead.
23412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23413  if test "x$has_forbidden_chars" != x; then
23414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23418      # Going to short mode and back again did indeed matter. Since short mode is
23419      # case insensitive, let's make it lowercase to improve readability.
23420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23421      # Now convert it back to Unix-stile (cygpath)
23422      input_path=`$CYGPATH -u "$shortmode_path"`
23423      new_path="$input_path"
23424    fi
23425  fi
23426
23427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23428  if test "x$test_cygdrive_prefix" = x; then
23429    # As a simple fix, exclude /usr/bin since it's not a real path.
23430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23432      # a path prefixed by /cygdrive for fixpath to work.
23433      new_path="$CYGWIN_ROOT_PATH$input_path"
23434    fi
23435  fi
23436
23437  # remove trailing .exe if any
23438  new_path="${new_path/%.exe/}"
23439
23440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23441
23442  # First separate the path from the arguments. This will split at the first
23443  # space.
23444  complete="$MT"
23445  path="${complete%% *}"
23446  tmp="$complete EOL"
23447  arguments="${tmp#* }"
23448
23449  # Input might be given as Windows format, start by converting to
23450  # unix format.
23451  new_path="$path"
23452
23453  windows_path="$new_path"
23454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23455    unix_path=`$CYGPATH -u "$windows_path"`
23456    new_path="$unix_path"
23457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23459    new_path="$unix_path"
23460  fi
23461
23462
23463  # Now try to locate executable using which
23464  new_path=`$WHICH "$new_path" 2> /dev/null`
23465
23466  if test "x$new_path" = x; then
23467    # Oops. Which didn't find the executable.
23468    # The splitting of arguments from the executable at a space might have been incorrect,
23469    # since paths with space are more likely in Windows. Give it another try with the whole
23470    # argument.
23471    path="$complete"
23472    arguments="EOL"
23473    new_path="$path"
23474
23475  windows_path="$new_path"
23476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23477    unix_path=`$CYGPATH -u "$windows_path"`
23478    new_path="$unix_path"
23479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23481    new_path="$unix_path"
23482  fi
23483
23484
23485    new_path=`$WHICH "$new_path" 2> /dev/null`
23486
23487    if test "x$new_path" = x; then
23488      # It's still not found. Now this is an unrecoverable error.
23489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23490$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23491      has_space=`$ECHO "$complete" | $GREP " "`
23492      if test "x$has_space" != x; then
23493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23495      fi
23496      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23497    fi
23498  fi
23499
23500  # Now new_path has a complete unix path to the binary
23501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23502    # Keep paths in /bin as-is, but remove trailing .exe if any
23503    new_path="${new_path/%.exe/}"
23504    # Do not save /bin paths to all_fixpath_prefixes!
23505  else
23506    # Not in mixed or Windows style, start by that.
23507    new_path=`cmd //c echo $new_path`
23508
23509  input_path="$new_path"
23510  # Check if we need to convert this using DOS-style short mode. If the path
23511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23512  # take no chances and rewrite it.
23513  # Note: m4 eats our [], so we need to use [ and ] instead.
23514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23515  if test "x$has_forbidden_chars" != x; then
23516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23518  fi
23519
23520    # Output is in $new_path
23521
23522  windows_path="$new_path"
23523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23524    unix_path=`$CYGPATH -u "$windows_path"`
23525    new_path="$unix_path"
23526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23528    new_path="$unix_path"
23529  fi
23530
23531    # remove trailing .exe if any
23532    new_path="${new_path/%.exe/}"
23533
23534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23536  fi
23537
23538  else
23539    # We're on a posix platform. Hooray! :)
23540    # First separate the path from the arguments. This will split at the first
23541    # space.
23542    complete="$MT"
23543    path="${complete%% *}"
23544    tmp="$complete EOL"
23545    arguments="${tmp#* }"
23546
23547    # Cannot rely on the command "which" here since it doesn't always work.
23548    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23549    if test -z "$is_absolute_path"; then
23550      # Path to executable is not absolute. Find it.
23551      IFS_save="$IFS"
23552      IFS=:
23553      for p in $PATH; do
23554        if test -f "$p/$path" && test -x "$p/$path"; then
23555          new_path="$p/$path"
23556          break
23557        fi
23558      done
23559      IFS="$IFS_save"
23560    else
23561      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23562$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23563      new_path="$path"
23564    fi
23565
23566    if test "x$new_path" = x; then
23567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23568$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23569      has_space=`$ECHO "$complete" | $GREP " "`
23570      if test "x$has_space" != x; then
23571        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23573      fi
23574      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23575    fi
23576  fi
23577
23578  # Now join together the path and the arguments once again
23579  if test "x$arguments" != xEOL; then
23580    new_complete="$new_path ${arguments% *}"
23581  else
23582    new_complete="$new_path"
23583  fi
23584
23585  if test "x$complete" != "x$new_complete"; then
23586    MT="$new_complete"
23587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23588$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23589  fi
23590
23591    # The resource compiler
23592    # Extract the first word of "rc", so it can be a program name with args.
23593set dummy rc; ac_word=$2
23594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23595$as_echo_n "checking for $ac_word... " >&6; }
23596if ${ac_cv_prog_RC+:} false; then :
23597  $as_echo_n "(cached) " >&6
23598else
23599  if test -n "$RC"; then
23600  ac_cv_prog_RC="$RC" # Let the user override the test.
23601else
23602  ac_prog_rejected=no
23603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23604for as_dir in $PATH
23605do
23606  IFS=$as_save_IFS
23607  test -z "$as_dir" && as_dir=.
23608    for ac_exec_ext in '' $ac_executable_extensions; do
23609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23610    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23611       ac_prog_rejected=yes
23612       continue
23613     fi
23614    ac_cv_prog_RC="rc"
23615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23616    break 2
23617  fi
23618done
23619  done
23620IFS=$as_save_IFS
23621
23622if test $ac_prog_rejected = yes; then
23623  # We found a bogon in the path, so make sure we never use it.
23624  set dummy $ac_cv_prog_RC
23625  shift
23626  if test $# != 0; then
23627    # We chose a different compiler from the bogus one.
23628    # However, it has the same basename, so the bogon will be chosen
23629    # first if we set RC to just the basename; use the full file name.
23630    shift
23631    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23632  fi
23633fi
23634fi
23635fi
23636RC=$ac_cv_prog_RC
23637if test -n "$RC"; then
23638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23639$as_echo "$RC" >&6; }
23640else
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23642$as_echo "no" >&6; }
23643fi
23644
23645
23646
23647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23648
23649  # First separate the path from the arguments. This will split at the first
23650  # space.
23651  complete="$RC"
23652  path="${complete%% *}"
23653  tmp="$complete EOL"
23654  arguments="${tmp#* }"
23655
23656  # Input might be given as Windows format, start by converting to
23657  # unix format.
23658  new_path=`$CYGPATH -u "$path"`
23659
23660  # Now try to locate executable using which
23661  new_path=`$WHICH "$new_path" 2> /dev/null`
23662  # bat and cmd files are not always considered executable in cygwin causing which
23663  # to not find them
23664  if test "x$new_path" = x \
23665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23667    new_path=`$CYGPATH -u "$path"`
23668  fi
23669  if test "x$new_path" = x; then
23670    # Oops. Which didn't find the executable.
23671    # The splitting of arguments from the executable at a space might have been incorrect,
23672    # since paths with space are more likely in Windows. Give it another try with the whole
23673    # argument.
23674    path="$complete"
23675    arguments="EOL"
23676    new_path=`$CYGPATH -u "$path"`
23677    new_path=`$WHICH "$new_path" 2> /dev/null`
23678    # bat and cmd files are not always considered executable in cygwin causing which
23679    # to not find them
23680    if test "x$new_path" = x \
23681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23683      new_path=`$CYGPATH -u "$path"`
23684    fi
23685    if test "x$new_path" = x; then
23686      # It's still not found. Now this is an unrecoverable error.
23687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23688$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23689      has_space=`$ECHO "$complete" | $GREP " "`
23690      if test "x$has_space" != x; then
23691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23693      fi
23694      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23695    fi
23696  fi
23697
23698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23701  # "foo.exe" is OK but "foo" is an error.
23702  #
23703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
23704  # It is also a way to make sure we got the proper file name for the real test later on.
23705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23706  if test "x$test_shortpath" = x; then
23707    # Short path failed, file does not exist as specified.
23708    # Try adding .exe or .cmd
23709    if test -f "${new_path}.exe"; then
23710      input_to_shortpath="${new_path}.exe"
23711    elif test -f "${new_path}.cmd"; then
23712      input_to_shortpath="${new_path}.cmd"
23713    else
23714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23715$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23718      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23719    fi
23720  else
23721    input_to_shortpath="$new_path"
23722  fi
23723
23724  # Call helper function which possibly converts this using DOS-style short mode.
23725  # If so, the updated path is stored in $new_path.
23726  new_path="$input_to_shortpath"
23727
23728  input_path="$input_to_shortpath"
23729  # Check if we need to convert this using DOS-style short mode. If the path
23730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23731  # take no chances and rewrite it.
23732  # Note: m4 eats our [], so we need to use [ and ] instead.
23733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23734  if test "x$has_forbidden_chars" != x; then
23735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23739      # Going to short mode and back again did indeed matter. Since short mode is
23740      # case insensitive, let's make it lowercase to improve readability.
23741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23742      # Now convert it back to Unix-stile (cygpath)
23743      input_path=`$CYGPATH -u "$shortmode_path"`
23744      new_path="$input_path"
23745    fi
23746  fi
23747
23748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23749  if test "x$test_cygdrive_prefix" = x; then
23750    # As a simple fix, exclude /usr/bin since it's not a real path.
23751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23753      # a path prefixed by /cygdrive for fixpath to work.
23754      new_path="$CYGWIN_ROOT_PATH$input_path"
23755    fi
23756  fi
23757
23758  # remove trailing .exe if any
23759  new_path="${new_path/%.exe/}"
23760
23761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23762
23763  # First separate the path from the arguments. This will split at the first
23764  # space.
23765  complete="$RC"
23766  path="${complete%% *}"
23767  tmp="$complete EOL"
23768  arguments="${tmp#* }"
23769
23770  # Input might be given as Windows format, start by converting to
23771  # unix format.
23772  new_path="$path"
23773
23774  windows_path="$new_path"
23775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23776    unix_path=`$CYGPATH -u "$windows_path"`
23777    new_path="$unix_path"
23778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23780    new_path="$unix_path"
23781  fi
23782
23783
23784  # Now try to locate executable using which
23785  new_path=`$WHICH "$new_path" 2> /dev/null`
23786
23787  if test "x$new_path" = x; then
23788    # Oops. Which didn't find the executable.
23789    # The splitting of arguments from the executable at a space might have been incorrect,
23790    # since paths with space are more likely in Windows. Give it another try with the whole
23791    # argument.
23792    path="$complete"
23793    arguments="EOL"
23794    new_path="$path"
23795
23796  windows_path="$new_path"
23797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23798    unix_path=`$CYGPATH -u "$windows_path"`
23799    new_path="$unix_path"
23800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23802    new_path="$unix_path"
23803  fi
23804
23805
23806    new_path=`$WHICH "$new_path" 2> /dev/null`
23807
23808    if test "x$new_path" = x; then
23809      # It's still not found. Now this is an unrecoverable error.
23810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23811$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23812      has_space=`$ECHO "$complete" | $GREP " "`
23813      if test "x$has_space" != x; then
23814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23816      fi
23817      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23818    fi
23819  fi
23820
23821  # Now new_path has a complete unix path to the binary
23822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23823    # Keep paths in /bin as-is, but remove trailing .exe if any
23824    new_path="${new_path/%.exe/}"
23825    # Do not save /bin paths to all_fixpath_prefixes!
23826  else
23827    # Not in mixed or Windows style, start by that.
23828    new_path=`cmd //c echo $new_path`
23829
23830  input_path="$new_path"
23831  # Check if we need to convert this using DOS-style short mode. If the path
23832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23833  # take no chances and rewrite it.
23834  # Note: m4 eats our [], so we need to use [ and ] instead.
23835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23836  if test "x$has_forbidden_chars" != x; then
23837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23839  fi
23840
23841    # Output is in $new_path
23842
23843  windows_path="$new_path"
23844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23845    unix_path=`$CYGPATH -u "$windows_path"`
23846    new_path="$unix_path"
23847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23849    new_path="$unix_path"
23850  fi
23851
23852    # remove trailing .exe if any
23853    new_path="${new_path/%.exe/}"
23854
23855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23857  fi
23858
23859  else
23860    # We're on a posix platform. Hooray! :)
23861    # First separate the path from the arguments. This will split at the first
23862    # space.
23863    complete="$RC"
23864    path="${complete%% *}"
23865    tmp="$complete EOL"
23866    arguments="${tmp#* }"
23867
23868    # Cannot rely on the command "which" here since it doesn't always work.
23869    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23870    if test -z "$is_absolute_path"; then
23871      # Path to executable is not absolute. Find it.
23872      IFS_save="$IFS"
23873      IFS=:
23874      for p in $PATH; do
23875        if test -f "$p/$path" && test -x "$p/$path"; then
23876          new_path="$p/$path"
23877          break
23878        fi
23879      done
23880      IFS="$IFS_save"
23881    else
23882      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23883$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23884      new_path="$path"
23885    fi
23886
23887    if test "x$new_path" = x; then
23888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23889$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23890      has_space=`$ECHO "$complete" | $GREP " "`
23891      if test "x$has_space" != x; then
23892        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23893$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23894      fi
23895      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23896    fi
23897  fi
23898
23899  # Now join together the path and the arguments once again
23900  if test "x$arguments" != xEOL; then
23901    new_complete="$new_path ${arguments% *}"
23902  else
23903    new_complete="$new_path"
23904  fi
23905
23906  if test "x$complete" != "x$new_complete"; then
23907    RC="$new_complete"
23908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23909$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23910  fi
23911
23912
23913    # For hotspot, we need these in Windows mixed path,
23914    # so rewrite them all. Need added .exe suffix.
23915    HOTSPOT_CXX="$CXX.exe"
23916    HOTSPOT_LD="$LD.exe"
23917    HOTSPOT_MT="$MT.exe"
23918    HOTSPOT_RC="$RC.exe"
23919
23920  unix_path="$HOTSPOT_CXX"
23921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23922    windows_path=`$CYGPATH -m "$unix_path"`
23923    HOTSPOT_CXX="$windows_path"
23924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23925    windows_path=`cmd //c echo $unix_path`
23926    HOTSPOT_CXX="$windows_path"
23927  fi
23928
23929
23930  unix_path="$HOTSPOT_LD"
23931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23932    windows_path=`$CYGPATH -m "$unix_path"`
23933    HOTSPOT_LD="$windows_path"
23934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23935    windows_path=`cmd //c echo $unix_path`
23936    HOTSPOT_LD="$windows_path"
23937  fi
23938
23939
23940  unix_path="$HOTSPOT_MT"
23941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23942    windows_path=`$CYGPATH -m "$unix_path"`
23943    HOTSPOT_MT="$windows_path"
23944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23945    windows_path=`cmd //c echo $unix_path`
23946    HOTSPOT_MT="$windows_path"
23947  fi
23948
23949
23950  unix_path="$HOTSPOT_RC"
23951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23952    windows_path=`$CYGPATH -m "$unix_path"`
23953    HOTSPOT_RC="$windows_path"
23954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23955    windows_path=`cmd //c echo $unix_path`
23956    HOTSPOT_RC="$windows_path"
23957  fi
23958
23959
23960
23961
23962    RC_FLAGS="-nologo -l 0x409 -r"
23963    if test "x$VARIANT" = xOPT; then :
23964
23965    RC_FLAGS="$RC_FLAGS -d NDEBUG"
23966
23967fi
23968
23969  # The version variables used to create RC_FLAGS may be overridden
23970  # in a custom configure script, or possibly the command line.
23971  # Let those variables be expanded at make time in spec.gmk.
23972  # The \$ are escaped to the shell, and the $(...) variables
23973  # are evaluated by make.
23974  RC_FLAGS="$RC_FLAGS \
23975      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23976      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23977      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23978      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23979      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23980      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23981      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23982
23983  # lib.exe is used to create static libraries.
23984  # Extract the first word of "lib", so it can be a program name with args.
23985set dummy lib; ac_word=$2
23986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23987$as_echo_n "checking for $ac_word... " >&6; }
23988if ${ac_cv_prog_WINAR+:} false; then :
23989  $as_echo_n "(cached) " >&6
23990else
23991  if test -n "$WINAR"; then
23992  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23993else
23994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23995for as_dir in $PATH
23996do
23997  IFS=$as_save_IFS
23998  test -z "$as_dir" && as_dir=.
23999    for ac_exec_ext in '' $ac_executable_extensions; do
24000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24001    ac_cv_prog_WINAR="lib"
24002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24003    break 2
24004  fi
24005done
24006  done
24007IFS=$as_save_IFS
24008
24009fi
24010fi
24011WINAR=$ac_cv_prog_WINAR
24012if test -n "$WINAR"; then
24013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24014$as_echo "$WINAR" >&6; }
24015else
24016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24017$as_echo "no" >&6; }
24018fi
24019
24020
24021
24022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24023
24024  # First separate the path from the arguments. This will split at the first
24025  # space.
24026  complete="$WINAR"
24027  path="${complete%% *}"
24028  tmp="$complete EOL"
24029  arguments="${tmp#* }"
24030
24031  # Input might be given as Windows format, start by converting to
24032  # unix format.
24033  new_path=`$CYGPATH -u "$path"`
24034
24035  # Now try to locate executable using which
24036  new_path=`$WHICH "$new_path" 2> /dev/null`
24037  # bat and cmd files are not always considered executable in cygwin causing which
24038  # to not find them
24039  if test "x$new_path" = x \
24040      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24041      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24042    new_path=`$CYGPATH -u "$path"`
24043  fi
24044  if test "x$new_path" = x; then
24045    # Oops. Which didn't find the executable.
24046    # The splitting of arguments from the executable at a space might have been incorrect,
24047    # since paths with space are more likely in Windows. Give it another try with the whole
24048    # argument.
24049    path="$complete"
24050    arguments="EOL"
24051    new_path=`$CYGPATH -u "$path"`
24052    new_path=`$WHICH "$new_path" 2> /dev/null`
24053    # bat and cmd files are not always considered executable in cygwin causing which
24054    # to not find them
24055    if test "x$new_path" = x \
24056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24058      new_path=`$CYGPATH -u "$path"`
24059    fi
24060    if test "x$new_path" = x; then
24061      # It's still not found. Now this is an unrecoverable error.
24062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24063$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24064      has_space=`$ECHO "$complete" | $GREP " "`
24065      if test "x$has_space" != x; then
24066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24068      fi
24069      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24070    fi
24071  fi
24072
24073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24076  # "foo.exe" is OK but "foo" is an error.
24077  #
24078  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24079  # It is also a way to make sure we got the proper file name for the real test later on.
24080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24081  if test "x$test_shortpath" = x; then
24082    # Short path failed, file does not exist as specified.
24083    # Try adding .exe or .cmd
24084    if test -f "${new_path}.exe"; then
24085      input_to_shortpath="${new_path}.exe"
24086    elif test -f "${new_path}.cmd"; then
24087      input_to_shortpath="${new_path}.cmd"
24088    else
24089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24090$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24093      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24094    fi
24095  else
24096    input_to_shortpath="$new_path"
24097  fi
24098
24099  # Call helper function which possibly converts this using DOS-style short mode.
24100  # If so, the updated path is stored in $new_path.
24101  new_path="$input_to_shortpath"
24102
24103  input_path="$input_to_shortpath"
24104  # Check if we need to convert this using DOS-style short mode. If the path
24105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24106  # take no chances and rewrite it.
24107  # Note: m4 eats our [], so we need to use [ and ] instead.
24108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24109  if test "x$has_forbidden_chars" != x; then
24110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24114      # Going to short mode and back again did indeed matter. Since short mode is
24115      # case insensitive, let's make it lowercase to improve readability.
24116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24117      # Now convert it back to Unix-stile (cygpath)
24118      input_path=`$CYGPATH -u "$shortmode_path"`
24119      new_path="$input_path"
24120    fi
24121  fi
24122
24123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24124  if test "x$test_cygdrive_prefix" = x; then
24125    # As a simple fix, exclude /usr/bin since it's not a real path.
24126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24128      # a path prefixed by /cygdrive for fixpath to work.
24129      new_path="$CYGWIN_ROOT_PATH$input_path"
24130    fi
24131  fi
24132
24133  # remove trailing .exe if any
24134  new_path="${new_path/%.exe/}"
24135
24136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137
24138  # First separate the path from the arguments. This will split at the first
24139  # space.
24140  complete="$WINAR"
24141  path="${complete%% *}"
24142  tmp="$complete EOL"
24143  arguments="${tmp#* }"
24144
24145  # Input might be given as Windows format, start by converting to
24146  # unix format.
24147  new_path="$path"
24148
24149  windows_path="$new_path"
24150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24151    unix_path=`$CYGPATH -u "$windows_path"`
24152    new_path="$unix_path"
24153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24155    new_path="$unix_path"
24156  fi
24157
24158
24159  # Now try to locate executable using which
24160  new_path=`$WHICH "$new_path" 2> /dev/null`
24161
24162  if test "x$new_path" = x; then
24163    # Oops. Which didn't find the executable.
24164    # The splitting of arguments from the executable at a space might have been incorrect,
24165    # since paths with space are more likely in Windows. Give it another try with the whole
24166    # argument.
24167    path="$complete"
24168    arguments="EOL"
24169    new_path="$path"
24170
24171  windows_path="$new_path"
24172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24173    unix_path=`$CYGPATH -u "$windows_path"`
24174    new_path="$unix_path"
24175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24177    new_path="$unix_path"
24178  fi
24179
24180
24181    new_path=`$WHICH "$new_path" 2> /dev/null`
24182
24183    if test "x$new_path" = x; then
24184      # It's still not found. Now this is an unrecoverable error.
24185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24186$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24187      has_space=`$ECHO "$complete" | $GREP " "`
24188      if test "x$has_space" != x; then
24189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24191      fi
24192      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24193    fi
24194  fi
24195
24196  # Now new_path has a complete unix path to the binary
24197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24198    # Keep paths in /bin as-is, but remove trailing .exe if any
24199    new_path="${new_path/%.exe/}"
24200    # Do not save /bin paths to all_fixpath_prefixes!
24201  else
24202    # Not in mixed or Windows style, start by that.
24203    new_path=`cmd //c echo $new_path`
24204
24205  input_path="$new_path"
24206  # Check if we need to convert this using DOS-style short mode. If the path
24207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24208  # take no chances and rewrite it.
24209  # Note: m4 eats our [], so we need to use [ and ] instead.
24210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24211  if test "x$has_forbidden_chars" != x; then
24212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24214  fi
24215
24216    # Output is in $new_path
24217
24218  windows_path="$new_path"
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220    unix_path=`$CYGPATH -u "$windows_path"`
24221    new_path="$unix_path"
24222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24224    new_path="$unix_path"
24225  fi
24226
24227    # remove trailing .exe if any
24228    new_path="${new_path/%.exe/}"
24229
24230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24232  fi
24233
24234  else
24235    # We're on a posix platform. Hooray! :)
24236    # First separate the path from the arguments. This will split at the first
24237    # space.
24238    complete="$WINAR"
24239    path="${complete%% *}"
24240    tmp="$complete EOL"
24241    arguments="${tmp#* }"
24242
24243    # Cannot rely on the command "which" here since it doesn't always work.
24244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24245    if test -z "$is_absolute_path"; then
24246      # Path to executable is not absolute. Find it.
24247      IFS_save="$IFS"
24248      IFS=:
24249      for p in $PATH; do
24250        if test -f "$p/$path" && test -x "$p/$path"; then
24251          new_path="$p/$path"
24252          break
24253        fi
24254      done
24255      IFS="$IFS_save"
24256    else
24257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24258$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24259      new_path="$path"
24260    fi
24261
24262    if test "x$new_path" = x; then
24263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24264$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24265      has_space=`$ECHO "$complete" | $GREP " "`
24266      if test "x$has_space" != x; then
24267        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24269      fi
24270      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24271    fi
24272  fi
24273
24274  # Now join together the path and the arguments once again
24275  if test "x$arguments" != xEOL; then
24276    new_complete="$new_path ${arguments% *}"
24277  else
24278    new_complete="$new_path"
24279  fi
24280
24281  if test "x$complete" != "x$new_complete"; then
24282    WINAR="$new_complete"
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24284$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24285  fi
24286
24287  AR="$WINAR"
24288  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24289
24290  # Extract the first word of "dumpbin", so it can be a program name with args.
24291set dummy dumpbin; ac_word=$2
24292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24293$as_echo_n "checking for $ac_word... " >&6; }
24294if ${ac_cv_prog_DUMPBIN+:} false; then :
24295  $as_echo_n "(cached) " >&6
24296else
24297  if test -n "$DUMPBIN"; then
24298  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24299else
24300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24301for as_dir in $PATH
24302do
24303  IFS=$as_save_IFS
24304  test -z "$as_dir" && as_dir=.
24305    for ac_exec_ext in '' $ac_executable_extensions; do
24306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24307    ac_cv_prog_DUMPBIN="dumpbin"
24308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24309    break 2
24310  fi
24311done
24312  done
24313IFS=$as_save_IFS
24314
24315fi
24316fi
24317DUMPBIN=$ac_cv_prog_DUMPBIN
24318if test -n "$DUMPBIN"; then
24319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24320$as_echo "$DUMPBIN" >&6; }
24321else
24322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24323$as_echo "no" >&6; }
24324fi
24325
24326
24327
24328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24329
24330  # First separate the path from the arguments. This will split at the first
24331  # space.
24332  complete="$DUMPBIN"
24333  path="${complete%% *}"
24334  tmp="$complete EOL"
24335  arguments="${tmp#* }"
24336
24337  # Input might be given as Windows format, start by converting to
24338  # unix format.
24339  new_path=`$CYGPATH -u "$path"`
24340
24341  # Now try to locate executable using which
24342  new_path=`$WHICH "$new_path" 2> /dev/null`
24343  # bat and cmd files are not always considered executable in cygwin causing which
24344  # to not find them
24345  if test "x$new_path" = x \
24346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24348    new_path=`$CYGPATH -u "$path"`
24349  fi
24350  if test "x$new_path" = x; then
24351    # Oops. Which didn't find the executable.
24352    # The splitting of arguments from the executable at a space might have been incorrect,
24353    # since paths with space are more likely in Windows. Give it another try with the whole
24354    # argument.
24355    path="$complete"
24356    arguments="EOL"
24357    new_path=`$CYGPATH -u "$path"`
24358    new_path=`$WHICH "$new_path" 2> /dev/null`
24359    # bat and cmd files are not always considered executable in cygwin causing which
24360    # to not find them
24361    if test "x$new_path" = x \
24362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24364      new_path=`$CYGPATH -u "$path"`
24365    fi
24366    if test "x$new_path" = x; then
24367      # It's still not found. Now this is an unrecoverable error.
24368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24369$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24370      has_space=`$ECHO "$complete" | $GREP " "`
24371      if test "x$has_space" != x; then
24372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24374      fi
24375      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24376    fi
24377  fi
24378
24379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24382  # "foo.exe" is OK but "foo" is an error.
24383  #
24384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24385  # It is also a way to make sure we got the proper file name for the real test later on.
24386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24387  if test "x$test_shortpath" = x; then
24388    # Short path failed, file does not exist as specified.
24389    # Try adding .exe or .cmd
24390    if test -f "${new_path}.exe"; then
24391      input_to_shortpath="${new_path}.exe"
24392    elif test -f "${new_path}.cmd"; then
24393      input_to_shortpath="${new_path}.cmd"
24394    else
24395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24396$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24399      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24400    fi
24401  else
24402    input_to_shortpath="$new_path"
24403  fi
24404
24405  # Call helper function which possibly converts this using DOS-style short mode.
24406  # If so, the updated path is stored in $new_path.
24407  new_path="$input_to_shortpath"
24408
24409  input_path="$input_to_shortpath"
24410  # Check if we need to convert this using DOS-style short mode. If the path
24411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24412  # take no chances and rewrite it.
24413  # Note: m4 eats our [], so we need to use [ and ] instead.
24414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24415  if test "x$has_forbidden_chars" != x; then
24416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24420      # Going to short mode and back again did indeed matter. Since short mode is
24421      # case insensitive, let's make it lowercase to improve readability.
24422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24423      # Now convert it back to Unix-stile (cygpath)
24424      input_path=`$CYGPATH -u "$shortmode_path"`
24425      new_path="$input_path"
24426    fi
24427  fi
24428
24429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24430  if test "x$test_cygdrive_prefix" = x; then
24431    # As a simple fix, exclude /usr/bin since it's not a real path.
24432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24434      # a path prefixed by /cygdrive for fixpath to work.
24435      new_path="$CYGWIN_ROOT_PATH$input_path"
24436    fi
24437  fi
24438
24439  # remove trailing .exe if any
24440  new_path="${new_path/%.exe/}"
24441
24442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443
24444  # First separate the path from the arguments. This will split at the first
24445  # space.
24446  complete="$DUMPBIN"
24447  path="${complete%% *}"
24448  tmp="$complete EOL"
24449  arguments="${tmp#* }"
24450
24451  # Input might be given as Windows format, start by converting to
24452  # unix format.
24453  new_path="$path"
24454
24455  windows_path="$new_path"
24456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24457    unix_path=`$CYGPATH -u "$windows_path"`
24458    new_path="$unix_path"
24459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24461    new_path="$unix_path"
24462  fi
24463
24464
24465  # Now try to locate executable using which
24466  new_path=`$WHICH "$new_path" 2> /dev/null`
24467
24468  if test "x$new_path" = x; then
24469    # Oops. Which didn't find the executable.
24470    # The splitting of arguments from the executable at a space might have been incorrect,
24471    # since paths with space are more likely in Windows. Give it another try with the whole
24472    # argument.
24473    path="$complete"
24474    arguments="EOL"
24475    new_path="$path"
24476
24477  windows_path="$new_path"
24478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24479    unix_path=`$CYGPATH -u "$windows_path"`
24480    new_path="$unix_path"
24481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24483    new_path="$unix_path"
24484  fi
24485
24486
24487    new_path=`$WHICH "$new_path" 2> /dev/null`
24488
24489    if test "x$new_path" = x; then
24490      # It's still not found. Now this is an unrecoverable error.
24491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24492$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24493      has_space=`$ECHO "$complete" | $GREP " "`
24494      if test "x$has_space" != x; then
24495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24497      fi
24498      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24499    fi
24500  fi
24501
24502  # Now new_path has a complete unix path to the binary
24503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24504    # Keep paths in /bin as-is, but remove trailing .exe if any
24505    new_path="${new_path/%.exe/}"
24506    # Do not save /bin paths to all_fixpath_prefixes!
24507  else
24508    # Not in mixed or Windows style, start by that.
24509    new_path=`cmd //c echo $new_path`
24510
24511  input_path="$new_path"
24512  # Check if we need to convert this using DOS-style short mode. If the path
24513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24514  # take no chances and rewrite it.
24515  # Note: m4 eats our [], so we need to use [ and ] instead.
24516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24517  if test "x$has_forbidden_chars" != x; then
24518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24520  fi
24521
24522    # Output is in $new_path
24523
24524  windows_path="$new_path"
24525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24526    unix_path=`$CYGPATH -u "$windows_path"`
24527    new_path="$unix_path"
24528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24530    new_path="$unix_path"
24531  fi
24532
24533    # remove trailing .exe if any
24534    new_path="${new_path/%.exe/}"
24535
24536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24538  fi
24539
24540  else
24541    # We're on a posix platform. Hooray! :)
24542    # First separate the path from the arguments. This will split at the first
24543    # space.
24544    complete="$DUMPBIN"
24545    path="${complete%% *}"
24546    tmp="$complete EOL"
24547    arguments="${tmp#* }"
24548
24549    # Cannot rely on the command "which" here since it doesn't always work.
24550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24551    if test -z "$is_absolute_path"; then
24552      # Path to executable is not absolute. Find it.
24553      IFS_save="$IFS"
24554      IFS=:
24555      for p in $PATH; do
24556        if test -f "$p/$path" && test -x "$p/$path"; then
24557          new_path="$p/$path"
24558          break
24559        fi
24560      done
24561      IFS="$IFS_save"
24562    else
24563      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24564$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24565      new_path="$path"
24566    fi
24567
24568    if test "x$new_path" = x; then
24569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24570$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24571      has_space=`$ECHO "$complete" | $GREP " "`
24572      if test "x$has_space" != x; then
24573        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24575      fi
24576      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24577    fi
24578  fi
24579
24580  # Now join together the path and the arguments once again
24581  if test "x$arguments" != xEOL; then
24582    new_complete="$new_path ${arguments% *}"
24583  else
24584    new_complete="$new_path"
24585  fi
24586
24587  if test "x$complete" != "x$new_complete"; then
24588    DUMPBIN="$new_complete"
24589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24590$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24591  fi
24592
24593
24594      COMPILER_TYPE=CL
24595      CCXXFLAGS="$CCXXFLAGS -nologo"
24596
24597fi
24598
24599
24600
24601  ac_ext=c
24602ac_cpp='$CPP $CPPFLAGS'
24603ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24604ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24605ac_compiler_gnu=$ac_cv_c_compiler_gnu
24606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24607$as_echo_n "checking how to run the C preprocessor... " >&6; }
24608# On Suns, sometimes $CPP names a directory.
24609if test -n "$CPP" && test -d "$CPP"; then
24610  CPP=
24611fi
24612if test -z "$CPP"; then
24613  if ${ac_cv_prog_CPP+:} false; then :
24614  $as_echo_n "(cached) " >&6
24615else
24616      # Double quotes because CPP needs to be expanded
24617    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24618    do
24619      ac_preproc_ok=false
24620for ac_c_preproc_warn_flag in '' yes
24621do
24622  # Use a header file that comes with gcc, so configuring glibc
24623  # with a fresh cross-compiler works.
24624  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24625  # <limits.h> exists even on freestanding compilers.
24626  # On the NeXT, cc -E runs the code through the compiler's parser,
24627  # not just through cpp. "Syntax error" is here to catch this case.
24628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24629/* end confdefs.h.  */
24630#ifdef __STDC__
24631# include <limits.h>
24632#else
24633# include <assert.h>
24634#endif
24635		     Syntax error
24636_ACEOF
24637if ac_fn_c_try_cpp "$LINENO"; then :
24638
24639else
24640  # Broken: fails on valid input.
24641continue
24642fi
24643rm -f conftest.err conftest.i conftest.$ac_ext
24644
24645  # OK, works on sane cases.  Now check whether nonexistent headers
24646  # can be detected and how.
24647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24648/* end confdefs.h.  */
24649#include <ac_nonexistent.h>
24650_ACEOF
24651if ac_fn_c_try_cpp "$LINENO"; then :
24652  # Broken: success on invalid input.
24653continue
24654else
24655  # Passes both tests.
24656ac_preproc_ok=:
24657break
24658fi
24659rm -f conftest.err conftest.i conftest.$ac_ext
24660
24661done
24662# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24663rm -f conftest.i conftest.err conftest.$ac_ext
24664if $ac_preproc_ok; then :
24665  break
24666fi
24667
24668    done
24669    ac_cv_prog_CPP=$CPP
24670
24671fi
24672  CPP=$ac_cv_prog_CPP
24673else
24674  ac_cv_prog_CPP=$CPP
24675fi
24676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24677$as_echo "$CPP" >&6; }
24678ac_preproc_ok=false
24679for ac_c_preproc_warn_flag in '' yes
24680do
24681  # Use a header file that comes with gcc, so configuring glibc
24682  # with a fresh cross-compiler works.
24683  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24684  # <limits.h> exists even on freestanding compilers.
24685  # On the NeXT, cc -E runs the code through the compiler's parser,
24686  # not just through cpp. "Syntax error" is here to catch this case.
24687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24688/* end confdefs.h.  */
24689#ifdef __STDC__
24690# include <limits.h>
24691#else
24692# include <assert.h>
24693#endif
24694		     Syntax error
24695_ACEOF
24696if ac_fn_c_try_cpp "$LINENO"; then :
24697
24698else
24699  # Broken: fails on valid input.
24700continue
24701fi
24702rm -f conftest.err conftest.i conftest.$ac_ext
24703
24704  # OK, works on sane cases.  Now check whether nonexistent headers
24705  # can be detected and how.
24706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24707/* end confdefs.h.  */
24708#include <ac_nonexistent.h>
24709_ACEOF
24710if ac_fn_c_try_cpp "$LINENO"; then :
24711  # Broken: success on invalid input.
24712continue
24713else
24714  # Passes both tests.
24715ac_preproc_ok=:
24716break
24717fi
24718rm -f conftest.err conftest.i conftest.$ac_ext
24719
24720done
24721# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24722rm -f conftest.i conftest.err conftest.$ac_ext
24723if $ac_preproc_ok; then :
24724
24725else
24726  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24728as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24729See \`config.log' for more details" "$LINENO" 5; }
24730fi
24731
24732ac_ext=cpp
24733ac_cpp='$CXXCPP $CPPFLAGS'
24734ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24735ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24736ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24737
24738
24739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24740
24741  # First separate the path from the arguments. This will split at the first
24742  # space.
24743  complete="$CPP"
24744  path="${complete%% *}"
24745  tmp="$complete EOL"
24746  arguments="${tmp#* }"
24747
24748  # Input might be given as Windows format, start by converting to
24749  # unix format.
24750  new_path=`$CYGPATH -u "$path"`
24751
24752  # Now try to locate executable using which
24753  new_path=`$WHICH "$new_path" 2> /dev/null`
24754  # bat and cmd files are not always considered executable in cygwin causing which
24755  # to not find them
24756  if test "x$new_path" = x \
24757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24759    new_path=`$CYGPATH -u "$path"`
24760  fi
24761  if test "x$new_path" = x; then
24762    # Oops. Which didn't find the executable.
24763    # The splitting of arguments from the executable at a space might have been incorrect,
24764    # since paths with space are more likely in Windows. Give it another try with the whole
24765    # argument.
24766    path="$complete"
24767    arguments="EOL"
24768    new_path=`$CYGPATH -u "$path"`
24769    new_path=`$WHICH "$new_path" 2> /dev/null`
24770    # bat and cmd files are not always considered executable in cygwin causing which
24771    # to not find them
24772    if test "x$new_path" = x \
24773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24775      new_path=`$CYGPATH -u "$path"`
24776    fi
24777    if test "x$new_path" = x; then
24778      # It's still not found. Now this is an unrecoverable error.
24779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24780$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24781      has_space=`$ECHO "$complete" | $GREP " "`
24782      if test "x$has_space" != x; then
24783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24785      fi
24786      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24787    fi
24788  fi
24789
24790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24793  # "foo.exe" is OK but "foo" is an error.
24794  #
24795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
24796  # It is also a way to make sure we got the proper file name for the real test later on.
24797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24798  if test "x$test_shortpath" = x; then
24799    # Short path failed, file does not exist as specified.
24800    # Try adding .exe or .cmd
24801    if test -f "${new_path}.exe"; then
24802      input_to_shortpath="${new_path}.exe"
24803    elif test -f "${new_path}.cmd"; then
24804      input_to_shortpath="${new_path}.cmd"
24805    else
24806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24807$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24810      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24811    fi
24812  else
24813    input_to_shortpath="$new_path"
24814  fi
24815
24816  # Call helper function which possibly converts this using DOS-style short mode.
24817  # If so, the updated path is stored in $new_path.
24818  new_path="$input_to_shortpath"
24819
24820  input_path="$input_to_shortpath"
24821  # Check if we need to convert this using DOS-style short mode. If the path
24822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24823  # take no chances and rewrite it.
24824  # Note: m4 eats our [], so we need to use [ and ] instead.
24825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24826  if test "x$has_forbidden_chars" != x; then
24827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24831      # Going to short mode and back again did indeed matter. Since short mode is
24832      # case insensitive, let's make it lowercase to improve readability.
24833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24834      # Now convert it back to Unix-stile (cygpath)
24835      input_path=`$CYGPATH -u "$shortmode_path"`
24836      new_path="$input_path"
24837    fi
24838  fi
24839
24840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24841  if test "x$test_cygdrive_prefix" = x; then
24842    # As a simple fix, exclude /usr/bin since it's not a real path.
24843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24845      # a path prefixed by /cygdrive for fixpath to work.
24846      new_path="$CYGWIN_ROOT_PATH$input_path"
24847    fi
24848  fi
24849
24850  # remove trailing .exe if any
24851  new_path="${new_path/%.exe/}"
24852
24853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24854
24855  # First separate the path from the arguments. This will split at the first
24856  # space.
24857  complete="$CPP"
24858  path="${complete%% *}"
24859  tmp="$complete EOL"
24860  arguments="${tmp#* }"
24861
24862  # Input might be given as Windows format, start by converting to
24863  # unix format.
24864  new_path="$path"
24865
24866  windows_path="$new_path"
24867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24868    unix_path=`$CYGPATH -u "$windows_path"`
24869    new_path="$unix_path"
24870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24872    new_path="$unix_path"
24873  fi
24874
24875
24876  # Now try to locate executable using which
24877  new_path=`$WHICH "$new_path" 2> /dev/null`
24878
24879  if test "x$new_path" = x; then
24880    # Oops. Which didn't find the executable.
24881    # The splitting of arguments from the executable at a space might have been incorrect,
24882    # since paths with space are more likely in Windows. Give it another try with the whole
24883    # argument.
24884    path="$complete"
24885    arguments="EOL"
24886    new_path="$path"
24887
24888  windows_path="$new_path"
24889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24890    unix_path=`$CYGPATH -u "$windows_path"`
24891    new_path="$unix_path"
24892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24894    new_path="$unix_path"
24895  fi
24896
24897
24898    new_path=`$WHICH "$new_path" 2> /dev/null`
24899
24900    if test "x$new_path" = x; then
24901      # It's still not found. Now this is an unrecoverable error.
24902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24903$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24904      has_space=`$ECHO "$complete" | $GREP " "`
24905      if test "x$has_space" != x; then
24906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24908      fi
24909      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24910    fi
24911  fi
24912
24913  # Now new_path has a complete unix path to the binary
24914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24915    # Keep paths in /bin as-is, but remove trailing .exe if any
24916    new_path="${new_path/%.exe/}"
24917    # Do not save /bin paths to all_fixpath_prefixes!
24918  else
24919    # Not in mixed or Windows style, start by that.
24920    new_path=`cmd //c echo $new_path`
24921
24922  input_path="$new_path"
24923  # Check if we need to convert this using DOS-style short mode. If the path
24924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24925  # take no chances and rewrite it.
24926  # Note: m4 eats our [], so we need to use [ and ] instead.
24927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24928  if test "x$has_forbidden_chars" != x; then
24929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24931  fi
24932
24933    # Output is in $new_path
24934
24935  windows_path="$new_path"
24936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24937    unix_path=`$CYGPATH -u "$windows_path"`
24938    new_path="$unix_path"
24939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24941    new_path="$unix_path"
24942  fi
24943
24944    # remove trailing .exe if any
24945    new_path="${new_path/%.exe/}"
24946
24947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24949  fi
24950
24951  else
24952    # We're on a posix platform. Hooray! :)
24953    # First separate the path from the arguments. This will split at the first
24954    # space.
24955    complete="$CPP"
24956    path="${complete%% *}"
24957    tmp="$complete EOL"
24958    arguments="${tmp#* }"
24959
24960    # Cannot rely on the command "which" here since it doesn't always work.
24961    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24962    if test -z "$is_absolute_path"; then
24963      # Path to executable is not absolute. Find it.
24964      IFS_save="$IFS"
24965      IFS=:
24966      for p in $PATH; do
24967        if test -f "$p/$path" && test -x "$p/$path"; then
24968          new_path="$p/$path"
24969          break
24970        fi
24971      done
24972      IFS="$IFS_save"
24973    else
24974      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24975$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24976      new_path="$path"
24977    fi
24978
24979    if test "x$new_path" = x; then
24980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24981$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24982      has_space=`$ECHO "$complete" | $GREP " "`
24983      if test "x$has_space" != x; then
24984        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24986      fi
24987      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24988    fi
24989  fi
24990
24991  # Now join together the path and the arguments once again
24992  if test "x$arguments" != xEOL; then
24993    new_complete="$new_path ${arguments% *}"
24994  else
24995    new_complete="$new_path"
24996  fi
24997
24998  if test "x$complete" != "x$new_complete"; then
24999    CPP="$new_complete"
25000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25001$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25002  fi
25003
25004
25005  ac_ext=cpp
25006ac_cpp='$CXXCPP $CPPFLAGS'
25007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25011$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25012if test -z "$CXXCPP"; then
25013  if ${ac_cv_prog_CXXCPP+:} false; then :
25014  $as_echo_n "(cached) " >&6
25015else
25016      # Double quotes because CXXCPP needs to be expanded
25017    for CXXCPP in "$CXX -E" "/lib/cpp"
25018    do
25019      ac_preproc_ok=false
25020for ac_cxx_preproc_warn_flag in '' yes
25021do
25022  # Use a header file that comes with gcc, so configuring glibc
25023  # with a fresh cross-compiler works.
25024  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25025  # <limits.h> exists even on freestanding compilers.
25026  # On the NeXT, cc -E runs the code through the compiler's parser,
25027  # not just through cpp. "Syntax error" is here to catch this case.
25028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25029/* end confdefs.h.  */
25030#ifdef __STDC__
25031# include <limits.h>
25032#else
25033# include <assert.h>
25034#endif
25035		     Syntax error
25036_ACEOF
25037if ac_fn_cxx_try_cpp "$LINENO"; then :
25038
25039else
25040  # Broken: fails on valid input.
25041continue
25042fi
25043rm -f conftest.err conftest.i conftest.$ac_ext
25044
25045  # OK, works on sane cases.  Now check whether nonexistent headers
25046  # can be detected and how.
25047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25048/* end confdefs.h.  */
25049#include <ac_nonexistent.h>
25050_ACEOF
25051if ac_fn_cxx_try_cpp "$LINENO"; then :
25052  # Broken: success on invalid input.
25053continue
25054else
25055  # Passes both tests.
25056ac_preproc_ok=:
25057break
25058fi
25059rm -f conftest.err conftest.i conftest.$ac_ext
25060
25061done
25062# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25063rm -f conftest.i conftest.err conftest.$ac_ext
25064if $ac_preproc_ok; then :
25065  break
25066fi
25067
25068    done
25069    ac_cv_prog_CXXCPP=$CXXCPP
25070
25071fi
25072  CXXCPP=$ac_cv_prog_CXXCPP
25073else
25074  ac_cv_prog_CXXCPP=$CXXCPP
25075fi
25076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25077$as_echo "$CXXCPP" >&6; }
25078ac_preproc_ok=false
25079for ac_cxx_preproc_warn_flag in '' yes
25080do
25081  # Use a header file that comes with gcc, so configuring glibc
25082  # with a fresh cross-compiler works.
25083  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25084  # <limits.h> exists even on freestanding compilers.
25085  # On the NeXT, cc -E runs the code through the compiler's parser,
25086  # not just through cpp. "Syntax error" is here to catch this case.
25087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25088/* end confdefs.h.  */
25089#ifdef __STDC__
25090# include <limits.h>
25091#else
25092# include <assert.h>
25093#endif
25094		     Syntax error
25095_ACEOF
25096if ac_fn_cxx_try_cpp "$LINENO"; then :
25097
25098else
25099  # Broken: fails on valid input.
25100continue
25101fi
25102rm -f conftest.err conftest.i conftest.$ac_ext
25103
25104  # OK, works on sane cases.  Now check whether nonexistent headers
25105  # can be detected and how.
25106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25107/* end confdefs.h.  */
25108#include <ac_nonexistent.h>
25109_ACEOF
25110if ac_fn_cxx_try_cpp "$LINENO"; then :
25111  # Broken: success on invalid input.
25112continue
25113else
25114  # Passes both tests.
25115ac_preproc_ok=:
25116break
25117fi
25118rm -f conftest.err conftest.i conftest.$ac_ext
25119
25120done
25121# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25122rm -f conftest.i conftest.err conftest.$ac_ext
25123if $ac_preproc_ok; then :
25124
25125else
25126  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25128as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25129See \`config.log' for more details" "$LINENO" 5; }
25130fi
25131
25132ac_ext=cpp
25133ac_cpp='$CXXCPP $CPPFLAGS'
25134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25137
25138
25139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25140
25141  # First separate the path from the arguments. This will split at the first
25142  # space.
25143  complete="$CXXCPP"
25144  path="${complete%% *}"
25145  tmp="$complete EOL"
25146  arguments="${tmp#* }"
25147
25148  # Input might be given as Windows format, start by converting to
25149  # unix format.
25150  new_path=`$CYGPATH -u "$path"`
25151
25152  # Now try to locate executable using which
25153  new_path=`$WHICH "$new_path" 2> /dev/null`
25154  # bat and cmd files are not always considered executable in cygwin causing which
25155  # to not find them
25156  if test "x$new_path" = x \
25157      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25158      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25159    new_path=`$CYGPATH -u "$path"`
25160  fi
25161  if test "x$new_path" = x; then
25162    # Oops. Which didn't find the executable.
25163    # The splitting of arguments from the executable at a space might have been incorrect,
25164    # since paths with space are more likely in Windows. Give it another try with the whole
25165    # argument.
25166    path="$complete"
25167    arguments="EOL"
25168    new_path=`$CYGPATH -u "$path"`
25169    new_path=`$WHICH "$new_path" 2> /dev/null`
25170    # bat and cmd files are not always considered executable in cygwin causing which
25171    # to not find them
25172    if test "x$new_path" = x \
25173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25175      new_path=`$CYGPATH -u "$path"`
25176    fi
25177    if test "x$new_path" = x; then
25178      # It's still not found. Now this is an unrecoverable error.
25179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25180$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25181      has_space=`$ECHO "$complete" | $GREP " "`
25182      if test "x$has_space" != x; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25185      fi
25186      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25187    fi
25188  fi
25189
25190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25193  # "foo.exe" is OK but "foo" is an error.
25194  #
25195  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25196  # It is also a way to make sure we got the proper file name for the real test later on.
25197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25198  if test "x$test_shortpath" = x; then
25199    # Short path failed, file does not exist as specified.
25200    # Try adding .exe or .cmd
25201    if test -f "${new_path}.exe"; then
25202      input_to_shortpath="${new_path}.exe"
25203    elif test -f "${new_path}.cmd"; then
25204      input_to_shortpath="${new_path}.cmd"
25205    else
25206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25207$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25209$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25210      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25211    fi
25212  else
25213    input_to_shortpath="$new_path"
25214  fi
25215
25216  # Call helper function which possibly converts this using DOS-style short mode.
25217  # If so, the updated path is stored in $new_path.
25218  new_path="$input_to_shortpath"
25219
25220  input_path="$input_to_shortpath"
25221  # Check if we need to convert this using DOS-style short mode. If the path
25222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25223  # take no chances and rewrite it.
25224  # Note: m4 eats our [], so we need to use [ and ] instead.
25225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25226  if test "x$has_forbidden_chars" != x; then
25227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25231      # Going to short mode and back again did indeed matter. Since short mode is
25232      # case insensitive, let's make it lowercase to improve readability.
25233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25234      # Now convert it back to Unix-stile (cygpath)
25235      input_path=`$CYGPATH -u "$shortmode_path"`
25236      new_path="$input_path"
25237    fi
25238  fi
25239
25240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25241  if test "x$test_cygdrive_prefix" = x; then
25242    # As a simple fix, exclude /usr/bin since it's not a real path.
25243    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25245      # a path prefixed by /cygdrive for fixpath to work.
25246      new_path="$CYGWIN_ROOT_PATH$input_path"
25247    fi
25248  fi
25249
25250  # remove trailing .exe if any
25251  new_path="${new_path/%.exe/}"
25252
25253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25254
25255  # First separate the path from the arguments. This will split at the first
25256  # space.
25257  complete="$CXXCPP"
25258  path="${complete%% *}"
25259  tmp="$complete EOL"
25260  arguments="${tmp#* }"
25261
25262  # Input might be given as Windows format, start by converting to
25263  # unix format.
25264  new_path="$path"
25265
25266  windows_path="$new_path"
25267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25268    unix_path=`$CYGPATH -u "$windows_path"`
25269    new_path="$unix_path"
25270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25272    new_path="$unix_path"
25273  fi
25274
25275
25276  # Now try to locate executable using which
25277  new_path=`$WHICH "$new_path" 2> /dev/null`
25278
25279  if test "x$new_path" = x; then
25280    # Oops. Which didn't find the executable.
25281    # The splitting of arguments from the executable at a space might have been incorrect,
25282    # since paths with space are more likely in Windows. Give it another try with the whole
25283    # argument.
25284    path="$complete"
25285    arguments="EOL"
25286    new_path="$path"
25287
25288  windows_path="$new_path"
25289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25290    unix_path=`$CYGPATH -u "$windows_path"`
25291    new_path="$unix_path"
25292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25294    new_path="$unix_path"
25295  fi
25296
25297
25298    new_path=`$WHICH "$new_path" 2> /dev/null`
25299
25300    if test "x$new_path" = x; then
25301      # It's still not found. Now this is an unrecoverable error.
25302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25303$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25304      has_space=`$ECHO "$complete" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25308      fi
25309      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25310    fi
25311  fi
25312
25313  # Now new_path has a complete unix path to the binary
25314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25315    # Keep paths in /bin as-is, but remove trailing .exe if any
25316    new_path="${new_path/%.exe/}"
25317    # Do not save /bin paths to all_fixpath_prefixes!
25318  else
25319    # Not in mixed or Windows style, start by that.
25320    new_path=`cmd //c echo $new_path`
25321
25322  input_path="$new_path"
25323  # Check if we need to convert this using DOS-style short mode. If the path
25324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25325  # take no chances and rewrite it.
25326  # Note: m4 eats our [], so we need to use [ and ] instead.
25327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25328  if test "x$has_forbidden_chars" != x; then
25329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25331  fi
25332
25333    # Output is in $new_path
25334
25335  windows_path="$new_path"
25336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25337    unix_path=`$CYGPATH -u "$windows_path"`
25338    new_path="$unix_path"
25339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25341    new_path="$unix_path"
25342  fi
25343
25344    # remove trailing .exe if any
25345    new_path="${new_path/%.exe/}"
25346
25347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25349  fi
25350
25351  else
25352    # We're on a posix platform. Hooray! :)
25353    # First separate the path from the arguments. This will split at the first
25354    # space.
25355    complete="$CXXCPP"
25356    path="${complete%% *}"
25357    tmp="$complete EOL"
25358    arguments="${tmp#* }"
25359
25360    # Cannot rely on the command "which" here since it doesn't always work.
25361    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25362    if test -z "$is_absolute_path"; then
25363      # Path to executable is not absolute. Find it.
25364      IFS_save="$IFS"
25365      IFS=:
25366      for p in $PATH; do
25367        if test -f "$p/$path" && test -x "$p/$path"; then
25368          new_path="$p/$path"
25369          break
25370        fi
25371      done
25372      IFS="$IFS_save"
25373    else
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25375$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25376      new_path="$path"
25377    fi
25378
25379    if test "x$new_path" = x; then
25380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25381$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25382      has_space=`$ECHO "$complete" | $GREP " "`
25383      if test "x$has_space" != x; then
25384        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25386      fi
25387      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25388    fi
25389  fi
25390
25391  # Now join together the path and the arguments once again
25392  if test "x$arguments" != xEOL; then
25393    new_complete="$new_path ${arguments% *}"
25394  else
25395    new_complete="$new_path"
25396  fi
25397
25398  if test "x$complete" != "x$new_complete"; then
25399    CXXCPP="$new_complete"
25400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25401$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25402  fi
25403
25404
25405  if test "x$COMPILE_TYPE" != "xcross"; then
25406    # If we are not cross compiling, use the same compilers for
25407    # building the build platform executables. The cross-compilation
25408    # case needed to be done earlier, but this can only be done after
25409    # the native tools have been localized.
25410    BUILD_CC="$CC"
25411    BUILD_CXX="$CXX"
25412    BUILD_LD="$LD"
25413  fi
25414
25415  # for solaris we really need solaris tools, and not gnu equivalent
25416  #   these seems to normally reside in /usr/ccs/bin so add that to path before
25417  #   starting to probe
25418  #
25419  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25420  #         so that it can be overriden --with-tools-dir
25421  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25422    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25423  fi
25424
25425  # Find the right assembler.
25426  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25427    # Extract the first word of "as", so it can be a program name with args.
25428set dummy as; ac_word=$2
25429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25430$as_echo_n "checking for $ac_word... " >&6; }
25431if ${ac_cv_path_AS+:} false; then :
25432  $as_echo_n "(cached) " >&6
25433else
25434  case $AS in
25435  [\\/]* | ?:[\\/]*)
25436  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25437  ;;
25438  *)
25439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25440for as_dir in $PATH
25441do
25442  IFS=$as_save_IFS
25443  test -z "$as_dir" && as_dir=.
25444    for ac_exec_ext in '' $ac_executable_extensions; do
25445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25446    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25448    break 2
25449  fi
25450done
25451  done
25452IFS=$as_save_IFS
25453
25454  ;;
25455esac
25456fi
25457AS=$ac_cv_path_AS
25458if test -n "$AS"; then
25459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25460$as_echo "$AS" >&6; }
25461else
25462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25463$as_echo "no" >&6; }
25464fi
25465
25466
25467
25468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25469
25470  # First separate the path from the arguments. This will split at the first
25471  # space.
25472  complete="$AS"
25473  path="${complete%% *}"
25474  tmp="$complete EOL"
25475  arguments="${tmp#* }"
25476
25477  # Input might be given as Windows format, start by converting to
25478  # unix format.
25479  new_path=`$CYGPATH -u "$path"`
25480
25481  # Now try to locate executable using which
25482  new_path=`$WHICH "$new_path" 2> /dev/null`
25483  # bat and cmd files are not always considered executable in cygwin causing which
25484  # to not find them
25485  if test "x$new_path" = x \
25486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25488    new_path=`$CYGPATH -u "$path"`
25489  fi
25490  if test "x$new_path" = x; then
25491    # Oops. Which didn't find the executable.
25492    # The splitting of arguments from the executable at a space might have been incorrect,
25493    # since paths with space are more likely in Windows. Give it another try with the whole
25494    # argument.
25495    path="$complete"
25496    arguments="EOL"
25497    new_path=`$CYGPATH -u "$path"`
25498    new_path=`$WHICH "$new_path" 2> /dev/null`
25499    # bat and cmd files are not always considered executable in cygwin causing which
25500    # to not find them
25501    if test "x$new_path" = x \
25502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25504      new_path=`$CYGPATH -u "$path"`
25505    fi
25506    if test "x$new_path" = x; then
25507      # It's still not found. Now this is an unrecoverable error.
25508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25509$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25510      has_space=`$ECHO "$complete" | $GREP " "`
25511      if test "x$has_space" != x; then
25512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25514      fi
25515      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25516    fi
25517  fi
25518
25519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25522  # "foo.exe" is OK but "foo" is an error.
25523  #
25524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25525  # It is also a way to make sure we got the proper file name for the real test later on.
25526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25527  if test "x$test_shortpath" = x; then
25528    # Short path failed, file does not exist as specified.
25529    # Try adding .exe or .cmd
25530    if test -f "${new_path}.exe"; then
25531      input_to_shortpath="${new_path}.exe"
25532    elif test -f "${new_path}.cmd"; then
25533      input_to_shortpath="${new_path}.cmd"
25534    else
25535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25536$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25539      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25540    fi
25541  else
25542    input_to_shortpath="$new_path"
25543  fi
25544
25545  # Call helper function which possibly converts this using DOS-style short mode.
25546  # If so, the updated path is stored in $new_path.
25547  new_path="$input_to_shortpath"
25548
25549  input_path="$input_to_shortpath"
25550  # Check if we need to convert this using DOS-style short mode. If the path
25551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25552  # take no chances and rewrite it.
25553  # Note: m4 eats our [], so we need to use [ and ] instead.
25554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25555  if test "x$has_forbidden_chars" != x; then
25556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25560      # Going to short mode and back again did indeed matter. Since short mode is
25561      # case insensitive, let's make it lowercase to improve readability.
25562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25563      # Now convert it back to Unix-stile (cygpath)
25564      input_path=`$CYGPATH -u "$shortmode_path"`
25565      new_path="$input_path"
25566    fi
25567  fi
25568
25569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25570  if test "x$test_cygdrive_prefix" = x; then
25571    # As a simple fix, exclude /usr/bin since it's not a real path.
25572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25574      # a path prefixed by /cygdrive for fixpath to work.
25575      new_path="$CYGWIN_ROOT_PATH$input_path"
25576    fi
25577  fi
25578
25579  # remove trailing .exe if any
25580  new_path="${new_path/%.exe/}"
25581
25582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25583
25584  # First separate the path from the arguments. This will split at the first
25585  # space.
25586  complete="$AS"
25587  path="${complete%% *}"
25588  tmp="$complete EOL"
25589  arguments="${tmp#* }"
25590
25591  # Input might be given as Windows format, start by converting to
25592  # unix format.
25593  new_path="$path"
25594
25595  windows_path="$new_path"
25596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25597    unix_path=`$CYGPATH -u "$windows_path"`
25598    new_path="$unix_path"
25599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25601    new_path="$unix_path"
25602  fi
25603
25604
25605  # Now try to locate executable using which
25606  new_path=`$WHICH "$new_path" 2> /dev/null`
25607
25608  if test "x$new_path" = x; then
25609    # Oops. Which didn't find the executable.
25610    # The splitting of arguments from the executable at a space might have been incorrect,
25611    # since paths with space are more likely in Windows. Give it another try with the whole
25612    # argument.
25613    path="$complete"
25614    arguments="EOL"
25615    new_path="$path"
25616
25617  windows_path="$new_path"
25618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25619    unix_path=`$CYGPATH -u "$windows_path"`
25620    new_path="$unix_path"
25621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25623    new_path="$unix_path"
25624  fi
25625
25626
25627    new_path=`$WHICH "$new_path" 2> /dev/null`
25628
25629    if test "x$new_path" = x; then
25630      # It's still not found. Now this is an unrecoverable error.
25631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25632$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25633      has_space=`$ECHO "$complete" | $GREP " "`
25634      if test "x$has_space" != x; then
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25637      fi
25638      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25639    fi
25640  fi
25641
25642  # Now new_path has a complete unix path to the binary
25643  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25644    # Keep paths in /bin as-is, but remove trailing .exe if any
25645    new_path="${new_path/%.exe/}"
25646    # Do not save /bin paths to all_fixpath_prefixes!
25647  else
25648    # Not in mixed or Windows style, start by that.
25649    new_path=`cmd //c echo $new_path`
25650
25651  input_path="$new_path"
25652  # Check if we need to convert this using DOS-style short mode. If the path
25653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25654  # take no chances and rewrite it.
25655  # Note: m4 eats our [], so we need to use [ and ] instead.
25656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25657  if test "x$has_forbidden_chars" != x; then
25658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25660  fi
25661
25662    # Output is in $new_path
25663
25664  windows_path="$new_path"
25665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666    unix_path=`$CYGPATH -u "$windows_path"`
25667    new_path="$unix_path"
25668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670    new_path="$unix_path"
25671  fi
25672
25673    # remove trailing .exe if any
25674    new_path="${new_path/%.exe/}"
25675
25676    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25677    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25678  fi
25679
25680  else
25681    # We're on a posix platform. Hooray! :)
25682    # First separate the path from the arguments. This will split at the first
25683    # space.
25684    complete="$AS"
25685    path="${complete%% *}"
25686    tmp="$complete EOL"
25687    arguments="${tmp#* }"
25688
25689    # Cannot rely on the command "which" here since it doesn't always work.
25690    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25691    if test -z "$is_absolute_path"; then
25692      # Path to executable is not absolute. Find it.
25693      IFS_save="$IFS"
25694      IFS=:
25695      for p in $PATH; do
25696        if test -f "$p/$path" && test -x "$p/$path"; then
25697          new_path="$p/$path"
25698          break
25699        fi
25700      done
25701      IFS="$IFS_save"
25702    else
25703      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25704$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25705      new_path="$path"
25706    fi
25707
25708    if test "x$new_path" = x; then
25709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25710$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25711      has_space=`$ECHO "$complete" | $GREP " "`
25712      if test "x$has_space" != x; then
25713        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25714$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25715      fi
25716      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25717    fi
25718  fi
25719
25720  # Now join together the path and the arguments once again
25721  if test "x$arguments" != xEOL; then
25722    new_complete="$new_path ${arguments% *}"
25723  else
25724    new_complete="$new_path"
25725  fi
25726
25727  if test "x$complete" != "x$new_complete"; then
25728    AS="$new_complete"
25729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25730$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25731  fi
25732
25733  else
25734    AS="$CC -c"
25735  fi
25736
25737
25738  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25739    # Extract the first word of "nm", so it can be a program name with args.
25740set dummy nm; ac_word=$2
25741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25742$as_echo_n "checking for $ac_word... " >&6; }
25743if ${ac_cv_path_NM+:} false; then :
25744  $as_echo_n "(cached) " >&6
25745else
25746  case $NM in
25747  [\\/]* | ?:[\\/]*)
25748  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25749  ;;
25750  *)
25751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25752for as_dir in $PATH
25753do
25754  IFS=$as_save_IFS
25755  test -z "$as_dir" && as_dir=.
25756    for ac_exec_ext in '' $ac_executable_extensions; do
25757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25758    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25760    break 2
25761  fi
25762done
25763  done
25764IFS=$as_save_IFS
25765
25766  ;;
25767esac
25768fi
25769NM=$ac_cv_path_NM
25770if test -n "$NM"; then
25771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25772$as_echo "$NM" >&6; }
25773else
25774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25775$as_echo "no" >&6; }
25776fi
25777
25778
25779
25780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25781
25782  # First separate the path from the arguments. This will split at the first
25783  # space.
25784  complete="$NM"
25785  path="${complete%% *}"
25786  tmp="$complete EOL"
25787  arguments="${tmp#* }"
25788
25789  # Input might be given as Windows format, start by converting to
25790  # unix format.
25791  new_path=`$CYGPATH -u "$path"`
25792
25793  # Now try to locate executable using which
25794  new_path=`$WHICH "$new_path" 2> /dev/null`
25795  # bat and cmd files are not always considered executable in cygwin causing which
25796  # to not find them
25797  if test "x$new_path" = x \
25798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25800    new_path=`$CYGPATH -u "$path"`
25801  fi
25802  if test "x$new_path" = x; then
25803    # Oops. Which didn't find the executable.
25804    # The splitting of arguments from the executable at a space might have been incorrect,
25805    # since paths with space are more likely in Windows. Give it another try with the whole
25806    # argument.
25807    path="$complete"
25808    arguments="EOL"
25809    new_path=`$CYGPATH -u "$path"`
25810    new_path=`$WHICH "$new_path" 2> /dev/null`
25811    # bat and cmd files are not always considered executable in cygwin causing which
25812    # to not find them
25813    if test "x$new_path" = x \
25814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25816      new_path=`$CYGPATH -u "$path"`
25817    fi
25818    if test "x$new_path" = x; then
25819      # It's still not found. Now this is an unrecoverable error.
25820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25821$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25822      has_space=`$ECHO "$complete" | $GREP " "`
25823      if test "x$has_space" != x; then
25824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25826      fi
25827      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25828    fi
25829  fi
25830
25831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25834  # "foo.exe" is OK but "foo" is an error.
25835  #
25836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
25837  # It is also a way to make sure we got the proper file name for the real test later on.
25838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25839  if test "x$test_shortpath" = x; then
25840    # Short path failed, file does not exist as specified.
25841    # Try adding .exe or .cmd
25842    if test -f "${new_path}.exe"; then
25843      input_to_shortpath="${new_path}.exe"
25844    elif test -f "${new_path}.cmd"; then
25845      input_to_shortpath="${new_path}.cmd"
25846    else
25847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25848$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25851      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25852    fi
25853  else
25854    input_to_shortpath="$new_path"
25855  fi
25856
25857  # Call helper function which possibly converts this using DOS-style short mode.
25858  # If so, the updated path is stored in $new_path.
25859  new_path="$input_to_shortpath"
25860
25861  input_path="$input_to_shortpath"
25862  # Check if we need to convert this using DOS-style short mode. If the path
25863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25864  # take no chances and rewrite it.
25865  # Note: m4 eats our [], so we need to use [ and ] instead.
25866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25867  if test "x$has_forbidden_chars" != x; then
25868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25872      # Going to short mode and back again did indeed matter. Since short mode is
25873      # case insensitive, let's make it lowercase to improve readability.
25874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25875      # Now convert it back to Unix-stile (cygpath)
25876      input_path=`$CYGPATH -u "$shortmode_path"`
25877      new_path="$input_path"
25878    fi
25879  fi
25880
25881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25882  if test "x$test_cygdrive_prefix" = x; then
25883    # As a simple fix, exclude /usr/bin since it's not a real path.
25884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25886      # a path prefixed by /cygdrive for fixpath to work.
25887      new_path="$CYGWIN_ROOT_PATH$input_path"
25888    fi
25889  fi
25890
25891  # remove trailing .exe if any
25892  new_path="${new_path/%.exe/}"
25893
25894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25895
25896  # First separate the path from the arguments. This will split at the first
25897  # space.
25898  complete="$NM"
25899  path="${complete%% *}"
25900  tmp="$complete EOL"
25901  arguments="${tmp#* }"
25902
25903  # Input might be given as Windows format, start by converting to
25904  # unix format.
25905  new_path="$path"
25906
25907  windows_path="$new_path"
25908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25909    unix_path=`$CYGPATH -u "$windows_path"`
25910    new_path="$unix_path"
25911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25913    new_path="$unix_path"
25914  fi
25915
25916
25917  # Now try to locate executable using which
25918  new_path=`$WHICH "$new_path" 2> /dev/null`
25919
25920  if test "x$new_path" = x; then
25921    # Oops. Which didn't find the executable.
25922    # The splitting of arguments from the executable at a space might have been incorrect,
25923    # since paths with space are more likely in Windows. Give it another try with the whole
25924    # argument.
25925    path="$complete"
25926    arguments="EOL"
25927    new_path="$path"
25928
25929  windows_path="$new_path"
25930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25931    unix_path=`$CYGPATH -u "$windows_path"`
25932    new_path="$unix_path"
25933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25935    new_path="$unix_path"
25936  fi
25937
25938
25939    new_path=`$WHICH "$new_path" 2> /dev/null`
25940
25941    if test "x$new_path" = x; then
25942      # It's still not found. Now this is an unrecoverable error.
25943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25944$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25945      has_space=`$ECHO "$complete" | $GREP " "`
25946      if test "x$has_space" != x; then
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25949      fi
25950      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25951    fi
25952  fi
25953
25954  # Now new_path has a complete unix path to the binary
25955  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25956    # Keep paths in /bin as-is, but remove trailing .exe if any
25957    new_path="${new_path/%.exe/}"
25958    # Do not save /bin paths to all_fixpath_prefixes!
25959  else
25960    # Not in mixed or Windows style, start by that.
25961    new_path=`cmd //c echo $new_path`
25962
25963  input_path="$new_path"
25964  # Check if we need to convert this using DOS-style short mode. If the path
25965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25966  # take no chances and rewrite it.
25967  # Note: m4 eats our [], so we need to use [ and ] instead.
25968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25969  if test "x$has_forbidden_chars" != x; then
25970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25972  fi
25973
25974    # Output is in $new_path
25975
25976  windows_path="$new_path"
25977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25978    unix_path=`$CYGPATH -u "$windows_path"`
25979    new_path="$unix_path"
25980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25982    new_path="$unix_path"
25983  fi
25984
25985    # remove trailing .exe if any
25986    new_path="${new_path/%.exe/}"
25987
25988    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25989    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25990  fi
25991
25992  else
25993    # We're on a posix platform. Hooray! :)
25994    # First separate the path from the arguments. This will split at the first
25995    # space.
25996    complete="$NM"
25997    path="${complete%% *}"
25998    tmp="$complete EOL"
25999    arguments="${tmp#* }"
26000
26001    # Cannot rely on the command "which" here since it doesn't always work.
26002    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26003    if test -z "$is_absolute_path"; then
26004      # Path to executable is not absolute. Find it.
26005      IFS_save="$IFS"
26006      IFS=:
26007      for p in $PATH; do
26008        if test -f "$p/$path" && test -x "$p/$path"; then
26009          new_path="$p/$path"
26010          break
26011        fi
26012      done
26013      IFS="$IFS_save"
26014    else
26015      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26016$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26017      new_path="$path"
26018    fi
26019
26020    if test "x$new_path" = x; then
26021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26022$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26023      has_space=`$ECHO "$complete" | $GREP " "`
26024      if test "x$has_space" != x; then
26025        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26026$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26027      fi
26028      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26029    fi
26030  fi
26031
26032  # Now join together the path and the arguments once again
26033  if test "x$arguments" != xEOL; then
26034    new_complete="$new_path ${arguments% *}"
26035  else
26036    new_complete="$new_path"
26037  fi
26038
26039  if test "x$complete" != "x$new_complete"; then
26040    NM="$new_complete"
26041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26042$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26043  fi
26044
26045    # Extract the first word of "gnm", so it can be a program name with args.
26046set dummy gnm; ac_word=$2
26047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26048$as_echo_n "checking for $ac_word... " >&6; }
26049if ${ac_cv_path_GNM+:} false; then :
26050  $as_echo_n "(cached) " >&6
26051else
26052  case $GNM in
26053  [\\/]* | ?:[\\/]*)
26054  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26055  ;;
26056  *)
26057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26058for as_dir in $PATH
26059do
26060  IFS=$as_save_IFS
26061  test -z "$as_dir" && as_dir=.
26062    for ac_exec_ext in '' $ac_executable_extensions; do
26063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26064    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26066    break 2
26067  fi
26068done
26069  done
26070IFS=$as_save_IFS
26071
26072  ;;
26073esac
26074fi
26075GNM=$ac_cv_path_GNM
26076if test -n "$GNM"; then
26077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26078$as_echo "$GNM" >&6; }
26079else
26080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26081$as_echo "no" >&6; }
26082fi
26083
26084
26085
26086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26087
26088  # First separate the path from the arguments. This will split at the first
26089  # space.
26090  complete="$GNM"
26091  path="${complete%% *}"
26092  tmp="$complete EOL"
26093  arguments="${tmp#* }"
26094
26095  # Input might be given as Windows format, start by converting to
26096  # unix format.
26097  new_path=`$CYGPATH -u "$path"`
26098
26099  # Now try to locate executable using which
26100  new_path=`$WHICH "$new_path" 2> /dev/null`
26101  # bat and cmd files are not always considered executable in cygwin causing which
26102  # to not find them
26103  if test "x$new_path" = x \
26104      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26105      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26106    new_path=`$CYGPATH -u "$path"`
26107  fi
26108  if test "x$new_path" = x; then
26109    # Oops. Which didn't find the executable.
26110    # The splitting of arguments from the executable at a space might have been incorrect,
26111    # since paths with space are more likely in Windows. Give it another try with the whole
26112    # argument.
26113    path="$complete"
26114    arguments="EOL"
26115    new_path=`$CYGPATH -u "$path"`
26116    new_path=`$WHICH "$new_path" 2> /dev/null`
26117    # bat and cmd files are not always considered executable in cygwin causing which
26118    # to not find them
26119    if test "x$new_path" = x \
26120        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26121        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26122      new_path=`$CYGPATH -u "$path"`
26123    fi
26124    if test "x$new_path" = x; then
26125      # It's still not found. Now this is an unrecoverable error.
26126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26127$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26128      has_space=`$ECHO "$complete" | $GREP " "`
26129      if test "x$has_space" != x; then
26130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26132      fi
26133      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26134    fi
26135  fi
26136
26137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26140  # "foo.exe" is OK but "foo" is an error.
26141  #
26142  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26143  # It is also a way to make sure we got the proper file name for the real test later on.
26144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26145  if test "x$test_shortpath" = x; then
26146    # Short path failed, file does not exist as specified.
26147    # Try adding .exe or .cmd
26148    if test -f "${new_path}.exe"; then
26149      input_to_shortpath="${new_path}.exe"
26150    elif test -f "${new_path}.cmd"; then
26151      input_to_shortpath="${new_path}.cmd"
26152    else
26153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26154$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26157      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26158    fi
26159  else
26160    input_to_shortpath="$new_path"
26161  fi
26162
26163  # Call helper function which possibly converts this using DOS-style short mode.
26164  # If so, the updated path is stored in $new_path.
26165  new_path="$input_to_shortpath"
26166
26167  input_path="$input_to_shortpath"
26168  # Check if we need to convert this using DOS-style short mode. If the path
26169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26170  # take no chances and rewrite it.
26171  # Note: m4 eats our [], so we need to use [ and ] instead.
26172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26173  if test "x$has_forbidden_chars" != x; then
26174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26178      # Going to short mode and back again did indeed matter. Since short mode is
26179      # case insensitive, let's make it lowercase to improve readability.
26180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26181      # Now convert it back to Unix-stile (cygpath)
26182      input_path=`$CYGPATH -u "$shortmode_path"`
26183      new_path="$input_path"
26184    fi
26185  fi
26186
26187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26188  if test "x$test_cygdrive_prefix" = x; then
26189    # As a simple fix, exclude /usr/bin since it's not a real path.
26190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26192      # a path prefixed by /cygdrive for fixpath to work.
26193      new_path="$CYGWIN_ROOT_PATH$input_path"
26194    fi
26195  fi
26196
26197  # remove trailing .exe if any
26198  new_path="${new_path/%.exe/}"
26199
26200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26201
26202  # First separate the path from the arguments. This will split at the first
26203  # space.
26204  complete="$GNM"
26205  path="${complete%% *}"
26206  tmp="$complete EOL"
26207  arguments="${tmp#* }"
26208
26209  # Input might be given as Windows format, start by converting to
26210  # unix format.
26211  new_path="$path"
26212
26213  windows_path="$new_path"
26214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26215    unix_path=`$CYGPATH -u "$windows_path"`
26216    new_path="$unix_path"
26217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26219    new_path="$unix_path"
26220  fi
26221
26222
26223  # Now try to locate executable using which
26224  new_path=`$WHICH "$new_path" 2> /dev/null`
26225
26226  if test "x$new_path" = x; then
26227    # Oops. Which didn't find the executable.
26228    # The splitting of arguments from the executable at a space might have been incorrect,
26229    # since paths with space are more likely in Windows. Give it another try with the whole
26230    # argument.
26231    path="$complete"
26232    arguments="EOL"
26233    new_path="$path"
26234
26235  windows_path="$new_path"
26236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26237    unix_path=`$CYGPATH -u "$windows_path"`
26238    new_path="$unix_path"
26239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26241    new_path="$unix_path"
26242  fi
26243
26244
26245    new_path=`$WHICH "$new_path" 2> /dev/null`
26246
26247    if test "x$new_path" = x; then
26248      # It's still not found. Now this is an unrecoverable error.
26249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26250$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26251      has_space=`$ECHO "$complete" | $GREP " "`
26252      if test "x$has_space" != x; then
26253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26255      fi
26256      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26257    fi
26258  fi
26259
26260  # Now new_path has a complete unix path to the binary
26261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26262    # Keep paths in /bin as-is, but remove trailing .exe if any
26263    new_path="${new_path/%.exe/}"
26264    # Do not save /bin paths to all_fixpath_prefixes!
26265  else
26266    # Not in mixed or Windows style, start by that.
26267    new_path=`cmd //c echo $new_path`
26268
26269  input_path="$new_path"
26270  # Check if we need to convert this using DOS-style short mode. If the path
26271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26272  # take no chances and rewrite it.
26273  # Note: m4 eats our [], so we need to use [ and ] instead.
26274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26275  if test "x$has_forbidden_chars" != x; then
26276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26278  fi
26279
26280    # Output is in $new_path
26281
26282  windows_path="$new_path"
26283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26284    unix_path=`$CYGPATH -u "$windows_path"`
26285    new_path="$unix_path"
26286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26288    new_path="$unix_path"
26289  fi
26290
26291    # remove trailing .exe if any
26292    new_path="${new_path/%.exe/}"
26293
26294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296  fi
26297
26298  else
26299    # We're on a posix platform. Hooray! :)
26300    # First separate the path from the arguments. This will split at the first
26301    # space.
26302    complete="$GNM"
26303    path="${complete%% *}"
26304    tmp="$complete EOL"
26305    arguments="${tmp#* }"
26306
26307    # Cannot rely on the command "which" here since it doesn't always work.
26308    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26309    if test -z "$is_absolute_path"; then
26310      # Path to executable is not absolute. Find it.
26311      IFS_save="$IFS"
26312      IFS=:
26313      for p in $PATH; do
26314        if test -f "$p/$path" && test -x "$p/$path"; then
26315          new_path="$p/$path"
26316          break
26317        fi
26318      done
26319      IFS="$IFS_save"
26320    else
26321      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26322$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26323      new_path="$path"
26324    fi
26325
26326    if test "x$new_path" = x; then
26327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26328$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26329      has_space=`$ECHO "$complete" | $GREP " "`
26330      if test "x$has_space" != x; then
26331        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26333      fi
26334      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26335    fi
26336  fi
26337
26338  # Now join together the path and the arguments once again
26339  if test "x$arguments" != xEOL; then
26340    new_complete="$new_path ${arguments% *}"
26341  else
26342    new_complete="$new_path"
26343  fi
26344
26345  if test "x$complete" != "x$new_complete"; then
26346    GNM="$new_complete"
26347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26348$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26349  fi
26350
26351    # Extract the first word of "strip", so it can be a program name with args.
26352set dummy strip; ac_word=$2
26353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26354$as_echo_n "checking for $ac_word... " >&6; }
26355if ${ac_cv_path_STRIP+:} false; then :
26356  $as_echo_n "(cached) " >&6
26357else
26358  case $STRIP in
26359  [\\/]* | ?:[\\/]*)
26360  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26361  ;;
26362  *)
26363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26364for as_dir in $PATH
26365do
26366  IFS=$as_save_IFS
26367  test -z "$as_dir" && as_dir=.
26368    for ac_exec_ext in '' $ac_executable_extensions; do
26369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26370    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26372    break 2
26373  fi
26374done
26375  done
26376IFS=$as_save_IFS
26377
26378  ;;
26379esac
26380fi
26381STRIP=$ac_cv_path_STRIP
26382if test -n "$STRIP"; then
26383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26384$as_echo "$STRIP" >&6; }
26385else
26386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26387$as_echo "no" >&6; }
26388fi
26389
26390
26391
26392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26393
26394  # First separate the path from the arguments. This will split at the first
26395  # space.
26396  complete="$STRIP"
26397  path="${complete%% *}"
26398  tmp="$complete EOL"
26399  arguments="${tmp#* }"
26400
26401  # Input might be given as Windows format, start by converting to
26402  # unix format.
26403  new_path=`$CYGPATH -u "$path"`
26404
26405  # Now try to locate executable using which
26406  new_path=`$WHICH "$new_path" 2> /dev/null`
26407  # bat and cmd files are not always considered executable in cygwin causing which
26408  # to not find them
26409  if test "x$new_path" = x \
26410      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26411      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26412    new_path=`$CYGPATH -u "$path"`
26413  fi
26414  if test "x$new_path" = x; then
26415    # Oops. Which didn't find the executable.
26416    # The splitting of arguments from the executable at a space might have been incorrect,
26417    # since paths with space are more likely in Windows. Give it another try with the whole
26418    # argument.
26419    path="$complete"
26420    arguments="EOL"
26421    new_path=`$CYGPATH -u "$path"`
26422    new_path=`$WHICH "$new_path" 2> /dev/null`
26423    # bat and cmd files are not always considered executable in cygwin causing which
26424    # to not find them
26425    if test "x$new_path" = x \
26426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26428      new_path=`$CYGPATH -u "$path"`
26429    fi
26430    if test "x$new_path" = x; then
26431      # It's still not found. Now this is an unrecoverable error.
26432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26433$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26434      has_space=`$ECHO "$complete" | $GREP " "`
26435      if test "x$has_space" != x; then
26436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26438      fi
26439      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26440    fi
26441  fi
26442
26443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26446  # "foo.exe" is OK but "foo" is an error.
26447  #
26448  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26449  # It is also a way to make sure we got the proper file name for the real test later on.
26450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26451  if test "x$test_shortpath" = x; then
26452    # Short path failed, file does not exist as specified.
26453    # Try adding .exe or .cmd
26454    if test -f "${new_path}.exe"; then
26455      input_to_shortpath="${new_path}.exe"
26456    elif test -f "${new_path}.cmd"; then
26457      input_to_shortpath="${new_path}.cmd"
26458    else
26459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26460$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26463      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26464    fi
26465  else
26466    input_to_shortpath="$new_path"
26467  fi
26468
26469  # Call helper function which possibly converts this using DOS-style short mode.
26470  # If so, the updated path is stored in $new_path.
26471  new_path="$input_to_shortpath"
26472
26473  input_path="$input_to_shortpath"
26474  # Check if we need to convert this using DOS-style short mode. If the path
26475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26476  # take no chances and rewrite it.
26477  # Note: m4 eats our [], so we need to use [ and ] instead.
26478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26479  if test "x$has_forbidden_chars" != x; then
26480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26484      # Going to short mode and back again did indeed matter. Since short mode is
26485      # case insensitive, let's make it lowercase to improve readability.
26486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26487      # Now convert it back to Unix-stile (cygpath)
26488      input_path=`$CYGPATH -u "$shortmode_path"`
26489      new_path="$input_path"
26490    fi
26491  fi
26492
26493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26494  if test "x$test_cygdrive_prefix" = x; then
26495    # As a simple fix, exclude /usr/bin since it's not a real path.
26496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26498      # a path prefixed by /cygdrive for fixpath to work.
26499      new_path="$CYGWIN_ROOT_PATH$input_path"
26500    fi
26501  fi
26502
26503  # remove trailing .exe if any
26504  new_path="${new_path/%.exe/}"
26505
26506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26507
26508  # First separate the path from the arguments. This will split at the first
26509  # space.
26510  complete="$STRIP"
26511  path="${complete%% *}"
26512  tmp="$complete EOL"
26513  arguments="${tmp#* }"
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  new_path="$path"
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528
26529  # Now try to locate executable using which
26530  new_path=`$WHICH "$new_path" 2> /dev/null`
26531
26532  if test "x$new_path" = x; then
26533    # Oops. Which didn't find the executable.
26534    # The splitting of arguments from the executable at a space might have been incorrect,
26535    # since paths with space are more likely in Windows. Give it another try with the whole
26536    # argument.
26537    path="$complete"
26538    arguments="EOL"
26539    new_path="$path"
26540
26541  windows_path="$new_path"
26542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26543    unix_path=`$CYGPATH -u "$windows_path"`
26544    new_path="$unix_path"
26545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26547    new_path="$unix_path"
26548  fi
26549
26550
26551    new_path=`$WHICH "$new_path" 2> /dev/null`
26552
26553    if test "x$new_path" = x; then
26554      # It's still not found. Now this is an unrecoverable error.
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26556$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26557      has_space=`$ECHO "$complete" | $GREP " "`
26558      if test "x$has_space" != x; then
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26561      fi
26562      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26563    fi
26564  fi
26565
26566  # Now new_path has a complete unix path to the binary
26567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26568    # Keep paths in /bin as-is, but remove trailing .exe if any
26569    new_path="${new_path/%.exe/}"
26570    # Do not save /bin paths to all_fixpath_prefixes!
26571  else
26572    # Not in mixed or Windows style, start by that.
26573    new_path=`cmd //c echo $new_path`
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26584  fi
26585
26586    # Output is in $new_path
26587
26588  windows_path="$new_path"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    new_path="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    new_path="$unix_path"
26595  fi
26596
26597    # remove trailing .exe if any
26598    new_path="${new_path/%.exe/}"
26599
26600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26602  fi
26603
26604  else
26605    # We're on a posix platform. Hooray! :)
26606    # First separate the path from the arguments. This will split at the first
26607    # space.
26608    complete="$STRIP"
26609    path="${complete%% *}"
26610    tmp="$complete EOL"
26611    arguments="${tmp#* }"
26612
26613    # Cannot rely on the command "which" here since it doesn't always work.
26614    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26615    if test -z "$is_absolute_path"; then
26616      # Path to executable is not absolute. Find it.
26617      IFS_save="$IFS"
26618      IFS=:
26619      for p in $PATH; do
26620        if test -f "$p/$path" && test -x "$p/$path"; then
26621          new_path="$p/$path"
26622          break
26623        fi
26624      done
26625      IFS="$IFS_save"
26626    else
26627      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26628$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26629      new_path="$path"
26630    fi
26631
26632    if test "x$new_path" = x; then
26633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26634$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26635      has_space=`$ECHO "$complete" | $GREP " "`
26636      if test "x$has_space" != x; then
26637        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26638$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26639      fi
26640      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26641    fi
26642  fi
26643
26644  # Now join together the path and the arguments once again
26645  if test "x$arguments" != xEOL; then
26646    new_complete="$new_path ${arguments% *}"
26647  else
26648    new_complete="$new_path"
26649  fi
26650
26651  if test "x$complete" != "x$new_complete"; then
26652    STRIP="$new_complete"
26653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26654$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26655  fi
26656
26657    # Extract the first word of "mcs", so it can be a program name with args.
26658set dummy mcs; ac_word=$2
26659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26660$as_echo_n "checking for $ac_word... " >&6; }
26661if ${ac_cv_path_MCS+:} false; then :
26662  $as_echo_n "(cached) " >&6
26663else
26664  case $MCS in
26665  [\\/]* | ?:[\\/]*)
26666  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26667  ;;
26668  *)
26669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26670for as_dir in $PATH
26671do
26672  IFS=$as_save_IFS
26673  test -z "$as_dir" && as_dir=.
26674    for ac_exec_ext in '' $ac_executable_extensions; do
26675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26676    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26678    break 2
26679  fi
26680done
26681  done
26682IFS=$as_save_IFS
26683
26684  ;;
26685esac
26686fi
26687MCS=$ac_cv_path_MCS
26688if test -n "$MCS"; then
26689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26690$as_echo "$MCS" >&6; }
26691else
26692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26693$as_echo "no" >&6; }
26694fi
26695
26696
26697
26698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26699
26700  # First separate the path from the arguments. This will split at the first
26701  # space.
26702  complete="$MCS"
26703  path="${complete%% *}"
26704  tmp="$complete EOL"
26705  arguments="${tmp#* }"
26706
26707  # Input might be given as Windows format, start by converting to
26708  # unix format.
26709  new_path=`$CYGPATH -u "$path"`
26710
26711  # Now try to locate executable using which
26712  new_path=`$WHICH "$new_path" 2> /dev/null`
26713  # bat and cmd files are not always considered executable in cygwin causing which
26714  # to not find them
26715  if test "x$new_path" = x \
26716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26718    new_path=`$CYGPATH -u "$path"`
26719  fi
26720  if test "x$new_path" = x; then
26721    # Oops. Which didn't find the executable.
26722    # The splitting of arguments from the executable at a space might have been incorrect,
26723    # since paths with space are more likely in Windows. Give it another try with the whole
26724    # argument.
26725    path="$complete"
26726    arguments="EOL"
26727    new_path=`$CYGPATH -u "$path"`
26728    new_path=`$WHICH "$new_path" 2> /dev/null`
26729    # bat and cmd files are not always considered executable in cygwin causing which
26730    # to not find them
26731    if test "x$new_path" = x \
26732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26734      new_path=`$CYGPATH -u "$path"`
26735    fi
26736    if test "x$new_path" = x; then
26737      # It's still not found. Now this is an unrecoverable error.
26738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26739$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26740      has_space=`$ECHO "$complete" | $GREP " "`
26741      if test "x$has_space" != x; then
26742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26744      fi
26745      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26746    fi
26747  fi
26748
26749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26752  # "foo.exe" is OK but "foo" is an error.
26753  #
26754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26755  # It is also a way to make sure we got the proper file name for the real test later on.
26756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26757  if test "x$test_shortpath" = x; then
26758    # Short path failed, file does not exist as specified.
26759    # Try adding .exe or .cmd
26760    if test -f "${new_path}.exe"; then
26761      input_to_shortpath="${new_path}.exe"
26762    elif test -f "${new_path}.cmd"; then
26763      input_to_shortpath="${new_path}.cmd"
26764    else
26765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26766$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26769      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26770    fi
26771  else
26772    input_to_shortpath="$new_path"
26773  fi
26774
26775  # Call helper function which possibly converts this using DOS-style short mode.
26776  # If so, the updated path is stored in $new_path.
26777  new_path="$input_to_shortpath"
26778
26779  input_path="$input_to_shortpath"
26780  # Check if we need to convert this using DOS-style short mode. If the path
26781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26782  # take no chances and rewrite it.
26783  # Note: m4 eats our [], so we need to use [ and ] instead.
26784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26785  if test "x$has_forbidden_chars" != x; then
26786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26790      # Going to short mode and back again did indeed matter. Since short mode is
26791      # case insensitive, let's make it lowercase to improve readability.
26792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26793      # Now convert it back to Unix-stile (cygpath)
26794      input_path=`$CYGPATH -u "$shortmode_path"`
26795      new_path="$input_path"
26796    fi
26797  fi
26798
26799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26800  if test "x$test_cygdrive_prefix" = x; then
26801    # As a simple fix, exclude /usr/bin since it's not a real path.
26802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26804      # a path prefixed by /cygdrive for fixpath to work.
26805      new_path="$CYGWIN_ROOT_PATH$input_path"
26806    fi
26807  fi
26808
26809  # remove trailing .exe if any
26810  new_path="${new_path/%.exe/}"
26811
26812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26813
26814  # First separate the path from the arguments. This will split at the first
26815  # space.
26816  complete="$MCS"
26817  path="${complete%% *}"
26818  tmp="$complete EOL"
26819  arguments="${tmp#* }"
26820
26821  # Input might be given as Windows format, start by converting to
26822  # unix format.
26823  new_path="$path"
26824
26825  windows_path="$new_path"
26826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26827    unix_path=`$CYGPATH -u "$windows_path"`
26828    new_path="$unix_path"
26829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26831    new_path="$unix_path"
26832  fi
26833
26834
26835  # Now try to locate executable using which
26836  new_path=`$WHICH "$new_path" 2> /dev/null`
26837
26838  if test "x$new_path" = x; then
26839    # Oops. Which didn't find the executable.
26840    # The splitting of arguments from the executable at a space might have been incorrect,
26841    # since paths with space are more likely in Windows. Give it another try with the whole
26842    # argument.
26843    path="$complete"
26844    arguments="EOL"
26845    new_path="$path"
26846
26847  windows_path="$new_path"
26848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26849    unix_path=`$CYGPATH -u "$windows_path"`
26850    new_path="$unix_path"
26851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26853    new_path="$unix_path"
26854  fi
26855
26856
26857    new_path=`$WHICH "$new_path" 2> /dev/null`
26858
26859    if test "x$new_path" = x; then
26860      # It's still not found. Now this is an unrecoverable error.
26861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26862$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26863      has_space=`$ECHO "$complete" | $GREP " "`
26864      if test "x$has_space" != x; then
26865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26867      fi
26868      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26869    fi
26870  fi
26871
26872  # Now new_path has a complete unix path to the binary
26873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26874    # Keep paths in /bin as-is, but remove trailing .exe if any
26875    new_path="${new_path/%.exe/}"
26876    # Do not save /bin paths to all_fixpath_prefixes!
26877  else
26878    # Not in mixed or Windows style, start by that.
26879    new_path=`cmd //c echo $new_path`
26880
26881  input_path="$new_path"
26882  # Check if we need to convert this using DOS-style short mode. If the path
26883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26884  # take no chances and rewrite it.
26885  # Note: m4 eats our [], so we need to use [ and ] instead.
26886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26887  if test "x$has_forbidden_chars" != x; then
26888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26890  fi
26891
26892    # Output is in $new_path
26893
26894  windows_path="$new_path"
26895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26896    unix_path=`$CYGPATH -u "$windows_path"`
26897    new_path="$unix_path"
26898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26900    new_path="$unix_path"
26901  fi
26902
26903    # remove trailing .exe if any
26904    new_path="${new_path/%.exe/}"
26905
26906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26908  fi
26909
26910  else
26911    # We're on a posix platform. Hooray! :)
26912    # First separate the path from the arguments. This will split at the first
26913    # space.
26914    complete="$MCS"
26915    path="${complete%% *}"
26916    tmp="$complete EOL"
26917    arguments="${tmp#* }"
26918
26919    # Cannot rely on the command "which" here since it doesn't always work.
26920    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26921    if test -z "$is_absolute_path"; then
26922      # Path to executable is not absolute. Find it.
26923      IFS_save="$IFS"
26924      IFS=:
26925      for p in $PATH; do
26926        if test -f "$p/$path" && test -x "$p/$path"; then
26927          new_path="$p/$path"
26928          break
26929        fi
26930      done
26931      IFS="$IFS_save"
26932    else
26933      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26934$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26935      new_path="$path"
26936    fi
26937
26938    if test "x$new_path" = x; then
26939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26940$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26941      has_space=`$ECHO "$complete" | $GREP " "`
26942      if test "x$has_space" != x; then
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26945      fi
26946      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26947    fi
26948  fi
26949
26950  # Now join together the path and the arguments once again
26951  if test "x$arguments" != xEOL; then
26952    new_complete="$new_path ${arguments% *}"
26953  else
26954    new_complete="$new_path"
26955  fi
26956
26957  if test "x$complete" != "x$new_complete"; then
26958    MCS="$new_complete"
26959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26960$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26961  fi
26962
26963  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26964    if test -n "$ac_tool_prefix"; then
26965  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26966set dummy ${ac_tool_prefix}nm; ac_word=$2
26967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26968$as_echo_n "checking for $ac_word... " >&6; }
26969if ${ac_cv_prog_NM+:} false; then :
26970  $as_echo_n "(cached) " >&6
26971else
26972  if test -n "$NM"; then
26973  ac_cv_prog_NM="$NM" # Let the user override the test.
26974else
26975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26976for as_dir in $PATH
26977do
26978  IFS=$as_save_IFS
26979  test -z "$as_dir" && as_dir=.
26980    for ac_exec_ext in '' $ac_executable_extensions; do
26981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26982    ac_cv_prog_NM="${ac_tool_prefix}nm"
26983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26984    break 2
26985  fi
26986done
26987  done
26988IFS=$as_save_IFS
26989
26990fi
26991fi
26992NM=$ac_cv_prog_NM
26993if test -n "$NM"; then
26994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26995$as_echo "$NM" >&6; }
26996else
26997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26998$as_echo "no" >&6; }
26999fi
27000
27001
27002fi
27003if test -z "$ac_cv_prog_NM"; then
27004  ac_ct_NM=$NM
27005  # Extract the first word of "nm", so it can be a program name with args.
27006set dummy nm; ac_word=$2
27007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27008$as_echo_n "checking for $ac_word... " >&6; }
27009if ${ac_cv_prog_ac_ct_NM+:} false; then :
27010  $as_echo_n "(cached) " >&6
27011else
27012  if test -n "$ac_ct_NM"; then
27013  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27014else
27015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27016for as_dir in $PATH
27017do
27018  IFS=$as_save_IFS
27019  test -z "$as_dir" && as_dir=.
27020    for ac_exec_ext in '' $ac_executable_extensions; do
27021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27022    ac_cv_prog_ac_ct_NM="nm"
27023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27024    break 2
27025  fi
27026done
27027  done
27028IFS=$as_save_IFS
27029
27030fi
27031fi
27032ac_ct_NM=$ac_cv_prog_ac_ct_NM
27033if test -n "$ac_ct_NM"; then
27034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27035$as_echo "$ac_ct_NM" >&6; }
27036else
27037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27038$as_echo "no" >&6; }
27039fi
27040
27041  if test "x$ac_ct_NM" = x; then
27042    NM=""
27043  else
27044    case $cross_compiling:$ac_tool_warned in
27045yes:)
27046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27048ac_tool_warned=yes ;;
27049esac
27050    NM=$ac_ct_NM
27051  fi
27052else
27053  NM="$ac_cv_prog_NM"
27054fi
27055
27056
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058
27059  # First separate the path from the arguments. This will split at the first
27060  # space.
27061  complete="$NM"
27062  path="${complete%% *}"
27063  tmp="$complete EOL"
27064  arguments="${tmp#* }"
27065
27066  # Input might be given as Windows format, start by converting to
27067  # unix format.
27068  new_path=`$CYGPATH -u "$path"`
27069
27070  # Now try to locate executable using which
27071  new_path=`$WHICH "$new_path" 2> /dev/null`
27072  # bat and cmd files are not always considered executable in cygwin causing which
27073  # to not find them
27074  if test "x$new_path" = x \
27075      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27076      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27077    new_path=`$CYGPATH -u "$path"`
27078  fi
27079  if test "x$new_path" = x; then
27080    # Oops. Which didn't find the executable.
27081    # The splitting of arguments from the executable at a space might have been incorrect,
27082    # since paths with space are more likely in Windows. Give it another try with the whole
27083    # argument.
27084    path="$complete"
27085    arguments="EOL"
27086    new_path=`$CYGPATH -u "$path"`
27087    new_path=`$WHICH "$new_path" 2> /dev/null`
27088    # bat and cmd files are not always considered executable in cygwin causing which
27089    # to not find them
27090    if test "x$new_path" = x \
27091        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27092        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27093      new_path=`$CYGPATH -u "$path"`
27094    fi
27095    if test "x$new_path" = x; then
27096      # It's still not found. Now this is an unrecoverable error.
27097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27098$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27099      has_space=`$ECHO "$complete" | $GREP " "`
27100      if test "x$has_space" != x; then
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27103      fi
27104      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27105    fi
27106  fi
27107
27108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27111  # "foo.exe" is OK but "foo" is an error.
27112  #
27113  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27114  # It is also a way to make sure we got the proper file name for the real test later on.
27115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27116  if test "x$test_shortpath" = x; then
27117    # Short path failed, file does not exist as specified.
27118    # Try adding .exe or .cmd
27119    if test -f "${new_path}.exe"; then
27120      input_to_shortpath="${new_path}.exe"
27121    elif test -f "${new_path}.cmd"; then
27122      input_to_shortpath="${new_path}.cmd"
27123    else
27124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27125$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27127$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27128      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27129    fi
27130  else
27131    input_to_shortpath="$new_path"
27132  fi
27133
27134  # Call helper function which possibly converts this using DOS-style short mode.
27135  # If so, the updated path is stored in $new_path.
27136  new_path="$input_to_shortpath"
27137
27138  input_path="$input_to_shortpath"
27139  # Check if we need to convert this using DOS-style short mode. If the path
27140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27141  # take no chances and rewrite it.
27142  # Note: m4 eats our [], so we need to use [ and ] instead.
27143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27144  if test "x$has_forbidden_chars" != x; then
27145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27149      # Going to short mode and back again did indeed matter. Since short mode is
27150      # case insensitive, let's make it lowercase to improve readability.
27151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27152      # Now convert it back to Unix-stile (cygpath)
27153      input_path=`$CYGPATH -u "$shortmode_path"`
27154      new_path="$input_path"
27155    fi
27156  fi
27157
27158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27159  if test "x$test_cygdrive_prefix" = x; then
27160    # As a simple fix, exclude /usr/bin since it's not a real path.
27161    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27163      # a path prefixed by /cygdrive for fixpath to work.
27164      new_path="$CYGWIN_ROOT_PATH$input_path"
27165    fi
27166  fi
27167
27168  # remove trailing .exe if any
27169  new_path="${new_path/%.exe/}"
27170
27171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27172
27173  # First separate the path from the arguments. This will split at the first
27174  # space.
27175  complete="$NM"
27176  path="${complete%% *}"
27177  tmp="$complete EOL"
27178  arguments="${tmp#* }"
27179
27180  # Input might be given as Windows format, start by converting to
27181  # unix format.
27182  new_path="$path"
27183
27184  windows_path="$new_path"
27185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27186    unix_path=`$CYGPATH -u "$windows_path"`
27187    new_path="$unix_path"
27188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27190    new_path="$unix_path"
27191  fi
27192
27193
27194  # Now try to locate executable using which
27195  new_path=`$WHICH "$new_path" 2> /dev/null`
27196
27197  if test "x$new_path" = x; then
27198    # Oops. Which didn't find the executable.
27199    # The splitting of arguments from the executable at a space might have been incorrect,
27200    # since paths with space are more likely in Windows. Give it another try with the whole
27201    # argument.
27202    path="$complete"
27203    arguments="EOL"
27204    new_path="$path"
27205
27206  windows_path="$new_path"
27207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27208    unix_path=`$CYGPATH -u "$windows_path"`
27209    new_path="$unix_path"
27210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27212    new_path="$unix_path"
27213  fi
27214
27215
27216    new_path=`$WHICH "$new_path" 2> /dev/null`
27217
27218    if test "x$new_path" = x; then
27219      # It's still not found. Now this is an unrecoverable error.
27220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27221$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27222      has_space=`$ECHO "$complete" | $GREP " "`
27223      if test "x$has_space" != x; then
27224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27226      fi
27227      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27228    fi
27229  fi
27230
27231  # Now new_path has a complete unix path to the binary
27232  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27233    # Keep paths in /bin as-is, but remove trailing .exe if any
27234    new_path="${new_path/%.exe/}"
27235    # Do not save /bin paths to all_fixpath_prefixes!
27236  else
27237    # Not in mixed or Windows style, start by that.
27238    new_path=`cmd //c echo $new_path`
27239
27240  input_path="$new_path"
27241  # Check if we need to convert this using DOS-style short mode. If the path
27242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27243  # take no chances and rewrite it.
27244  # Note: m4 eats our [], so we need to use [ and ] instead.
27245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27246  if test "x$has_forbidden_chars" != x; then
27247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27249  fi
27250
27251    # Output is in $new_path
27252
27253  windows_path="$new_path"
27254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27255    unix_path=`$CYGPATH -u "$windows_path"`
27256    new_path="$unix_path"
27257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27259    new_path="$unix_path"
27260  fi
27261
27262    # remove trailing .exe if any
27263    new_path="${new_path/%.exe/}"
27264
27265    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27266    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27267  fi
27268
27269  else
27270    # We're on a posix platform. Hooray! :)
27271    # First separate the path from the arguments. This will split at the first
27272    # space.
27273    complete="$NM"
27274    path="${complete%% *}"
27275    tmp="$complete EOL"
27276    arguments="${tmp#* }"
27277
27278    # Cannot rely on the command "which" here since it doesn't always work.
27279    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27280    if test -z "$is_absolute_path"; then
27281      # Path to executable is not absolute. Find it.
27282      IFS_save="$IFS"
27283      IFS=:
27284      for p in $PATH; do
27285        if test -f "$p/$path" && test -x "$p/$path"; then
27286          new_path="$p/$path"
27287          break
27288        fi
27289      done
27290      IFS="$IFS_save"
27291    else
27292      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27293$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27294      new_path="$path"
27295    fi
27296
27297    if test "x$new_path" = x; then
27298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27299$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27300      has_space=`$ECHO "$complete" | $GREP " "`
27301      if test "x$has_space" != x; then
27302        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27303$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27304      fi
27305      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27306    fi
27307  fi
27308
27309  # Now join together the path and the arguments once again
27310  if test "x$arguments" != xEOL; then
27311    new_complete="$new_path ${arguments% *}"
27312  else
27313    new_complete="$new_path"
27314  fi
27315
27316  if test "x$complete" != "x$new_complete"; then
27317    NM="$new_complete"
27318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27319$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27320  fi
27321
27322    GNM="$NM"
27323
27324    if test -n "$ac_tool_prefix"; then
27325  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27326set dummy ${ac_tool_prefix}strip; ac_word=$2
27327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27328$as_echo_n "checking for $ac_word... " >&6; }
27329if ${ac_cv_prog_STRIP+:} false; then :
27330  $as_echo_n "(cached) " >&6
27331else
27332  if test -n "$STRIP"; then
27333  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27334else
27335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27336for as_dir in $PATH
27337do
27338  IFS=$as_save_IFS
27339  test -z "$as_dir" && as_dir=.
27340    for ac_exec_ext in '' $ac_executable_extensions; do
27341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27342    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27344    break 2
27345  fi
27346done
27347  done
27348IFS=$as_save_IFS
27349
27350fi
27351fi
27352STRIP=$ac_cv_prog_STRIP
27353if test -n "$STRIP"; then
27354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27355$as_echo "$STRIP" >&6; }
27356else
27357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27358$as_echo "no" >&6; }
27359fi
27360
27361
27362fi
27363if test -z "$ac_cv_prog_STRIP"; then
27364  ac_ct_STRIP=$STRIP
27365  # Extract the first word of "strip", so it can be a program name with args.
27366set dummy strip; ac_word=$2
27367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27368$as_echo_n "checking for $ac_word... " >&6; }
27369if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27370  $as_echo_n "(cached) " >&6
27371else
27372  if test -n "$ac_ct_STRIP"; then
27373  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27374else
27375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27376for as_dir in $PATH
27377do
27378  IFS=$as_save_IFS
27379  test -z "$as_dir" && as_dir=.
27380    for ac_exec_ext in '' $ac_executable_extensions; do
27381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27382    ac_cv_prog_ac_ct_STRIP="strip"
27383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27384    break 2
27385  fi
27386done
27387  done
27388IFS=$as_save_IFS
27389
27390fi
27391fi
27392ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27393if test -n "$ac_ct_STRIP"; then
27394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27395$as_echo "$ac_ct_STRIP" >&6; }
27396else
27397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27398$as_echo "no" >&6; }
27399fi
27400
27401  if test "x$ac_ct_STRIP" = x; then
27402    STRIP=""
27403  else
27404    case $cross_compiling:$ac_tool_warned in
27405yes:)
27406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27408ac_tool_warned=yes ;;
27409esac
27410    STRIP=$ac_ct_STRIP
27411  fi
27412else
27413  STRIP="$ac_cv_prog_STRIP"
27414fi
27415
27416
27417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27418
27419  # First separate the path from the arguments. This will split at the first
27420  # space.
27421  complete="$STRIP"
27422  path="${complete%% *}"
27423  tmp="$complete EOL"
27424  arguments="${tmp#* }"
27425
27426  # Input might be given as Windows format, start by converting to
27427  # unix format.
27428  new_path=`$CYGPATH -u "$path"`
27429
27430  # Now try to locate executable using which
27431  new_path=`$WHICH "$new_path" 2> /dev/null`
27432  # bat and cmd files are not always considered executable in cygwin causing which
27433  # to not find them
27434  if test "x$new_path" = x \
27435      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27436      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27437    new_path=`$CYGPATH -u "$path"`
27438  fi
27439  if test "x$new_path" = x; then
27440    # Oops. Which didn't find the executable.
27441    # The splitting of arguments from the executable at a space might have been incorrect,
27442    # since paths with space are more likely in Windows. Give it another try with the whole
27443    # argument.
27444    path="$complete"
27445    arguments="EOL"
27446    new_path=`$CYGPATH -u "$path"`
27447    new_path=`$WHICH "$new_path" 2> /dev/null`
27448    # bat and cmd files are not always considered executable in cygwin causing which
27449    # to not find them
27450    if test "x$new_path" = x \
27451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27453      new_path=`$CYGPATH -u "$path"`
27454    fi
27455    if test "x$new_path" = x; then
27456      # It's still not found. Now this is an unrecoverable error.
27457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27458$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27459      has_space=`$ECHO "$complete" | $GREP " "`
27460      if test "x$has_space" != x; then
27461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27463      fi
27464      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27465    fi
27466  fi
27467
27468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27471  # "foo.exe" is OK but "foo" is an error.
27472  #
27473  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27474  # It is also a way to make sure we got the proper file name for the real test later on.
27475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27476  if test "x$test_shortpath" = x; then
27477    # Short path failed, file does not exist as specified.
27478    # Try adding .exe or .cmd
27479    if test -f "${new_path}.exe"; then
27480      input_to_shortpath="${new_path}.exe"
27481    elif test -f "${new_path}.cmd"; then
27482      input_to_shortpath="${new_path}.cmd"
27483    else
27484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27485$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27488      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27489    fi
27490  else
27491    input_to_shortpath="$new_path"
27492  fi
27493
27494  # Call helper function which possibly converts this using DOS-style short mode.
27495  # If so, the updated path is stored in $new_path.
27496  new_path="$input_to_shortpath"
27497
27498  input_path="$input_to_shortpath"
27499  # Check if we need to convert this using DOS-style short mode. If the path
27500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27501  # take no chances and rewrite it.
27502  # Note: m4 eats our [], so we need to use [ and ] instead.
27503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27504  if test "x$has_forbidden_chars" != x; then
27505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27509      # Going to short mode and back again did indeed matter. Since short mode is
27510      # case insensitive, let's make it lowercase to improve readability.
27511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27512      # Now convert it back to Unix-stile (cygpath)
27513      input_path=`$CYGPATH -u "$shortmode_path"`
27514      new_path="$input_path"
27515    fi
27516  fi
27517
27518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27519  if test "x$test_cygdrive_prefix" = x; then
27520    # As a simple fix, exclude /usr/bin since it's not a real path.
27521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27523      # a path prefixed by /cygdrive for fixpath to work.
27524      new_path="$CYGWIN_ROOT_PATH$input_path"
27525    fi
27526  fi
27527
27528  # remove trailing .exe if any
27529  new_path="${new_path/%.exe/}"
27530
27531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27532
27533  # First separate the path from the arguments. This will split at the first
27534  # space.
27535  complete="$STRIP"
27536  path="${complete%% *}"
27537  tmp="$complete EOL"
27538  arguments="${tmp#* }"
27539
27540  # Input might be given as Windows format, start by converting to
27541  # unix format.
27542  new_path="$path"
27543
27544  windows_path="$new_path"
27545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546    unix_path=`$CYGPATH -u "$windows_path"`
27547    new_path="$unix_path"
27548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27550    new_path="$unix_path"
27551  fi
27552
27553
27554  # Now try to locate executable using which
27555  new_path=`$WHICH "$new_path" 2> /dev/null`
27556
27557  if test "x$new_path" = x; then
27558    # Oops. Which didn't find the executable.
27559    # The splitting of arguments from the executable at a space might have been incorrect,
27560    # since paths with space are more likely in Windows. Give it another try with the whole
27561    # argument.
27562    path="$complete"
27563    arguments="EOL"
27564    new_path="$path"
27565
27566  windows_path="$new_path"
27567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27568    unix_path=`$CYGPATH -u "$windows_path"`
27569    new_path="$unix_path"
27570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27572    new_path="$unix_path"
27573  fi
27574
27575
27576    new_path=`$WHICH "$new_path" 2> /dev/null`
27577
27578    if test "x$new_path" = x; then
27579      # It's still not found. Now this is an unrecoverable error.
27580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27581$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27582      has_space=`$ECHO "$complete" | $GREP " "`
27583      if test "x$has_space" != x; then
27584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27586      fi
27587      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27588    fi
27589  fi
27590
27591  # Now new_path has a complete unix path to the binary
27592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27593    # Keep paths in /bin as-is, but remove trailing .exe if any
27594    new_path="${new_path/%.exe/}"
27595    # Do not save /bin paths to all_fixpath_prefixes!
27596  else
27597    # Not in mixed or Windows style, start by that.
27598    new_path=`cmd //c echo $new_path`
27599
27600  input_path="$new_path"
27601  # Check if we need to convert this using DOS-style short mode. If the path
27602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27603  # take no chances and rewrite it.
27604  # Note: m4 eats our [], so we need to use [ and ] instead.
27605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27606  if test "x$has_forbidden_chars" != x; then
27607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27609  fi
27610
27611    # Output is in $new_path
27612
27613  windows_path="$new_path"
27614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615    unix_path=`$CYGPATH -u "$windows_path"`
27616    new_path="$unix_path"
27617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27619    new_path="$unix_path"
27620  fi
27621
27622    # remove trailing .exe if any
27623    new_path="${new_path/%.exe/}"
27624
27625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27627  fi
27628
27629  else
27630    # We're on a posix platform. Hooray! :)
27631    # First separate the path from the arguments. This will split at the first
27632    # space.
27633    complete="$STRIP"
27634    path="${complete%% *}"
27635    tmp="$complete EOL"
27636    arguments="${tmp#* }"
27637
27638    # Cannot rely on the command "which" here since it doesn't always work.
27639    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27640    if test -z "$is_absolute_path"; then
27641      # Path to executable is not absolute. Find it.
27642      IFS_save="$IFS"
27643      IFS=:
27644      for p in $PATH; do
27645        if test -f "$p/$path" && test -x "$p/$path"; then
27646          new_path="$p/$path"
27647          break
27648        fi
27649      done
27650      IFS="$IFS_save"
27651    else
27652      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27653$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27654      new_path="$path"
27655    fi
27656
27657    if test "x$new_path" = x; then
27658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27659$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27660      has_space=`$ECHO "$complete" | $GREP " "`
27661      if test "x$has_space" != x; then
27662        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27664      fi
27665      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27666    fi
27667  fi
27668
27669  # Now join together the path and the arguments once again
27670  if test "x$arguments" != xEOL; then
27671    new_complete="$new_path ${arguments% *}"
27672  else
27673    new_complete="$new_path"
27674  fi
27675
27676  if test "x$complete" != "x$new_complete"; then
27677    STRIP="$new_complete"
27678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27679$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27680  fi
27681
27682  fi
27683
27684  # objcopy is used for moving debug symbols to separate files when
27685  # full debug symbols are enabled.
27686  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27687    if test -n "$ac_tool_prefix"; then
27688  for ac_prog in gobjcopy objcopy
27689  do
27690    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27691set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27693$as_echo_n "checking for $ac_word... " >&6; }
27694if ${ac_cv_prog_OBJCOPY+:} false; then :
27695  $as_echo_n "(cached) " >&6
27696else
27697  if test -n "$OBJCOPY"; then
27698  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27699else
27700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27701for as_dir in $PATH
27702do
27703  IFS=$as_save_IFS
27704  test -z "$as_dir" && as_dir=.
27705    for ac_exec_ext in '' $ac_executable_extensions; do
27706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27707    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27709    break 2
27710  fi
27711done
27712  done
27713IFS=$as_save_IFS
27714
27715fi
27716fi
27717OBJCOPY=$ac_cv_prog_OBJCOPY
27718if test -n "$OBJCOPY"; then
27719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27720$as_echo "$OBJCOPY" >&6; }
27721else
27722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27723$as_echo "no" >&6; }
27724fi
27725
27726
27727    test -n "$OBJCOPY" && break
27728  done
27729fi
27730if test -z "$OBJCOPY"; then
27731  ac_ct_OBJCOPY=$OBJCOPY
27732  for ac_prog in gobjcopy objcopy
27733do
27734  # Extract the first word of "$ac_prog", so it can be a program name with args.
27735set dummy $ac_prog; ac_word=$2
27736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27737$as_echo_n "checking for $ac_word... " >&6; }
27738if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27739  $as_echo_n "(cached) " >&6
27740else
27741  if test -n "$ac_ct_OBJCOPY"; then
27742  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27743else
27744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27745for as_dir in $PATH
27746do
27747  IFS=$as_save_IFS
27748  test -z "$as_dir" && as_dir=.
27749    for ac_exec_ext in '' $ac_executable_extensions; do
27750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27751    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27753    break 2
27754  fi
27755done
27756  done
27757IFS=$as_save_IFS
27758
27759fi
27760fi
27761ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27762if test -n "$ac_ct_OBJCOPY"; then
27763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27764$as_echo "$ac_ct_OBJCOPY" >&6; }
27765else
27766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27767$as_echo "no" >&6; }
27768fi
27769
27770
27771  test -n "$ac_ct_OBJCOPY" && break
27772done
27773
27774  if test "x$ac_ct_OBJCOPY" = x; then
27775    OBJCOPY=""
27776  else
27777    case $cross_compiling:$ac_tool_warned in
27778yes:)
27779{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27780$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27781ac_tool_warned=yes ;;
27782esac
27783    OBJCOPY=$ac_ct_OBJCOPY
27784  fi
27785fi
27786
27787    # Only call fixup if objcopy was found.
27788    if test -n "$OBJCOPY"; then
27789
27790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27791
27792  # First separate the path from the arguments. This will split at the first
27793  # space.
27794  complete="$OBJCOPY"
27795  path="${complete%% *}"
27796  tmp="$complete EOL"
27797  arguments="${tmp#* }"
27798
27799  # Input might be given as Windows format, start by converting to
27800  # unix format.
27801  new_path=`$CYGPATH -u "$path"`
27802
27803  # Now try to locate executable using which
27804  new_path=`$WHICH "$new_path" 2> /dev/null`
27805  # bat and cmd files are not always considered executable in cygwin causing which
27806  # to not find them
27807  if test "x$new_path" = x \
27808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27810    new_path=`$CYGPATH -u "$path"`
27811  fi
27812  if test "x$new_path" = x; then
27813    # Oops. Which didn't find the executable.
27814    # The splitting of arguments from the executable at a space might have been incorrect,
27815    # since paths with space are more likely in Windows. Give it another try with the whole
27816    # argument.
27817    path="$complete"
27818    arguments="EOL"
27819    new_path=`$CYGPATH -u "$path"`
27820    new_path=`$WHICH "$new_path" 2> /dev/null`
27821    # bat and cmd files are not always considered executable in cygwin causing which
27822    # to not find them
27823    if test "x$new_path" = x \
27824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27826      new_path=`$CYGPATH -u "$path"`
27827    fi
27828    if test "x$new_path" = x; then
27829      # It's still not found. Now this is an unrecoverable error.
27830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27831$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27832      has_space=`$ECHO "$complete" | $GREP " "`
27833      if test "x$has_space" != x; then
27834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27836      fi
27837      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27838    fi
27839  fi
27840
27841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27844  # "foo.exe" is OK but "foo" is an error.
27845  #
27846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27847  # It is also a way to make sure we got the proper file name for the real test later on.
27848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27849  if test "x$test_shortpath" = x; then
27850    # Short path failed, file does not exist as specified.
27851    # Try adding .exe or .cmd
27852    if test -f "${new_path}.exe"; then
27853      input_to_shortpath="${new_path}.exe"
27854    elif test -f "${new_path}.cmd"; then
27855      input_to_shortpath="${new_path}.cmd"
27856    else
27857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27858$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27861      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27862    fi
27863  else
27864    input_to_shortpath="$new_path"
27865  fi
27866
27867  # Call helper function which possibly converts this using DOS-style short mode.
27868  # If so, the updated path is stored in $new_path.
27869  new_path="$input_to_shortpath"
27870
27871  input_path="$input_to_shortpath"
27872  # Check if we need to convert this using DOS-style short mode. If the path
27873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27874  # take no chances and rewrite it.
27875  # Note: m4 eats our [], so we need to use [ and ] instead.
27876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27877  if test "x$has_forbidden_chars" != x; then
27878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27882      # Going to short mode and back again did indeed matter. Since short mode is
27883      # case insensitive, let's make it lowercase to improve readability.
27884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27885      # Now convert it back to Unix-stile (cygpath)
27886      input_path=`$CYGPATH -u "$shortmode_path"`
27887      new_path="$input_path"
27888    fi
27889  fi
27890
27891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27892  if test "x$test_cygdrive_prefix" = x; then
27893    # As a simple fix, exclude /usr/bin since it's not a real path.
27894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27896      # a path prefixed by /cygdrive for fixpath to work.
27897      new_path="$CYGWIN_ROOT_PATH$input_path"
27898    fi
27899  fi
27900
27901  # remove trailing .exe if any
27902  new_path="${new_path/%.exe/}"
27903
27904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27905
27906  # First separate the path from the arguments. This will split at the first
27907  # space.
27908  complete="$OBJCOPY"
27909  path="${complete%% *}"
27910  tmp="$complete EOL"
27911  arguments="${tmp#* }"
27912
27913  # Input might be given as Windows format, start by converting to
27914  # unix format.
27915  new_path="$path"
27916
27917  windows_path="$new_path"
27918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27919    unix_path=`$CYGPATH -u "$windows_path"`
27920    new_path="$unix_path"
27921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27923    new_path="$unix_path"
27924  fi
27925
27926
27927  # Now try to locate executable using which
27928  new_path=`$WHICH "$new_path" 2> /dev/null`
27929
27930  if test "x$new_path" = x; then
27931    # Oops. Which didn't find the executable.
27932    # The splitting of arguments from the executable at a space might have been incorrect,
27933    # since paths with space are more likely in Windows. Give it another try with the whole
27934    # argument.
27935    path="$complete"
27936    arguments="EOL"
27937    new_path="$path"
27938
27939  windows_path="$new_path"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    new_path="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    new_path="$unix_path"
27946  fi
27947
27948
27949    new_path=`$WHICH "$new_path" 2> /dev/null`
27950
27951    if test "x$new_path" = x; then
27952      # It's still not found. Now this is an unrecoverable error.
27953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27954$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27955      has_space=`$ECHO "$complete" | $GREP " "`
27956      if test "x$has_space" != x; then
27957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27959      fi
27960      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27961    fi
27962  fi
27963
27964  # Now new_path has a complete unix path to the binary
27965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27966    # Keep paths in /bin as-is, but remove trailing .exe if any
27967    new_path="${new_path/%.exe/}"
27968    # Do not save /bin paths to all_fixpath_prefixes!
27969  else
27970    # Not in mixed or Windows style, start by that.
27971    new_path=`cmd //c echo $new_path`
27972
27973  input_path="$new_path"
27974  # Check if we need to convert this using DOS-style short mode. If the path
27975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27976  # take no chances and rewrite it.
27977  # Note: m4 eats our [], so we need to use [ and ] instead.
27978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27979  if test "x$has_forbidden_chars" != x; then
27980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27982  fi
27983
27984    # Output is in $new_path
27985
27986  windows_path="$new_path"
27987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27988    unix_path=`$CYGPATH -u "$windows_path"`
27989    new_path="$unix_path"
27990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27992    new_path="$unix_path"
27993  fi
27994
27995    # remove trailing .exe if any
27996    new_path="${new_path/%.exe/}"
27997
27998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28000  fi
28001
28002  else
28003    # We're on a posix platform. Hooray! :)
28004    # First separate the path from the arguments. This will split at the first
28005    # space.
28006    complete="$OBJCOPY"
28007    path="${complete%% *}"
28008    tmp="$complete EOL"
28009    arguments="${tmp#* }"
28010
28011    # Cannot rely on the command "which" here since it doesn't always work.
28012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28013    if test -z "$is_absolute_path"; then
28014      # Path to executable is not absolute. Find it.
28015      IFS_save="$IFS"
28016      IFS=:
28017      for p in $PATH; do
28018        if test -f "$p/$path" && test -x "$p/$path"; then
28019          new_path="$p/$path"
28020          break
28021        fi
28022      done
28023      IFS="$IFS_save"
28024    else
28025      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28026$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28027      new_path="$path"
28028    fi
28029
28030    if test "x$new_path" = x; then
28031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28032$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28033      has_space=`$ECHO "$complete" | $GREP " "`
28034      if test "x$has_space" != x; then
28035        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28037      fi
28038      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28039    fi
28040  fi
28041
28042  # Now join together the path and the arguments once again
28043  if test "x$arguments" != xEOL; then
28044    new_complete="$new_path ${arguments% *}"
28045  else
28046    new_complete="$new_path"
28047  fi
28048
28049  if test "x$complete" != "x$new_complete"; then
28050    OBJCOPY="$new_complete"
28051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28052$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28053  fi
28054
28055    fi
28056  fi
28057
28058  if test -n "$ac_tool_prefix"; then
28059  for ac_prog in gobjdump objdump
28060  do
28061    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28062set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28064$as_echo_n "checking for $ac_word... " >&6; }
28065if ${ac_cv_prog_OBJDUMP+:} false; then :
28066  $as_echo_n "(cached) " >&6
28067else
28068  if test -n "$OBJDUMP"; then
28069  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28070else
28071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28072for as_dir in $PATH
28073do
28074  IFS=$as_save_IFS
28075  test -z "$as_dir" && as_dir=.
28076    for ac_exec_ext in '' $ac_executable_extensions; do
28077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28078    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28080    break 2
28081  fi
28082done
28083  done
28084IFS=$as_save_IFS
28085
28086fi
28087fi
28088OBJDUMP=$ac_cv_prog_OBJDUMP
28089if test -n "$OBJDUMP"; then
28090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28091$as_echo "$OBJDUMP" >&6; }
28092else
28093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28094$as_echo "no" >&6; }
28095fi
28096
28097
28098    test -n "$OBJDUMP" && break
28099  done
28100fi
28101if test -z "$OBJDUMP"; then
28102  ac_ct_OBJDUMP=$OBJDUMP
28103  for ac_prog in gobjdump objdump
28104do
28105  # Extract the first word of "$ac_prog", so it can be a program name with args.
28106set dummy $ac_prog; ac_word=$2
28107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28108$as_echo_n "checking for $ac_word... " >&6; }
28109if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28110  $as_echo_n "(cached) " >&6
28111else
28112  if test -n "$ac_ct_OBJDUMP"; then
28113  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28114else
28115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28116for as_dir in $PATH
28117do
28118  IFS=$as_save_IFS
28119  test -z "$as_dir" && as_dir=.
28120    for ac_exec_ext in '' $ac_executable_extensions; do
28121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28122    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28124    break 2
28125  fi
28126done
28127  done
28128IFS=$as_save_IFS
28129
28130fi
28131fi
28132ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28133if test -n "$ac_ct_OBJDUMP"; then
28134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28135$as_echo "$ac_ct_OBJDUMP" >&6; }
28136else
28137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28138$as_echo "no" >&6; }
28139fi
28140
28141
28142  test -n "$ac_ct_OBJDUMP" && break
28143done
28144
28145  if test "x$ac_ct_OBJDUMP" = x; then
28146    OBJDUMP=""
28147  else
28148    case $cross_compiling:$ac_tool_warned in
28149yes:)
28150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28152ac_tool_warned=yes ;;
28153esac
28154    OBJDUMP=$ac_ct_OBJDUMP
28155  fi
28156fi
28157
28158  if test "x$OBJDUMP" != x; then
28159    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28160
28161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28162
28163  # First separate the path from the arguments. This will split at the first
28164  # space.
28165  complete="$OBJDUMP"
28166  path="${complete%% *}"
28167  tmp="$complete EOL"
28168  arguments="${tmp#* }"
28169
28170  # Input might be given as Windows format, start by converting to
28171  # unix format.
28172  new_path=`$CYGPATH -u "$path"`
28173
28174  # Now try to locate executable using which
28175  new_path=`$WHICH "$new_path" 2> /dev/null`
28176  # bat and cmd files are not always considered executable in cygwin causing which
28177  # to not find them
28178  if test "x$new_path" = x \
28179      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28180      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28181    new_path=`$CYGPATH -u "$path"`
28182  fi
28183  if test "x$new_path" = x; then
28184    # Oops. Which didn't find the executable.
28185    # The splitting of arguments from the executable at a space might have been incorrect,
28186    # since paths with space are more likely in Windows. Give it another try with the whole
28187    # argument.
28188    path="$complete"
28189    arguments="EOL"
28190    new_path=`$CYGPATH -u "$path"`
28191    new_path=`$WHICH "$new_path" 2> /dev/null`
28192    # bat and cmd files are not always considered executable in cygwin causing which
28193    # to not find them
28194    if test "x$new_path" = x \
28195        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28196        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28197      new_path=`$CYGPATH -u "$path"`
28198    fi
28199    if test "x$new_path" = x; then
28200      # It's still not found. Now this is an unrecoverable error.
28201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28202$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28203      has_space=`$ECHO "$complete" | $GREP " "`
28204      if test "x$has_space" != x; then
28205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28207      fi
28208      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28209    fi
28210  fi
28211
28212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28215  # "foo.exe" is OK but "foo" is an error.
28216  #
28217  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28218  # It is also a way to make sure we got the proper file name for the real test later on.
28219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28220  if test "x$test_shortpath" = x; then
28221    # Short path failed, file does not exist as specified.
28222    # Try adding .exe or .cmd
28223    if test -f "${new_path}.exe"; then
28224      input_to_shortpath="${new_path}.exe"
28225    elif test -f "${new_path}.cmd"; then
28226      input_to_shortpath="${new_path}.cmd"
28227    else
28228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28229$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28230      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28231$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28232      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28233    fi
28234  else
28235    input_to_shortpath="$new_path"
28236  fi
28237
28238  # Call helper function which possibly converts this using DOS-style short mode.
28239  # If so, the updated path is stored in $new_path.
28240  new_path="$input_to_shortpath"
28241
28242  input_path="$input_to_shortpath"
28243  # Check if we need to convert this using DOS-style short mode. If the path
28244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28245  # take no chances and rewrite it.
28246  # Note: m4 eats our [], so we need to use [ and ] instead.
28247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28248  if test "x$has_forbidden_chars" != x; then
28249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28253      # Going to short mode and back again did indeed matter. Since short mode is
28254      # case insensitive, let's make it lowercase to improve readability.
28255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28256      # Now convert it back to Unix-stile (cygpath)
28257      input_path=`$CYGPATH -u "$shortmode_path"`
28258      new_path="$input_path"
28259    fi
28260  fi
28261
28262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28263  if test "x$test_cygdrive_prefix" = x; then
28264    # As a simple fix, exclude /usr/bin since it's not a real path.
28265    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28267      # a path prefixed by /cygdrive for fixpath to work.
28268      new_path="$CYGWIN_ROOT_PATH$input_path"
28269    fi
28270  fi
28271
28272  # remove trailing .exe if any
28273  new_path="${new_path/%.exe/}"
28274
28275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28276
28277  # First separate the path from the arguments. This will split at the first
28278  # space.
28279  complete="$OBJDUMP"
28280  path="${complete%% *}"
28281  tmp="$complete EOL"
28282  arguments="${tmp#* }"
28283
28284  # Input might be given as Windows format, start by converting to
28285  # unix format.
28286  new_path="$path"
28287
28288  windows_path="$new_path"
28289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28290    unix_path=`$CYGPATH -u "$windows_path"`
28291    new_path="$unix_path"
28292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28294    new_path="$unix_path"
28295  fi
28296
28297
28298  # Now try to locate executable using which
28299  new_path=`$WHICH "$new_path" 2> /dev/null`
28300
28301  if test "x$new_path" = x; then
28302    # Oops. Which didn't find the executable.
28303    # The splitting of arguments from the executable at a space might have been incorrect,
28304    # since paths with space are more likely in Windows. Give it another try with the whole
28305    # argument.
28306    path="$complete"
28307    arguments="EOL"
28308    new_path="$path"
28309
28310  windows_path="$new_path"
28311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312    unix_path=`$CYGPATH -u "$windows_path"`
28313    new_path="$unix_path"
28314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28316    new_path="$unix_path"
28317  fi
28318
28319
28320    new_path=`$WHICH "$new_path" 2> /dev/null`
28321
28322    if test "x$new_path" = x; then
28323      # It's still not found. Now this is an unrecoverable error.
28324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28325$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28326      has_space=`$ECHO "$complete" | $GREP " "`
28327      if test "x$has_space" != x; then
28328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28330      fi
28331      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28332    fi
28333  fi
28334
28335  # Now new_path has a complete unix path to the binary
28336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28337    # Keep paths in /bin as-is, but remove trailing .exe if any
28338    new_path="${new_path/%.exe/}"
28339    # Do not save /bin paths to all_fixpath_prefixes!
28340  else
28341    # Not in mixed or Windows style, start by that.
28342    new_path=`cmd //c echo $new_path`
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28353  fi
28354
28355    # Output is in $new_path
28356
28357  windows_path="$new_path"
28358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28359    unix_path=`$CYGPATH -u "$windows_path"`
28360    new_path="$unix_path"
28361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28363    new_path="$unix_path"
28364  fi
28365
28366    # remove trailing .exe if any
28367    new_path="${new_path/%.exe/}"
28368
28369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28371  fi
28372
28373  else
28374    # We're on a posix platform. Hooray! :)
28375    # First separate the path from the arguments. This will split at the first
28376    # space.
28377    complete="$OBJDUMP"
28378    path="${complete%% *}"
28379    tmp="$complete EOL"
28380    arguments="${tmp#* }"
28381
28382    # Cannot rely on the command "which" here since it doesn't always work.
28383    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28384    if test -z "$is_absolute_path"; then
28385      # Path to executable is not absolute. Find it.
28386      IFS_save="$IFS"
28387      IFS=:
28388      for p in $PATH; do
28389        if test -f "$p/$path" && test -x "$p/$path"; then
28390          new_path="$p/$path"
28391          break
28392        fi
28393      done
28394      IFS="$IFS_save"
28395    else
28396      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28397$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28398      new_path="$path"
28399    fi
28400
28401    if test "x$new_path" = x; then
28402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28403$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28404      has_space=`$ECHO "$complete" | $GREP " "`
28405      if test "x$has_space" != x; then
28406        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28407$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28408      fi
28409      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28410    fi
28411  fi
28412
28413  # Now join together the path and the arguments once again
28414  if test "x$arguments" != xEOL; then
28415    new_complete="$new_path ${arguments% *}"
28416  else
28417    new_complete="$new_path"
28418  fi
28419
28420  if test "x$complete" != "x$new_complete"; then
28421    OBJDUMP="$new_complete"
28422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28423$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28424  fi
28425
28426  fi
28427
28428  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28429    # Extract the first word of "lipo", so it can be a program name with args.
28430set dummy lipo; ac_word=$2
28431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28432$as_echo_n "checking for $ac_word... " >&6; }
28433if ${ac_cv_path_LIPO+:} false; then :
28434  $as_echo_n "(cached) " >&6
28435else
28436  case $LIPO in
28437  [\\/]* | ?:[\\/]*)
28438  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28439  ;;
28440  *)
28441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28442for as_dir in $PATH
28443do
28444  IFS=$as_save_IFS
28445  test -z "$as_dir" && as_dir=.
28446    for ac_exec_ext in '' $ac_executable_extensions; do
28447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28448    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28450    break 2
28451  fi
28452done
28453  done
28454IFS=$as_save_IFS
28455
28456  ;;
28457esac
28458fi
28459LIPO=$ac_cv_path_LIPO
28460if test -n "$LIPO"; then
28461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28462$as_echo "$LIPO" >&6; }
28463else
28464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28465$as_echo "no" >&6; }
28466fi
28467
28468
28469
28470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471
28472  # First separate the path from the arguments. This will split at the first
28473  # space.
28474  complete="$LIPO"
28475  path="${complete%% *}"
28476  tmp="$complete EOL"
28477  arguments="${tmp#* }"
28478
28479  # Input might be given as Windows format, start by converting to
28480  # unix format.
28481  new_path=`$CYGPATH -u "$path"`
28482
28483  # Now try to locate executable using which
28484  new_path=`$WHICH "$new_path" 2> /dev/null`
28485  # bat and cmd files are not always considered executable in cygwin causing which
28486  # to not find them
28487  if test "x$new_path" = x \
28488      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28489      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28490    new_path=`$CYGPATH -u "$path"`
28491  fi
28492  if test "x$new_path" = x; then
28493    # Oops. Which didn't find the executable.
28494    # The splitting of arguments from the executable at a space might have been incorrect,
28495    # since paths with space are more likely in Windows. Give it another try with the whole
28496    # argument.
28497    path="$complete"
28498    arguments="EOL"
28499    new_path=`$CYGPATH -u "$path"`
28500    new_path=`$WHICH "$new_path" 2> /dev/null`
28501    # bat and cmd files are not always considered executable in cygwin causing which
28502    # to not find them
28503    if test "x$new_path" = x \
28504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28506      new_path=`$CYGPATH -u "$path"`
28507    fi
28508    if test "x$new_path" = x; then
28509      # It's still not found. Now this is an unrecoverable error.
28510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28511$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28512      has_space=`$ECHO "$complete" | $GREP " "`
28513      if test "x$has_space" != x; then
28514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28516      fi
28517      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28518    fi
28519  fi
28520
28521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28524  # "foo.exe" is OK but "foo" is an error.
28525  #
28526  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28527  # It is also a way to make sure we got the proper file name for the real test later on.
28528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28529  if test "x$test_shortpath" = x; then
28530    # Short path failed, file does not exist as specified.
28531    # Try adding .exe or .cmd
28532    if test -f "${new_path}.exe"; then
28533      input_to_shortpath="${new_path}.exe"
28534    elif test -f "${new_path}.cmd"; then
28535      input_to_shortpath="${new_path}.cmd"
28536    else
28537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28538$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28541      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28542    fi
28543  else
28544    input_to_shortpath="$new_path"
28545  fi
28546
28547  # Call helper function which possibly converts this using DOS-style short mode.
28548  # If so, the updated path is stored in $new_path.
28549  new_path="$input_to_shortpath"
28550
28551  input_path="$input_to_shortpath"
28552  # Check if we need to convert this using DOS-style short mode. If the path
28553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28554  # take no chances and rewrite it.
28555  # Note: m4 eats our [], so we need to use [ and ] instead.
28556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28557  if test "x$has_forbidden_chars" != x; then
28558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28562      # Going to short mode and back again did indeed matter. Since short mode is
28563      # case insensitive, let's make it lowercase to improve readability.
28564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28565      # Now convert it back to Unix-stile (cygpath)
28566      input_path=`$CYGPATH -u "$shortmode_path"`
28567      new_path="$input_path"
28568    fi
28569  fi
28570
28571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28572  if test "x$test_cygdrive_prefix" = x; then
28573    # As a simple fix, exclude /usr/bin since it's not a real path.
28574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28576      # a path prefixed by /cygdrive for fixpath to work.
28577      new_path="$CYGWIN_ROOT_PATH$input_path"
28578    fi
28579  fi
28580
28581  # remove trailing .exe if any
28582  new_path="${new_path/%.exe/}"
28583
28584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28585
28586  # First separate the path from the arguments. This will split at the first
28587  # space.
28588  complete="$LIPO"
28589  path="${complete%% *}"
28590  tmp="$complete EOL"
28591  arguments="${tmp#* }"
28592
28593  # Input might be given as Windows format, start by converting to
28594  # unix format.
28595  new_path="$path"
28596
28597  windows_path="$new_path"
28598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28599    unix_path=`$CYGPATH -u "$windows_path"`
28600    new_path="$unix_path"
28601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28603    new_path="$unix_path"
28604  fi
28605
28606
28607  # Now try to locate executable using which
28608  new_path=`$WHICH "$new_path" 2> /dev/null`
28609
28610  if test "x$new_path" = x; then
28611    # Oops. Which didn't find the executable.
28612    # The splitting of arguments from the executable at a space might have been incorrect,
28613    # since paths with space are more likely in Windows. Give it another try with the whole
28614    # argument.
28615    path="$complete"
28616    arguments="EOL"
28617    new_path="$path"
28618
28619  windows_path="$new_path"
28620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621    unix_path=`$CYGPATH -u "$windows_path"`
28622    new_path="$unix_path"
28623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28625    new_path="$unix_path"
28626  fi
28627
28628
28629    new_path=`$WHICH "$new_path" 2> /dev/null`
28630
28631    if test "x$new_path" = x; then
28632      # It's still not found. Now this is an unrecoverable error.
28633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28634$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28635      has_space=`$ECHO "$complete" | $GREP " "`
28636      if test "x$has_space" != x; then
28637        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28638$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28639      fi
28640      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28641    fi
28642  fi
28643
28644  # Now new_path has a complete unix path to the binary
28645  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28646    # Keep paths in /bin as-is, but remove trailing .exe if any
28647    new_path="${new_path/%.exe/}"
28648    # Do not save /bin paths to all_fixpath_prefixes!
28649  else
28650    # Not in mixed or Windows style, start by that.
28651    new_path=`cmd //c echo $new_path`
28652
28653  input_path="$new_path"
28654  # Check if we need to convert this using DOS-style short mode. If the path
28655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28656  # take no chances and rewrite it.
28657  # Note: m4 eats our [], so we need to use [ and ] instead.
28658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28659  if test "x$has_forbidden_chars" != x; then
28660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28662  fi
28663
28664    # Output is in $new_path
28665
28666  windows_path="$new_path"
28667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28668    unix_path=`$CYGPATH -u "$windows_path"`
28669    new_path="$unix_path"
28670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28672    new_path="$unix_path"
28673  fi
28674
28675    # remove trailing .exe if any
28676    new_path="${new_path/%.exe/}"
28677
28678    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28679    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28680  fi
28681
28682  else
28683    # We're on a posix platform. Hooray! :)
28684    # First separate the path from the arguments. This will split at the first
28685    # space.
28686    complete="$LIPO"
28687    path="${complete%% *}"
28688    tmp="$complete EOL"
28689    arguments="${tmp#* }"
28690
28691    # Cannot rely on the command "which" here since it doesn't always work.
28692    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28693    if test -z "$is_absolute_path"; then
28694      # Path to executable is not absolute. Find it.
28695      IFS_save="$IFS"
28696      IFS=:
28697      for p in $PATH; do
28698        if test -f "$p/$path" && test -x "$p/$path"; then
28699          new_path="$p/$path"
28700          break
28701        fi
28702      done
28703      IFS="$IFS_save"
28704    else
28705      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28706$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28707      new_path="$path"
28708    fi
28709
28710    if test "x$new_path" = x; then
28711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28712$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28713      has_space=`$ECHO "$complete" | $GREP " "`
28714      if test "x$has_space" != x; then
28715        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28717      fi
28718      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28719    fi
28720  fi
28721
28722  # Now join together the path and the arguments once again
28723  if test "x$arguments" != xEOL; then
28724    new_complete="$new_path ${arguments% *}"
28725  else
28726    new_complete="$new_path"
28727  fi
28728
28729  if test "x$complete" != "x$new_complete"; then
28730    LIPO="$new_complete"
28731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28732$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28733  fi
28734
28735  fi
28736
28737
28738
28739  # Restore old path without tools dir
28740  PATH="$OLD_PATH"
28741
28742
28743# FIXME: Currently we must test this after paths but before flags. Fix!
28744
28745# And we can test some aspects on the target using configure macros.
28746
28747
28748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28749$as_echo_n "checking for ANSI C header files... " >&6; }
28750if ${ac_cv_header_stdc+:} false; then :
28751  $as_echo_n "(cached) " >&6
28752else
28753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28754/* end confdefs.h.  */
28755#include <stdlib.h>
28756#include <stdarg.h>
28757#include <string.h>
28758#include <float.h>
28759
28760int
28761main ()
28762{
28763
28764  ;
28765  return 0;
28766}
28767_ACEOF
28768if ac_fn_cxx_try_compile "$LINENO"; then :
28769  ac_cv_header_stdc=yes
28770else
28771  ac_cv_header_stdc=no
28772fi
28773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28774
28775if test $ac_cv_header_stdc = yes; then
28776  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28778/* end confdefs.h.  */
28779#include <string.h>
28780
28781_ACEOF
28782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28783  $EGREP "memchr" >/dev/null 2>&1; then :
28784
28785else
28786  ac_cv_header_stdc=no
28787fi
28788rm -f conftest*
28789
28790fi
28791
28792if test $ac_cv_header_stdc = yes; then
28793  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28795/* end confdefs.h.  */
28796#include <stdlib.h>
28797
28798_ACEOF
28799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28800  $EGREP "free" >/dev/null 2>&1; then :
28801
28802else
28803  ac_cv_header_stdc=no
28804fi
28805rm -f conftest*
28806
28807fi
28808
28809if test $ac_cv_header_stdc = yes; then
28810  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28811  if test "$cross_compiling" = yes; then :
28812  :
28813else
28814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28815/* end confdefs.h.  */
28816#include <ctype.h>
28817#include <stdlib.h>
28818#if ((' ' & 0x0FF) == 0x020)
28819# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28820# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28821#else
28822# define ISLOWER(c) \
28823		   (('a' <= (c) && (c) <= 'i') \
28824		     || ('j' <= (c) && (c) <= 'r') \
28825		     || ('s' <= (c) && (c) <= 'z'))
28826# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28827#endif
28828
28829#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28830int
28831main ()
28832{
28833  int i;
28834  for (i = 0; i < 256; i++)
28835    if (XOR (islower (i), ISLOWER (i))
28836	|| toupper (i) != TOUPPER (i))
28837      return 2;
28838  return 0;
28839}
28840_ACEOF
28841if ac_fn_cxx_try_run "$LINENO"; then :
28842
28843else
28844  ac_cv_header_stdc=no
28845fi
28846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28847  conftest.$ac_objext conftest.beam conftest.$ac_ext
28848fi
28849
28850fi
28851fi
28852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28853$as_echo "$ac_cv_header_stdc" >&6; }
28854if test $ac_cv_header_stdc = yes; then
28855
28856$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28857
28858fi
28859
28860# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28861for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28862		  inttypes.h stdint.h unistd.h
28863do :
28864  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28865ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28866"
28867if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28868  cat >>confdefs.h <<_ACEOF
28869#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28870_ACEOF
28871
28872fi
28873
28874done
28875
28876
28877
28878  ###############################################################################
28879  #
28880  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28881  # (The JVM can use 32 or 64 bit Java pointers but that decision
28882  # is made at runtime.)
28883  #
28884
28885  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28886    # Always specify -m flag on Solaris
28887    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28888
28889  # When we add flags to the "official" CFLAGS etc, we need to
28890  # keep track of these additions in ADDED_CFLAGS etc. These
28891  # will later be checked to make sure only controlled additions
28892  # have been made to CFLAGS etc.
28893  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28894  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28895  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28896
28897  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28898  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28899  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28900
28901  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28902  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28903  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28904
28905  elif test "x$COMPILE_TYPE" = xreduced; then
28906    if test "x$OPENJDK_TARGET_OS" != xwindows; then
28907      # Specify -m if running reduced on other Posix platforms
28908
28909  # When we add flags to the "official" CFLAGS etc, we need to
28910  # keep track of these additions in ADDED_CFLAGS etc. These
28911  # will later be checked to make sure only controlled additions
28912  # have been made to CFLAGS etc.
28913  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28914  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28915  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28916
28917  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28918  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28919  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28920
28921  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28922  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28923  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28924
28925    fi
28926  fi
28927
28928  # Make compilation sanity check
28929  for ac_header in stdio.h
28930do :
28931  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28932if test "x$ac_cv_header_stdio_h" = xyes; then :
28933  cat >>confdefs.h <<_ACEOF
28934#define HAVE_STDIO_H 1
28935_ACEOF
28936
28937else
28938
28939    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28940$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28941    if test "x$COMPILE_TYPE" = xreduced; then
28942      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28943$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28944    elif test "x$COMPILE_TYPE" = xcross; then
28945      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28946$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28947    fi
28948    as_fn_error $? "Cannot continue." "$LINENO" 5
28949
28950fi
28951
28952done
28953
28954
28955  # The cast to long int works around a bug in the HP C Compiler
28956# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28957# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28958# This bug is HP SR number 8606223364.
28959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28960$as_echo_n "checking size of int *... " >&6; }
28961if ${ac_cv_sizeof_int_p+:} false; then :
28962  $as_echo_n "(cached) " >&6
28963else
28964  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28965
28966else
28967  if test "$ac_cv_type_int_p" = yes; then
28968     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28970as_fn_error 77 "cannot compute sizeof (int *)
28971See \`config.log' for more details" "$LINENO" 5; }
28972   else
28973     ac_cv_sizeof_int_p=0
28974   fi
28975fi
28976
28977fi
28978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28979$as_echo "$ac_cv_sizeof_int_p" >&6; }
28980
28981
28982
28983cat >>confdefs.h <<_ACEOF
28984#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28985_ACEOF
28986
28987
28988
28989  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
28990  if test "x$ac_cv_sizeof_int_p" = x; then
28991    # The test failed, lets stick to the assumed value.
28992    { $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
28993$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28994  else
28995    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
28996
28997    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28998      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
28999      # Let's try to implicitely set the compilers target architecture and retry the test
29000      { $as_echo "$as_me:${as_lineno-$LINENO}: 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)." >&5
29001$as_echo "$as_me: 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)." >&6;}
29002      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
29003$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
29004
29005  # When we add flags to the "official" CFLAGS etc, we need to
29006  # keep track of these additions in ADDED_CFLAGS etc. These
29007  # will later be checked to make sure only controlled additions
29008  # have been made to CFLAGS etc.
29009  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29010  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29011  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29012
29013  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29014  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29015  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29016
29017  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29018  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29019  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29020
29021
29022      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29023      unset ac_cv_sizeof_int_p
29024      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29025      cat >>confdefs.h <<_ACEOF
29026#undef SIZEOF_INT_P
29027_ACEOF
29028
29029      # The cast to long int works around a bug in the HP C Compiler
29030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29032# This bug is HP SR number 8606223364.
29033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29034$as_echo_n "checking size of int *... " >&6; }
29035if ${ac_cv_sizeof_int_p+:} false; then :
29036  $as_echo_n "(cached) " >&6
29037else
29038  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29039
29040else
29041  if test "$ac_cv_type_int_p" = yes; then
29042     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29044as_fn_error 77 "cannot compute sizeof (int *)
29045See \`config.log' for more details" "$LINENO" 5; }
29046   else
29047     ac_cv_sizeof_int_p=0
29048   fi
29049fi
29050
29051fi
29052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29053$as_echo "$ac_cv_sizeof_int_p" >&6; }
29054
29055
29056
29057cat >>confdefs.h <<_ACEOF
29058#define SIZEOF_INT_P $ac_cv_sizeof_int_p
29059_ACEOF
29060
29061
29062
29063      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29064
29065      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29066        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
29067      fi
29068    fi
29069  fi
29070
29071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29072$as_echo_n "checking for target address size... " >&6; }
29073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29074$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29075
29076
29077  ###############################################################################
29078  #
29079  # Is the target little of big endian?
29080  #
29081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29082$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29083if ${ac_cv_c_bigendian+:} false; then :
29084  $as_echo_n "(cached) " >&6
29085else
29086  ac_cv_c_bigendian=unknown
29087    # See if we're dealing with a universal compiler.
29088    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29089/* end confdefs.h.  */
29090#ifndef __APPLE_CC__
29091	       not a universal capable compiler
29092	     #endif
29093	     typedef int dummy;
29094
29095_ACEOF
29096if ac_fn_cxx_try_compile "$LINENO"; then :
29097
29098	# Check for potential -arch flags.  It is not universal unless
29099	# there are at least two -arch flags with different values.
29100	ac_arch=
29101	ac_prev=
29102	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29103	 if test -n "$ac_prev"; then
29104	   case $ac_word in
29105	     i?86 | x86_64 | ppc | ppc64)
29106	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29107		 ac_arch=$ac_word
29108	       else
29109		 ac_cv_c_bigendian=universal
29110		 break
29111	       fi
29112	       ;;
29113	   esac
29114	   ac_prev=
29115	 elif test "x$ac_word" = "x-arch"; then
29116	   ac_prev=arch
29117	 fi
29118       done
29119fi
29120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29121    if test $ac_cv_c_bigendian = unknown; then
29122      # See if sys/param.h defines the BYTE_ORDER macro.
29123      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124/* end confdefs.h.  */
29125#include <sys/types.h>
29126	     #include <sys/param.h>
29127
29128int
29129main ()
29130{
29131#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29132		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29133		     && LITTLE_ENDIAN)
29134	      bogus endian macros
29135	     #endif
29136
29137  ;
29138  return 0;
29139}
29140_ACEOF
29141if ac_fn_cxx_try_compile "$LINENO"; then :
29142  # It does; now see whether it defined to BIG_ENDIAN or not.
29143	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29144/* end confdefs.h.  */
29145#include <sys/types.h>
29146		#include <sys/param.h>
29147
29148int
29149main ()
29150{
29151#if BYTE_ORDER != BIG_ENDIAN
29152		 not big endian
29153		#endif
29154
29155  ;
29156  return 0;
29157}
29158_ACEOF
29159if ac_fn_cxx_try_compile "$LINENO"; then :
29160  ac_cv_c_bigendian=yes
29161else
29162  ac_cv_c_bigendian=no
29163fi
29164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29165fi
29166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29167    fi
29168    if test $ac_cv_c_bigendian = unknown; then
29169      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29170      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29171/* end confdefs.h.  */
29172#include <limits.h>
29173
29174int
29175main ()
29176{
29177#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29178	      bogus endian macros
29179	     #endif
29180
29181  ;
29182  return 0;
29183}
29184_ACEOF
29185if ac_fn_cxx_try_compile "$LINENO"; then :
29186  # It does; now see whether it defined to _BIG_ENDIAN or not.
29187	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29188/* end confdefs.h.  */
29189#include <limits.h>
29190
29191int
29192main ()
29193{
29194#ifndef _BIG_ENDIAN
29195		 not big endian
29196		#endif
29197
29198  ;
29199  return 0;
29200}
29201_ACEOF
29202if ac_fn_cxx_try_compile "$LINENO"; then :
29203  ac_cv_c_bigendian=yes
29204else
29205  ac_cv_c_bigendian=no
29206fi
29207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29208fi
29209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29210    fi
29211    if test $ac_cv_c_bigendian = unknown; then
29212      # Compile a test program.
29213      if test "$cross_compiling" = yes; then :
29214  # Try to guess by grepping values from an object file.
29215	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29216/* end confdefs.h.  */
29217short int ascii_mm[] =
29218		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29219		short int ascii_ii[] =
29220		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29221		int use_ascii (int i) {
29222		  return ascii_mm[i] + ascii_ii[i];
29223		}
29224		short int ebcdic_ii[] =
29225		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29226		short int ebcdic_mm[] =
29227		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29228		int use_ebcdic (int i) {
29229		  return ebcdic_mm[i] + ebcdic_ii[i];
29230		}
29231		extern int foo;
29232
29233int
29234main ()
29235{
29236return use_ascii (foo) == use_ebcdic (foo);
29237  ;
29238  return 0;
29239}
29240_ACEOF
29241if ac_fn_cxx_try_compile "$LINENO"; then :
29242  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29243	      ac_cv_c_bigendian=yes
29244	    fi
29245	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29246	      if test "$ac_cv_c_bigendian" = unknown; then
29247		ac_cv_c_bigendian=no
29248	      else
29249		# finding both strings is unlikely to happen, but who knows?
29250		ac_cv_c_bigendian=unknown
29251	      fi
29252	    fi
29253fi
29254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29255else
29256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29257/* end confdefs.h.  */
29258$ac_includes_default
29259int
29260main ()
29261{
29262
29263	     /* Are we little or big endian?  From Harbison&Steele.  */
29264	     union
29265	     {
29266	       long int l;
29267	       char c[sizeof (long int)];
29268	     } u;
29269	     u.l = 1;
29270	     return u.c[sizeof (long int) - 1] == 1;
29271
29272  ;
29273  return 0;
29274}
29275_ACEOF
29276if ac_fn_cxx_try_run "$LINENO"; then :
29277  ac_cv_c_bigendian=no
29278else
29279  ac_cv_c_bigendian=yes
29280fi
29281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29282  conftest.$ac_objext conftest.beam conftest.$ac_ext
29283fi
29284
29285    fi
29286fi
29287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29288$as_echo "$ac_cv_c_bigendian" >&6; }
29289 case $ac_cv_c_bigendian in #(
29290   yes)
29291     ENDIAN="big";; #(
29292   no)
29293     ENDIAN="little" ;; #(
29294   universal)
29295     ENDIAN="universal_endianness"
29296     ;; #(
29297   *)
29298     ENDIAN="unknown" ;;
29299 esac
29300
29301
29302  if test "x$ENDIAN" = xuniversal_endianness; then
29303    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29304  fi
29305  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29306    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
29307  fi
29308
29309
29310# Configure flags for the tools
29311
29312
29313  ###############################################################################
29314  #
29315  # How to compile shared libraries.
29316  #
29317
29318  if test "x$GCC" = xyes; then
29319    COMPILER_NAME=gcc
29320    PICFLAG="-fPIC"
29321    LIBRARY_PREFIX=lib
29322    SHARED_LIBRARY='lib$1.so'
29323    STATIC_LIBRARY='lib$1.a'
29324    SHARED_LIBRARY_FLAGS="-shared"
29325    SHARED_LIBRARY_SUFFIX='.so'
29326    STATIC_LIBRARY_SUFFIX='.a'
29327    OBJ_SUFFIX='.o'
29328    EXE_SUFFIX=''
29329    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29330    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29331    C_FLAG_REORDER=''
29332    CXX_FLAG_REORDER=''
29333    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29334    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29335    LD="$CC"
29336    LDEXE="$CC"
29337    LDCXX="$CXX"
29338    LDEXECXX="$CXX"
29339    POST_STRIP_CMD="$STRIP -g"
29340
29341    # Linking is different on MacOSX
29342    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29343      # Might change in the future to clang.
29344      COMPILER_NAME=gcc
29345      SHARED_LIBRARY='lib$1.dylib'
29346      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29347      SHARED_LIBRARY_SUFFIX='.dylib'
29348      EXE_SUFFIX=''
29349      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29350      SET_SHARED_LIBRARY_MAPFILE=''
29351      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29352      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29353      POST_STRIP_CMD="$STRIP -S"
29354    fi
29355  else
29356    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29357      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29358      COMPILER_NAME=ossc
29359      PICFLAG="-KPIC"
29360      LIBRARY_PREFIX=lib
29361      SHARED_LIBRARY='lib$1.so'
29362      STATIC_LIBRARY='lib$1.a'
29363      SHARED_LIBRARY_FLAGS="-G"
29364      SHARED_LIBRARY_SUFFIX='.so'
29365      STATIC_LIBRARY_SUFFIX='.a'
29366      OBJ_SUFFIX='.o'
29367      EXE_SUFFIX=''
29368      SET_SHARED_LIBRARY_NAME=''
29369      SET_SHARED_LIBRARY_MAPFILE='-M$1'
29370      C_FLAG_REORDER='-xF'
29371      CXX_FLAG_REORDER='-xF'
29372      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29373      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29374      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29375      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29376      CFLAGS_JDKLIB_EXTRA='-xstrconst'
29377      POST_STRIP_CMD="$STRIP -x"
29378      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29379    fi
29380    if test "x$OPENJDK_TARGET_OS" = xaix; then
29381        COMPILER_NAME=xlc
29382        PICFLAG="-qpic=large"
29383        LIBRARY_PREFIX=lib
29384        SHARED_LIBRARY='lib$1.so'
29385        STATIC_LIBRARY='lib$1.a'
29386        SHARED_LIBRARY_FLAGS="-qmkshrobj"
29387        SHARED_LIBRARY_SUFFIX='.so'
29388        STATIC_LIBRARY_SUFFIX='.a'
29389        OBJ_SUFFIX='.o'
29390        EXE_SUFFIX=''
29391        SET_SHARED_LIBRARY_NAME=''
29392        SET_SHARED_LIBRARY_MAPFILE=''
29393        C_FLAG_REORDER=''
29394        CXX_FLAG_REORDER=''
29395        SET_SHARED_LIBRARY_ORIGIN=''
29396        SET_EXECUTABLE_ORIGIN=""
29397        CFLAGS_JDK=""
29398        CXXFLAGS_JDK=""
29399        CFLAGS_JDKLIB_EXTRA=''
29400        POST_STRIP_CMD="$STRIP -X32_64"
29401        POST_MCS_CMD=""
29402    fi
29403    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29404      # If it is not gcc, then assume it is the MS Visual Studio compiler
29405      COMPILER_NAME=cl
29406      PICFLAG=""
29407      LIBRARY_PREFIX=
29408      SHARED_LIBRARY='$1.dll'
29409      STATIC_LIBRARY='$1.lib'
29410      SHARED_LIBRARY_FLAGS="-LD"
29411      SHARED_LIBRARY_SUFFIX='.dll'
29412      STATIC_LIBRARY_SUFFIX='.lib'
29413      OBJ_SUFFIX='.obj'
29414      EXE_SUFFIX='.exe'
29415      SET_SHARED_LIBRARY_NAME=''
29416      SET_SHARED_LIBRARY_MAPFILE=''
29417      SET_SHARED_LIBRARY_ORIGIN=''
29418      SET_EXECUTABLE_ORIGIN=''
29419    fi
29420  fi
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440  # The (cross) compiler is now configured, we can now test capabilities
29441  # of the target platform.
29442
29443
29444
29445  ###############################################################################
29446  #
29447  # Setup the opt flags for different compilers
29448  # and different operating systems.
29449  #
29450
29451  #
29452  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29453  #
29454  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29455    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29456    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29457    CFLAGS="$CFLAGS -mstackrealign"
29458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29459$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29460    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29461/* end confdefs.h.  */
29462int main() { return 0; }
29463_ACEOF
29464if ac_fn_cxx_try_link "$LINENO"; then :
29465
29466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29467$as_echo "yes" >&6; }
29468
29469else
29470
29471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29472$as_echo "no" >&6; }
29473          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29474
29475
29476fi
29477rm -f core conftest.err conftest.$ac_objext \
29478    conftest$ac_exeext conftest.$ac_ext
29479  fi
29480
29481  C_FLAG_DEPS="-MMD -MF"
29482  CXX_FLAG_DEPS="-MMD -MF"
29483
29484  case $COMPILER_TYPE in
29485    CC )
29486      case $COMPILER_NAME in
29487        gcc )
29488          case $OPENJDK_TARGET_OS in
29489            macosx )
29490              # On MacOSX we optimize for size, something
29491              # we should do for all platforms?
29492              C_O_FLAG_HI="-Os"
29493              C_O_FLAG_NORM="-Os"
29494              C_O_FLAG_NONE=""
29495              ;;
29496            *)
29497              C_O_FLAG_HI="-O3"
29498              C_O_FLAG_NORM="-O2"
29499              C_O_FLAG_NONE="-O0"
29500              ;;
29501          esac
29502          CXX_O_FLAG_HI="$C_O_FLAG_HI"
29503          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29504          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29505          CFLAGS_DEBUG_SYMBOLS="-g"
29506          CXXFLAGS_DEBUG_SYMBOLS="-g"
29507          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29508            CFLAGS_DEBUG_SYMBOLS="-g1"
29509            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29510          fi
29511          ;;
29512        ossc )
29513          #
29514          # Forte has different names for this with their C++ compiler...
29515          #
29516          C_FLAG_DEPS="-xMMD -xMF"
29517          CXX_FLAG_DEPS="-xMMD -xMF"
29518
29519          # Extra options used with HIGHEST
29520          #
29521          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29522          #          done with care, there are some assumptions below that need to
29523          #          be understood about the use of pointers, and IEEE behavior.
29524          #
29525          # Use non-standard floating point mode (not IEEE 754)
29526          CC_HIGHEST="$CC_HIGHEST -fns"
29527          # Do some simplification of floating point arithmetic (not IEEE 754)
29528          CC_HIGHEST="$CC_HIGHEST -fsimple"
29529          # Use single precision floating point with 'float'
29530          CC_HIGHEST="$CC_HIGHEST -fsingle"
29531          # Assume memory references via basic pointer types do not alias
29532          #   (Source with excessing pointer casting and data access with mixed
29533          #    pointer types are not recommended)
29534          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29535          # Use intrinsic or inline versions for math/std functions
29536          #   (If you expect perfect errno behavior, do not use this)
29537          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29538          # Loop data dependency optimizations (need -xO3 or higher)
29539          CC_HIGHEST="$CC_HIGHEST -xdepend"
29540          # Pointer parameters to functions do not overlap
29541          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29542          #    If you pass in multiple pointers to the same data, do not use this)
29543          CC_HIGHEST="$CC_HIGHEST -xrestrict"
29544          # Inline some library routines
29545          #   (If you expect perfect errno behavior, do not use this)
29546          CC_HIGHEST="$CC_HIGHEST -xlibmil"
29547          # Use optimized math routines
29548          #   (If you expect perfect errno behavior, do not use this)
29549          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29550          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29551
29552          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29553            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29554            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29555          fi
29556
29557          case $OPENJDK_TARGET_CPU_ARCH in
29558            x86)
29559              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29560              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29561              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29562              C_O_FLAG_NONE="-xregs=no%frameptr"
29563              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29564              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29565              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29566              CXX_O_FLAG_NONE="-xregs=no%frameptr"
29567              if test "x$OPENJDK_TARGET_CPU" = xx86; then
29568                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29569                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29570              fi
29571              ;;
29572            sparc)
29573              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29574              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29575              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29576              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29577              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29578              C_O_FLAG_NONE=""
29579              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29580              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29581              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29582              CXX_O_FLAG_NONE=""
29583              ;;
29584          esac
29585
29586          CFLAGS_DEBUG_SYMBOLS="-g -xs"
29587          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29588          ;;
29589        xlc )
29590          C_FLAG_DEPS="-qmakedep=gcc -MF"
29591          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29592          C_O_FLAG_HIGHEST="-O3"
29593          C_O_FLAG_HI="-O3 -qstrict"
29594          C_O_FLAG_NORM="-O2"
29595          C_O_FLAG_NONE=""
29596          CXX_O_FLAG_HIGHEST="-O3"
29597          CXX_O_FLAG_HI="-O3 -qstrict"
29598          CXX_O_FLAG_NORM="-O2"
29599          CXX_O_FLAG_NONE=""
29600          CFLAGS_DEBUG_SYMBOLS="-g"
29601          CXXFLAGS_DEBUG_SYMBOLS="-g"
29602          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29603          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29604          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29605          ;;
29606      esac
29607      ;;
29608    CL )
29609      C_O_FLAG_HIGHEST="-O2"
29610      C_O_FLAG_HI="-O1"
29611      C_O_FLAG_NORM="-O1"
29612      C_O_FLAG_NONE="-Od"
29613      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29614      CXX_O_FLAG_HI="$C_O_FLAG_HI"
29615      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29616      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29617      ;;
29618  esac
29619
29620  if test -z "$C_O_FLAG_HIGHEST"; then
29621    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29622  fi
29623
29624  if test -z "$CXX_O_FLAG_HIGHEST"; then
29625    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29626  fi
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29643$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29644  fi
29645
29646  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29648$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29649  fi
29650
29651  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29653$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29654  fi
29655
29656
29657# Check whether --with-extra-cflags was given.
29658if test "${with_extra_cflags+set}" = set; then :
29659  withval=$with_extra_cflags;
29660fi
29661
29662
29663
29664# Check whether --with-extra-cxxflags was given.
29665if test "${with_extra_cxxflags+set}" = set; then :
29666  withval=$with_extra_cxxflags;
29667fi
29668
29669
29670
29671# Check whether --with-extra-ldflags was given.
29672if test "${with_extra_ldflags+set}" = set; then :
29673  withval=$with_extra_ldflags;
29674fi
29675
29676
29677  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29678  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29679  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29680
29681  # Hotspot needs these set in their legacy form
29682  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29683  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29684  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29685
29686
29687
29688
29689
29690  ###############################################################################
29691  #
29692  # Now setup the CFLAGS and LDFLAGS for the JDK build.
29693  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29694  #
29695  case $COMPILER_NAME in
29696    gcc )
29697      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29698      -pipe \
29699      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29700      case $OPENJDK_TARGET_CPU_ARCH in
29701        arm )
29702          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29703          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29704          ;;
29705        ppc )
29706          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29707          ;;
29708        * )
29709          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29710          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29711          ;;
29712      esac
29713      ;;
29714    ossc )
29715      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29716      case $OPENJDK_TARGET_CPU_ARCH in
29717        x86 )
29718          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29719          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29720          ;;
29721      esac
29722
29723      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29724      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29725
29726      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29727      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29728      ;;
29729    xlc )
29730      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29731      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29732
29733      LDFLAGS_JDK="$LDFLAGS_JDK"
29734      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29735      ;;
29736    cl )
29737      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29738      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29739      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29740      -DWIN32 -DIAL"
29741      case $OPENJDK_TARGET_CPU in
29742        x86 )
29743          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29744          ;;
29745        x86_64 )
29746          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29747          ;;
29748      esac
29749      ;;
29750  esac
29751
29752  ###############################################################################
29753
29754  # Adjust flags according to debug level.
29755  case $DEBUG_LEVEL in
29756    fastdebug )
29757      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29758      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29759      C_O_FLAG_HI="$C_O_FLAG_NORM"
29760      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29761      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29762      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29763      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29764      ;;
29765    slowdebug )
29766      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29767      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29768      C_O_FLAG_HI="$C_O_FLAG_NONE"
29769      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29770      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29771      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29772      JAVAC_FLAGS="$JAVAC_FLAGS -g"
29773      ;;
29774  esac
29775
29776  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29777
29778  # The package path is used only on macosx?
29779  PACKAGE_PATH=/opt/local
29780
29781
29782  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29783    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29784    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29785    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29786    #   Note: -Dmacro         is the same as    #define macro 1
29787    #         -Dmacro=        is the same as    #define macro
29788    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29789      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29790    else
29791      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29792    fi
29793  else
29794    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29795  fi
29796  if test "x$OPENJDK_TARGET_OS" = xlinux; then
29797    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29798  fi
29799  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29800    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29801  fi
29802  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29803    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29804  fi
29805  if test "x$OPENJDK_TARGET_OS" = xaix; then
29806    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29807  fi
29808  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29809    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29810    # Setting these parameters makes it an error to link to macosx APIs that are
29811    # newer than the given OS version and makes the linked binaries compatible even
29812    # if built on a newer version of the OS.
29813    # The expected format is X.Y.Z
29814    MACOSX_VERSION_MIN=10.7.0
29815
29816    # The macro takes the version with no dots, ex: 1070
29817    # Let the flags variables get resolved in make for easier override on make
29818    # command line.
29819    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29820    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29821  fi
29822  if test "x$OPENJDK_TARGET_OS" = xbsd; then
29823    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29824  fi
29825  if test "x$DEBUG_LEVEL" = xrelease; then
29826    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29827  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29828    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29829  fi
29830  else
29831    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29832  fi
29833
29834  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29835  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29836
29837  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29838      -I${JDK_OUTPUTDIR}/include \
29839      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29840      -I${JDK_TOPDIR}/src/share/javavm/export \
29841      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29842      -I${JDK_TOPDIR}/src/share/native/common \
29843      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29844
29845  # The shared libraries are compiled using the picflag.
29846  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29847  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29848
29849  # Executable flags
29850  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29851  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29852
29853  # Now this is odd. The JDK native libraries have to link against libjvm.so
29854  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29855  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29856  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29857  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29858  # libraries will link to whatever is in memory. Yuck.
29859  #
29860  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29861  if test "x$COMPILER_NAME" = xcl; then
29862    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29863    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29864      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29865    fi
29866    # TODO: make -debug optional "--disable-full-debug-symbols"
29867    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29868    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29869    LDFLAGS_JDKLIB_SUFFIX=""
29870    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29871      LDFLAGS_STACK_SIZE=1048576
29872    else
29873      LDFLAGS_STACK_SIZE=327680
29874    fi
29875    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29876  else
29877    if test "x$COMPILER_NAME" = xgcc; then
29878      # If this is a --hash-style=gnu system, use --hash-style=both, why?
29879      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29880      if test -n "$HAS_GNU_HASH"; then
29881        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29882      fi
29883      if test "x$OPENJDK_TARGET_OS" = xlinux; then
29884        # And since we now know that the linker is gnu, then add -z defs, to forbid
29885        # undefined symbols in object files.
29886        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29887        if test "x$DEBUG_LEVEL" = "xrelease"; then
29888          # When building release libraries, tell the linker optimize them.
29889          # Should this be supplied to the OSS linker as well?
29890          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29891        fi
29892      fi
29893    fi
29894    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29895        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29896
29897    # On some platforms (mac) the linker warns about non existing -L dirs.
29898    # Add server first if available. Linking aginst client does not always produce the same results.
29899    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29900    # Default to server for other variants.
29901    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29902      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29903    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29904      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29905    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29906      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29907    else
29908      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29909    fi
29910
29911    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29912    if test "x$COMPILER_NAME" = xossc; then
29913      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29914    fi
29915
29916    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29917    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29918      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29919    fi
29920  fi
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936  # Some Zero and Shark settings.
29937  # ZERO_ARCHFLAG tells the compiler which mode to build for
29938  case "${OPENJDK_TARGET_CPU}" in
29939    s390)
29940      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29941      ;;
29942    *)
29943      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29944  esac
29945
29946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29947$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29948  supports=yes
29949
29950  saved_cflags="$CFLAGS"
29951  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29952  ac_ext=c
29953ac_cpp='$CPP $CPPFLAGS'
29954ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29955ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29956ac_compiler_gnu=$ac_cv_c_compiler_gnu
29957
29958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29959/* end confdefs.h.  */
29960int i;
29961_ACEOF
29962if ac_fn_c_try_compile "$LINENO"; then :
29963
29964else
29965  supports=no
29966fi
29967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29968  ac_ext=cpp
29969ac_cpp='$CXXCPP $CPPFLAGS'
29970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29973
29974  CFLAGS="$saved_cflags"
29975
29976  saved_cxxflags="$CXXFLAGS"
29977  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29978  ac_ext=cpp
29979ac_cpp='$CXXCPP $CPPFLAGS'
29980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29983
29984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29985/* end confdefs.h.  */
29986int i;
29987_ACEOF
29988if ac_fn_cxx_try_compile "$LINENO"; then :
29989
29990else
29991  supports=no
29992fi
29993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29994  ac_ext=cpp
29995ac_cpp='$CXXCPP $CPPFLAGS'
29996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29999
30000  CXXFLAGS="$saved_cxxflags"
30001
30002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30003$as_echo "$supports" >&6; }
30004  if test "x$supports" = "xyes" ; then
30005    :
30006  else
30007    ZERO_ARCHFLAG=""
30008  fi
30009
30010
30011
30012  # Check that the compiler supports -mX (or -qX on AIX) flags
30013  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30014
30015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30016$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30017  supports=yes
30018
30019  saved_cflags="$CFLAGS"
30020  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30021  ac_ext=c
30022ac_cpp='$CPP $CPPFLAGS'
30023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30025ac_compiler_gnu=$ac_cv_c_compiler_gnu
30026
30027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30028/* end confdefs.h.  */
30029int i;
30030_ACEOF
30031if ac_fn_c_try_compile "$LINENO"; then :
30032
30033else
30034  supports=no
30035fi
30036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30037  ac_ext=cpp
30038ac_cpp='$CXXCPP $CPPFLAGS'
30039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30042
30043  CFLAGS="$saved_cflags"
30044
30045  saved_cxxflags="$CXXFLAGS"
30046  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30047  ac_ext=cpp
30048ac_cpp='$CXXCPP $CPPFLAGS'
30049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30052
30053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30054/* end confdefs.h.  */
30055int i;
30056_ACEOF
30057if ac_fn_cxx_try_compile "$LINENO"; then :
30058
30059else
30060  supports=no
30061fi
30062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30063  ac_ext=cpp
30064ac_cpp='$CXXCPP $CPPFLAGS'
30065ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30066ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30067ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30068
30069  CXXFLAGS="$saved_cxxflags"
30070
30071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30072$as_echo "$supports" >&6; }
30073  if test "x$supports" = "xyes" ; then
30074    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30075  else
30076    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30077  fi
30078
30079
30080
30081
30082  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30083  USING_BROKEN_SUSE_LD=no
30084  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30086$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30087    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30088    echo "int main() { }" > main.c
30089    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30091$as_echo "no" >&6; }
30092      USING_BROKEN_SUSE_LD=no
30093    else
30094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30095$as_echo "yes" >&6; }
30096      USING_BROKEN_SUSE_LD=yes
30097    fi
30098    rm -rf version-script.map main.c
30099  fi
30100
30101
30102
30103# Setup debug symbols (need objcopy from the toolchain for that)
30104
30105  #
30106  # ENABLE_DEBUG_SYMBOLS
30107  # This must be done after the toolchain is setup, since we're looking at objcopy.
30108  #
30109  # Check whether --enable-debug-symbols was given.
30110if test "${enable_debug_symbols+set}" = set; then :
30111  enableval=$enable_debug_symbols;
30112fi
30113
30114
30115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30116$as_echo_n "checking if we should generate debug symbols... " >&6; }
30117
30118  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30119    # explicit enabling of enable-debug-symbols and can't find objcopy
30120    #   this is an error
30121    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30122  fi
30123
30124  if test "x$enable_debug_symbols" = "xyes"; then
30125    ENABLE_DEBUG_SYMBOLS=true
30126  elif test "x$enable_debug_symbols" = "xno"; then
30127    ENABLE_DEBUG_SYMBOLS=false
30128  else
30129    # Default is on if objcopy is found
30130    if test "x$OBJCOPY" != x; then
30131      ENABLE_DEBUG_SYMBOLS=true
30132    # MacOS X and Windows don't use objcopy but default is on for those OSes
30133    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30134      ENABLE_DEBUG_SYMBOLS=true
30135    else
30136      ENABLE_DEBUG_SYMBOLS=false
30137    fi
30138  fi
30139
30140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30141$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30142
30143  #
30144  # ZIP_DEBUGINFO_FILES
30145  #
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30147$as_echo_n "checking if we should zip debug-info files... " >&6; }
30148  # Check whether --enable-zip-debug-info was given.
30149if test "${enable_zip_debug_info+set}" = set; then :
30150  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30151else
30152  enable_zip_debug_info="yes"
30153fi
30154
30155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30156$as_echo "${enable_zip_debug_info}" >&6; }
30157
30158  if test "x${enable_zip_debug_info}" = "xno"; then
30159    ZIP_DEBUGINFO_FILES=false
30160  else
30161    ZIP_DEBUGINFO_FILES=true
30162  fi
30163
30164
30165
30166
30167
30168
30169
30170###############################################################################
30171#
30172# Check dependencies for external and internal libraries.
30173#
30174###############################################################################
30175
30176# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30177
30178  # When using cygwin or msys, we need a wrapper binary that renames
30179  # /cygdrive/c/ arguments into c:/ arguments and peeks into
30180  # @files and rewrites these too! This wrapper binary is
30181  # called fixpath.
30182  FIXPATH=
30183  if test "x$OPENJDK_BUILD_OS" = xwindows; then
30184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30185$as_echo_n "checking if fixpath can be created... " >&6; }
30186    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30187    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30188    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30189      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30190      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30191      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30192      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30193    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30194      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30195      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30196
30197      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30198      # @ was chosen as separator to minimize risk of other tools messing around with it
30199      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30200      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30201
30202      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30203    fi
30204    rm -f $OUTPUT_ROOT/fixpath*
30205    cd $OUTPUT_ROOT
30206    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30207    cd $CURDIR
30208
30209    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30211$as_echo "no" >&6; }
30212      cat $OUTPUT_ROOT/fixpath1.log
30213      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30214    fi
30215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30216$as_echo "yes" >&6; }
30217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30218$as_echo_n "checking if fixpath.exe works... " >&6; }
30219    cd $OUTPUT_ROOT
30220    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30221    cd $CURDIR
30222    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30224$as_echo "no" >&6; }
30225      cat $OUTPUT_ROOT/fixpath2.log
30226      as_fn_error $? "fixpath did not work!" "$LINENO" 5
30227    fi
30228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30229$as_echo "yes" >&6; }
30230    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30231  fi
30232
30233
30234
30235
30236
30237
30238  ###############################################################################
30239  #
30240  # OS specific settings that we never will need to probe.
30241  #
30242  if test "x$OPENJDK_TARGET_OS" = xlinux; then
30243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30244$as_echo_n "checking what is not needed on Linux?... " >&6; }
30245    PULSE_NOT_NEEDED=yes
30246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30247$as_echo "pulse" >&6; }
30248  fi
30249
30250  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30252$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30253    ALSA_NOT_NEEDED=yes
30254    PULSE_NOT_NEEDED=yes
30255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30256$as_echo "alsa pulse" >&6; }
30257  fi
30258
30259  if test "x$OPENJDK_TARGET_OS" = xaix; then
30260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30261$as_echo_n "checking what is not needed on AIX?... " >&6; }
30262    ALSA_NOT_NEEDED=yes
30263    PULSE_NOT_NEEDED=yes
30264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30265$as_echo "alsa pulse" >&6; }
30266  fi
30267
30268
30269  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30271$as_echo_n "checking what is not needed on Windows?... " >&6; }
30272    CUPS_NOT_NEEDED=yes
30273    ALSA_NOT_NEEDED=yes
30274    PULSE_NOT_NEEDED=yes
30275    X11_NOT_NEEDED=yes
30276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30277$as_echo "alsa cups pulse x11" >&6; }
30278  fi
30279
30280  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30282$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30283    ALSA_NOT_NEEDED=yes
30284    PULSE_NOT_NEEDED=yes
30285    X11_NOT_NEEDED=yes
30286    # If the java runtime framework is disabled, then we need X11.
30287    # This will be adjusted below.
30288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30289$as_echo "alsa pulse x11" >&6; }
30290  fi
30291
30292  if test "x$OPENJDK_TARGET_OS" = xbsd; then
30293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30294$as_echo_n "checking what is not needed on bsd?... " >&6; }
30295    ALSA_NOT_NEEDED=yes
30296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30297$as_echo "alsa" >&6; }
30298  fi
30299
30300  if test "x$OPENJDK" = "xfalse"; then
30301    FREETYPE_NOT_NEEDED=yes
30302  fi
30303
30304  if test "x$SUPPORT_HEADFUL" = xno; then
30305    X11_NOT_NEEDED=yes
30306  fi
30307
30308  ###############################################################################
30309  #
30310  # Check for MacOSX support for OpenJDK.
30311  #
30312
30313
30314  # Check whether --enable-macosx-runtime-support was given.
30315if test "${enable_macosx_runtime_support+set}" = set; then :
30316  enableval=$enable_macosx_runtime_support;
30317fi
30318
30319  if test "x$enable_macosx_runtime_support" != x; then
30320    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30321$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30322  fi
30323
30324
30325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30326$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30327  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30329$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30330  else
30331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30332$as_echo "no" >&6; }
30333  fi
30334
30335
30336
30337  ###############################################################################
30338  #
30339  # Check for X Windows
30340  #
30341
30342  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30343  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30344  # --x-libraries for the sysroot, if that seems to be correct.
30345  if test "x$SYS_ROOT" != "x/"; then
30346    if test "x$x_includes" = xNONE; then
30347      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30348        x_includes="$SYS_ROOT/usr/X11R6/include"
30349      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30350        x_includes="$SYS_ROOT/usr/include"
30351      fi
30352    fi
30353    if test "x$x_libraries" = xNONE; then
30354      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30355        x_libraries="$SYS_ROOT/usr/X11R6/lib"
30356      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30357        x_libraries="$SYS_ROOT/usr/lib64"
30358      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30359        x_libraries="$SYS_ROOT/usr/lib"
30360      fi
30361    fi
30362  fi
30363
30364  # Now let autoconf do it's magic
30365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30366$as_echo_n "checking for X... " >&6; }
30367
30368
30369# Check whether --with-x was given.
30370if test "${with_x+set}" = set; then :
30371  withval=$with_x;
30372fi
30373
30374# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30375if test "x$with_x" = xno; then
30376  # The user explicitly disabled X.
30377  have_x=disabled
30378else
30379  case $x_includes,$x_libraries in #(
30380    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30381    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30382  $as_echo_n "(cached) " >&6
30383else
30384  # One or both of the vars are not set, and there is no cached value.
30385ac_x_includes=no ac_x_libraries=no
30386rm -f -r conftest.dir
30387if mkdir conftest.dir; then
30388  cd conftest.dir
30389  cat >Imakefile <<'_ACEOF'
30390incroot:
30391	@echo incroot='${INCROOT}'
30392usrlibdir:
30393	@echo usrlibdir='${USRLIBDIR}'
30394libdir:
30395	@echo libdir='${LIBDIR}'
30396_ACEOF
30397  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30398    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30399    for ac_var in incroot usrlibdir libdir; do
30400      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30401    done
30402    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30403    for ac_extension in a so sl dylib la dll; do
30404      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30405	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30406	ac_im_usrlibdir=$ac_im_libdir; break
30407      fi
30408    done
30409    # Screen out bogus values from the imake configuration.  They are
30410    # bogus both because they are the default anyway, and because
30411    # using them would break gcc on systems where it needs fixed includes.
30412    case $ac_im_incroot in
30413	/usr/include) ac_x_includes= ;;
30414	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30415    esac
30416    case $ac_im_usrlibdir in
30417	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30418	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30419    esac
30420  fi
30421  cd ..
30422  rm -f -r conftest.dir
30423fi
30424
30425# Standard set of common directories for X headers.
30426# Check X11 before X11Rn because it is often a symlink to the current release.
30427ac_x_header_dirs='
30428/usr/X11/include
30429/usr/X11R7/include
30430/usr/X11R6/include
30431/usr/X11R5/include
30432/usr/X11R4/include
30433
30434/usr/include/X11
30435/usr/include/X11R7
30436/usr/include/X11R6
30437/usr/include/X11R5
30438/usr/include/X11R4
30439
30440/usr/local/X11/include
30441/usr/local/X11R7/include
30442/usr/local/X11R6/include
30443/usr/local/X11R5/include
30444/usr/local/X11R4/include
30445
30446/usr/local/include/X11
30447/usr/local/include/X11R7
30448/usr/local/include/X11R6
30449/usr/local/include/X11R5
30450/usr/local/include/X11R4
30451
30452/usr/X386/include
30453/usr/x386/include
30454/usr/XFree86/include/X11
30455
30456/usr/include
30457/usr/local/include
30458/usr/unsupported/include
30459/usr/athena/include
30460/usr/local/x11r5/include
30461/usr/lpp/Xamples/include
30462
30463/usr/openwin/include
30464/usr/openwin/share/include'
30465
30466if test "$ac_x_includes" = no; then
30467  # Guess where to find include files, by looking for Xlib.h.
30468  # First, try using that file with no special directory specified.
30469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30470/* end confdefs.h.  */
30471#include <X11/Xlib.h>
30472_ACEOF
30473if ac_fn_cxx_try_cpp "$LINENO"; then :
30474  # We can compile using X headers with no special include directory.
30475ac_x_includes=
30476else
30477  for ac_dir in $ac_x_header_dirs; do
30478  if test -r "$ac_dir/X11/Xlib.h"; then
30479    ac_x_includes=$ac_dir
30480    break
30481  fi
30482done
30483fi
30484rm -f conftest.err conftest.i conftest.$ac_ext
30485fi # $ac_x_includes = no
30486
30487if test "$ac_x_libraries" = no; then
30488  # Check for the libraries.
30489  # See if we find them without any special options.
30490  # Don't add to $LIBS permanently.
30491  ac_save_LIBS=$LIBS
30492  LIBS="-lX11 $LIBS"
30493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30494/* end confdefs.h.  */
30495#include <X11/Xlib.h>
30496int
30497main ()
30498{
30499XrmInitialize ()
30500  ;
30501  return 0;
30502}
30503_ACEOF
30504if ac_fn_cxx_try_link "$LINENO"; then :
30505  LIBS=$ac_save_LIBS
30506# We can link X programs with no special library path.
30507ac_x_libraries=
30508else
30509  LIBS=$ac_save_LIBS
30510for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30511do
30512  # Don't even attempt the hair of trying to link an X program!
30513  for ac_extension in a so sl dylib la dll; do
30514    if test -r "$ac_dir/libX11.$ac_extension"; then
30515      ac_x_libraries=$ac_dir
30516      break 2
30517    fi
30518  done
30519done
30520fi
30521rm -f core conftest.err conftest.$ac_objext \
30522    conftest$ac_exeext conftest.$ac_ext
30523fi # $ac_x_libraries = no
30524
30525case $ac_x_includes,$ac_x_libraries in #(
30526  no,* | *,no | *\'*)
30527    # Didn't find X, or a directory has "'" in its name.
30528    ac_cv_have_x="have_x=no";; #(
30529  *)
30530    # Record where we found X for the cache.
30531    ac_cv_have_x="have_x=yes\
30532	ac_x_includes='$ac_x_includes'\
30533	ac_x_libraries='$ac_x_libraries'"
30534esac
30535fi
30536;; #(
30537    *) have_x=yes;;
30538  esac
30539  eval "$ac_cv_have_x"
30540fi # $with_x != no
30541
30542if test "$have_x" != yes; then
30543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30544$as_echo "$have_x" >&6; }
30545  no_x=yes
30546else
30547  # If each of the values was on the command line, it overrides each guess.
30548  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30549  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30550  # Update the cache value to reflect the command line values.
30551  ac_cv_have_x="have_x=yes\
30552	ac_x_includes='$x_includes'\
30553	ac_x_libraries='$x_libraries'"
30554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30555$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30556fi
30557
30558  if test "$no_x" = yes; then
30559  # Not all programs may use this symbol, but it does not hurt to define it.
30560
30561$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30562
30563  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30564else
30565  if test -n "$x_includes"; then
30566    X_CFLAGS="$X_CFLAGS -I$x_includes"
30567  fi
30568
30569  # It would also be nice to do this for all -L options, not just this one.
30570  if test -n "$x_libraries"; then
30571    X_LIBS="$X_LIBS -L$x_libraries"
30572    # For Solaris; some versions of Sun CC require a space after -R and
30573    # others require no space.  Words are not sufficient . . . .
30574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30575$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30576    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30577    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30578    ac_cxx_werror_flag=yes
30579    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30580/* end confdefs.h.  */
30581
30582int
30583main ()
30584{
30585
30586  ;
30587  return 0;
30588}
30589_ACEOF
30590if ac_fn_cxx_try_link "$LINENO"; then :
30591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30592$as_echo "no" >&6; }
30593       X_LIBS="$X_LIBS -R$x_libraries"
30594else
30595  LIBS="$ac_xsave_LIBS -R $x_libraries"
30596       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30597/* end confdefs.h.  */
30598
30599int
30600main ()
30601{
30602
30603  ;
30604  return 0;
30605}
30606_ACEOF
30607if ac_fn_cxx_try_link "$LINENO"; then :
30608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30609$as_echo "yes" >&6; }
30610	  X_LIBS="$X_LIBS -R $x_libraries"
30611else
30612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30613$as_echo "neither works" >&6; }
30614fi
30615rm -f core conftest.err conftest.$ac_objext \
30616    conftest$ac_exeext conftest.$ac_ext
30617fi
30618rm -f core conftest.err conftest.$ac_objext \
30619    conftest$ac_exeext conftest.$ac_ext
30620    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30621    LIBS=$ac_xsave_LIBS
30622  fi
30623
30624  # Check for system-dependent libraries X programs must link with.
30625  # Do this before checking for the system-independent R6 libraries
30626  # (-lICE), since we may need -lsocket or whatever for X linking.
30627
30628  if test "$ISC" = yes; then
30629    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30630  else
30631    # Martyn Johnson says this is needed for Ultrix, if the X
30632    # libraries were built with DECnet support.  And Karl Berry says
30633    # the Alpha needs dnet_stub (dnet does not exist).
30634    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30636/* end confdefs.h.  */
30637
30638/* Override any GCC internal prototype to avoid an error.
30639   Use char because int might match the return type of a GCC
30640   builtin and then its argument prototype would still apply.  */
30641#ifdef __cplusplus
30642extern "C"
30643#endif
30644char XOpenDisplay ();
30645int
30646main ()
30647{
30648return XOpenDisplay ();
30649  ;
30650  return 0;
30651}
30652_ACEOF
30653if ac_fn_cxx_try_link "$LINENO"; then :
30654
30655else
30656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30657$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30658if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30659  $as_echo_n "(cached) " >&6
30660else
30661  ac_check_lib_save_LIBS=$LIBS
30662LIBS="-ldnet  $LIBS"
30663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30664/* end confdefs.h.  */
30665
30666/* Override any GCC internal prototype to avoid an error.
30667   Use char because int might match the return type of a GCC
30668   builtin and then its argument prototype would still apply.  */
30669#ifdef __cplusplus
30670extern "C"
30671#endif
30672char dnet_ntoa ();
30673int
30674main ()
30675{
30676return dnet_ntoa ();
30677  ;
30678  return 0;
30679}
30680_ACEOF
30681if ac_fn_cxx_try_link "$LINENO"; then :
30682  ac_cv_lib_dnet_dnet_ntoa=yes
30683else
30684  ac_cv_lib_dnet_dnet_ntoa=no
30685fi
30686rm -f core conftest.err conftest.$ac_objext \
30687    conftest$ac_exeext conftest.$ac_ext
30688LIBS=$ac_check_lib_save_LIBS
30689fi
30690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30691$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30692if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30693  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30694fi
30695
30696    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30698$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30699if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30700  $as_echo_n "(cached) " >&6
30701else
30702  ac_check_lib_save_LIBS=$LIBS
30703LIBS="-ldnet_stub  $LIBS"
30704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30705/* end confdefs.h.  */
30706
30707/* Override any GCC internal prototype to avoid an error.
30708   Use char because int might match the return type of a GCC
30709   builtin and then its argument prototype would still apply.  */
30710#ifdef __cplusplus
30711extern "C"
30712#endif
30713char dnet_ntoa ();
30714int
30715main ()
30716{
30717return dnet_ntoa ();
30718  ;
30719  return 0;
30720}
30721_ACEOF
30722if ac_fn_cxx_try_link "$LINENO"; then :
30723  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30724else
30725  ac_cv_lib_dnet_stub_dnet_ntoa=no
30726fi
30727rm -f core conftest.err conftest.$ac_objext \
30728    conftest$ac_exeext conftest.$ac_ext
30729LIBS=$ac_check_lib_save_LIBS
30730fi
30731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30732$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30733if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30734  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30735fi
30736
30737    fi
30738fi
30739rm -f core conftest.err conftest.$ac_objext \
30740    conftest$ac_exeext conftest.$ac_ext
30741    LIBS="$ac_xsave_LIBS"
30742
30743    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30744    # to get the SysV transport functions.
30745    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30746    # needs -lnsl.
30747    # The nsl library prevents programs from opening the X display
30748    # on Irix 5.2, according to T.E. Dickey.
30749    # The functions gethostbyname, getservbyname, and inet_addr are
30750    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30751    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30752if test "x$ac_cv_func_gethostbyname" = xyes; then :
30753
30754fi
30755
30756    if test $ac_cv_func_gethostbyname = no; then
30757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30758$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30759if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30760  $as_echo_n "(cached) " >&6
30761else
30762  ac_check_lib_save_LIBS=$LIBS
30763LIBS="-lnsl  $LIBS"
30764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30765/* end confdefs.h.  */
30766
30767/* Override any GCC internal prototype to avoid an error.
30768   Use char because int might match the return type of a GCC
30769   builtin and then its argument prototype would still apply.  */
30770#ifdef __cplusplus
30771extern "C"
30772#endif
30773char gethostbyname ();
30774int
30775main ()
30776{
30777return gethostbyname ();
30778  ;
30779  return 0;
30780}
30781_ACEOF
30782if ac_fn_cxx_try_link "$LINENO"; then :
30783  ac_cv_lib_nsl_gethostbyname=yes
30784else
30785  ac_cv_lib_nsl_gethostbyname=no
30786fi
30787rm -f core conftest.err conftest.$ac_objext \
30788    conftest$ac_exeext conftest.$ac_ext
30789LIBS=$ac_check_lib_save_LIBS
30790fi
30791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30792$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30793if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30794  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30795fi
30796
30797      if test $ac_cv_lib_nsl_gethostbyname = no; then
30798	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30799$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30800if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30801  $as_echo_n "(cached) " >&6
30802else
30803  ac_check_lib_save_LIBS=$LIBS
30804LIBS="-lbsd  $LIBS"
30805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30806/* end confdefs.h.  */
30807
30808/* Override any GCC internal prototype to avoid an error.
30809   Use char because int might match the return type of a GCC
30810   builtin and then its argument prototype would still apply.  */
30811#ifdef __cplusplus
30812extern "C"
30813#endif
30814char gethostbyname ();
30815int
30816main ()
30817{
30818return gethostbyname ();
30819  ;
30820  return 0;
30821}
30822_ACEOF
30823if ac_fn_cxx_try_link "$LINENO"; then :
30824  ac_cv_lib_bsd_gethostbyname=yes
30825else
30826  ac_cv_lib_bsd_gethostbyname=no
30827fi
30828rm -f core conftest.err conftest.$ac_objext \
30829    conftest$ac_exeext conftest.$ac_ext
30830LIBS=$ac_check_lib_save_LIBS
30831fi
30832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30833$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30834if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30835  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30836fi
30837
30838      fi
30839    fi
30840
30841    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30842    # socket/setsockopt and other routines are undefined under SCO ODT
30843    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30844    # on later versions), says Simon Leinen: it contains gethostby*
30845    # variants that don't use the name server (or something).  -lsocket
30846    # must be given before -lnsl if both are needed.  We assume that
30847    # if connect needs -lnsl, so does gethostbyname.
30848    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30849if test "x$ac_cv_func_connect" = xyes; then :
30850
30851fi
30852
30853    if test $ac_cv_func_connect = no; then
30854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30855$as_echo_n "checking for connect in -lsocket... " >&6; }
30856if ${ac_cv_lib_socket_connect+:} false; then :
30857  $as_echo_n "(cached) " >&6
30858else
30859  ac_check_lib_save_LIBS=$LIBS
30860LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30862/* end confdefs.h.  */
30863
30864/* Override any GCC internal prototype to avoid an error.
30865   Use char because int might match the return type of a GCC
30866   builtin and then its argument prototype would still apply.  */
30867#ifdef __cplusplus
30868extern "C"
30869#endif
30870char connect ();
30871int
30872main ()
30873{
30874return connect ();
30875  ;
30876  return 0;
30877}
30878_ACEOF
30879if ac_fn_cxx_try_link "$LINENO"; then :
30880  ac_cv_lib_socket_connect=yes
30881else
30882  ac_cv_lib_socket_connect=no
30883fi
30884rm -f core conftest.err conftest.$ac_objext \
30885    conftest$ac_exeext conftest.$ac_ext
30886LIBS=$ac_check_lib_save_LIBS
30887fi
30888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30889$as_echo "$ac_cv_lib_socket_connect" >&6; }
30890if test "x$ac_cv_lib_socket_connect" = xyes; then :
30891  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30892fi
30893
30894    fi
30895
30896    # Guillermo Gomez says -lposix is necessary on A/UX.
30897    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30898if test "x$ac_cv_func_remove" = xyes; then :
30899
30900fi
30901
30902    if test $ac_cv_func_remove = no; then
30903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30904$as_echo_n "checking for remove in -lposix... " >&6; }
30905if ${ac_cv_lib_posix_remove+:} false; then :
30906  $as_echo_n "(cached) " >&6
30907else
30908  ac_check_lib_save_LIBS=$LIBS
30909LIBS="-lposix  $LIBS"
30910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30911/* end confdefs.h.  */
30912
30913/* Override any GCC internal prototype to avoid an error.
30914   Use char because int might match the return type of a GCC
30915   builtin and then its argument prototype would still apply.  */
30916#ifdef __cplusplus
30917extern "C"
30918#endif
30919char remove ();
30920int
30921main ()
30922{
30923return remove ();
30924  ;
30925  return 0;
30926}
30927_ACEOF
30928if ac_fn_cxx_try_link "$LINENO"; then :
30929  ac_cv_lib_posix_remove=yes
30930else
30931  ac_cv_lib_posix_remove=no
30932fi
30933rm -f core conftest.err conftest.$ac_objext \
30934    conftest$ac_exeext conftest.$ac_ext
30935LIBS=$ac_check_lib_save_LIBS
30936fi
30937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30938$as_echo "$ac_cv_lib_posix_remove" >&6; }
30939if test "x$ac_cv_lib_posix_remove" = xyes; then :
30940  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30941fi
30942
30943    fi
30944
30945    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30946    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30947if test "x$ac_cv_func_shmat" = xyes; then :
30948
30949fi
30950
30951    if test $ac_cv_func_shmat = no; then
30952      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30953$as_echo_n "checking for shmat in -lipc... " >&6; }
30954if ${ac_cv_lib_ipc_shmat+:} false; then :
30955  $as_echo_n "(cached) " >&6
30956else
30957  ac_check_lib_save_LIBS=$LIBS
30958LIBS="-lipc  $LIBS"
30959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30960/* end confdefs.h.  */
30961
30962/* Override any GCC internal prototype to avoid an error.
30963   Use char because int might match the return type of a GCC
30964   builtin and then its argument prototype would still apply.  */
30965#ifdef __cplusplus
30966extern "C"
30967#endif
30968char shmat ();
30969int
30970main ()
30971{
30972return shmat ();
30973  ;
30974  return 0;
30975}
30976_ACEOF
30977if ac_fn_cxx_try_link "$LINENO"; then :
30978  ac_cv_lib_ipc_shmat=yes
30979else
30980  ac_cv_lib_ipc_shmat=no
30981fi
30982rm -f core conftest.err conftest.$ac_objext \
30983    conftest$ac_exeext conftest.$ac_ext
30984LIBS=$ac_check_lib_save_LIBS
30985fi
30986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30987$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30988if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30989  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30990fi
30991
30992    fi
30993  fi
30994
30995  # Check for libraries that X11R6 Xt/Xaw programs need.
30996  ac_save_LDFLAGS=$LDFLAGS
30997  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30998  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30999  # check for ICE first), but we must link in the order -lSM -lICE or
31000  # we get undefined symbols.  So assume we have SM if we have ICE.
31001  # These have to be linked with before -lX11, unlike the other
31002  # libraries we check for below, so use a different variable.
31003  # John Interrante, Karl Berry
31004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31005$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31006if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31007  $as_echo_n "(cached) " >&6
31008else
31009  ac_check_lib_save_LIBS=$LIBS
31010LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31012/* end confdefs.h.  */
31013
31014/* Override any GCC internal prototype to avoid an error.
31015   Use char because int might match the return type of a GCC
31016   builtin and then its argument prototype would still apply.  */
31017#ifdef __cplusplus
31018extern "C"
31019#endif
31020char IceConnectionNumber ();
31021int
31022main ()
31023{
31024return IceConnectionNumber ();
31025  ;
31026  return 0;
31027}
31028_ACEOF
31029if ac_fn_cxx_try_link "$LINENO"; then :
31030  ac_cv_lib_ICE_IceConnectionNumber=yes
31031else
31032  ac_cv_lib_ICE_IceConnectionNumber=no
31033fi
31034rm -f core conftest.err conftest.$ac_objext \
31035    conftest$ac_exeext conftest.$ac_ext
31036LIBS=$ac_check_lib_save_LIBS
31037fi
31038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31039$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31040if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31041  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31042fi
31043
31044  LDFLAGS=$ac_save_LDFLAGS
31045
31046fi
31047
31048
31049  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31050  # this doesn't make sense so we remove it.
31051  if test "x$COMPILE_TYPE" = xcross; then
31052    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31053  fi
31054
31055  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31056
31057  # Print a helpful message on how to acquire the necessary build dependency.
31058  # x11 is the help tag: freetype, cups, pulse, alsa etc
31059  MISSING_DEPENDENCY=x11
31060
31061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31062    cygwin_help $MISSING_DEPENDENCY
31063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31064    msys_help $MISSING_DEPENDENCY
31065  else
31066    PKGHANDLER_COMMAND=
31067
31068    case $PKGHANDLER in
31069      apt-get)
31070        apt_help     $MISSING_DEPENDENCY ;;
31071      yum)
31072        yum_help     $MISSING_DEPENDENCY ;;
31073      port)
31074        port_help    $MISSING_DEPENDENCY ;;
31075      pkgutil)
31076        pkgutil_help $MISSING_DEPENDENCY ;;
31077      pkgadd)
31078        pkgadd_help  $MISSING_DEPENDENCY ;;
31079    esac
31080
31081    if test "x$PKGHANDLER_COMMAND" != x; then
31082      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31083    fi
31084  fi
31085
31086    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31087  fi
31088
31089  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31090    OPENWIN_HOME="/usr/openwin"
31091  fi
31092
31093
31094
31095  #
31096  # Weird Sol10 something check...TODO change to try compile
31097  #
31098  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31099    if test "`uname -r`" = "5.10"; then
31100      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31101        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31102      fi
31103    fi
31104  fi
31105
31106  ac_ext=c
31107ac_cpp='$CPP $CPPFLAGS'
31108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31110ac_compiler_gnu=$ac_cv_c_compiler_gnu
31111
31112  OLD_CFLAGS="$CFLAGS"
31113  CFLAGS="$CFLAGS $X_CFLAGS"
31114
31115  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31116  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31117do :
31118  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31119ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31120        # include <X11/Xlib.h>
31121        # include <X11/Xutil.h>
31122
31123
31124"
31125if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31126  cat >>confdefs.h <<_ACEOF
31127#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31128_ACEOF
31129 X11_A_OK=yes
31130else
31131  X11_A_OK=no; break
31132fi
31133
31134done
31135
31136
31137  CFLAGS="$OLD_CFLAGS"
31138  ac_ext=cpp
31139ac_cpp='$CXXCPP $CPPFLAGS'
31140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31143
31144
31145  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31146
31147  # Print a helpful message on how to acquire the necessary build dependency.
31148  # x11 is the help tag: freetype, cups, pulse, alsa etc
31149  MISSING_DEPENDENCY=x11
31150
31151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31152    cygwin_help $MISSING_DEPENDENCY
31153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31154    msys_help $MISSING_DEPENDENCY
31155  else
31156    PKGHANDLER_COMMAND=
31157
31158    case $PKGHANDLER in
31159      apt-get)
31160        apt_help     $MISSING_DEPENDENCY ;;
31161      yum)
31162        yum_help     $MISSING_DEPENDENCY ;;
31163      port)
31164        port_help    $MISSING_DEPENDENCY ;;
31165      pkgutil)
31166        pkgutil_help $MISSING_DEPENDENCY ;;
31167      pkgadd)
31168        pkgadd_help  $MISSING_DEPENDENCY ;;
31169    esac
31170
31171    if test "x$PKGHANDLER_COMMAND" != x; then
31172      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31173    fi
31174  fi
31175
31176    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31177  fi
31178
31179
31180
31181
31182
31183
31184  ###############################################################################
31185  #
31186  # The common unix printing system cups is used to print from java.
31187  #
31188
31189# Check whether --with-cups was given.
31190if test "${with_cups+set}" = set; then :
31191  withval=$with_cups;
31192fi
31193
31194
31195# Check whether --with-cups-include was given.
31196if test "${with_cups_include+set}" = set; then :
31197  withval=$with_cups_include;
31198fi
31199
31200
31201  if test "x$CUPS_NOT_NEEDED" = xyes; then
31202    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31203      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31204$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31205    fi
31206    CUPS_CFLAGS=
31207  else
31208    CUPS_FOUND=no
31209
31210    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31211      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31212    fi
31213
31214    if test "x${with_cups}" != x; then
31215      CUPS_CFLAGS="-I${with_cups}/include"
31216      CUPS_FOUND=yes
31217    fi
31218    if test "x${with_cups_include}" != x; then
31219      CUPS_CFLAGS="-I${with_cups_include}"
31220      CUPS_FOUND=yes
31221    fi
31222    if test "x$CUPS_FOUND" = xno; then
31223
31224
31225  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31226    # Source the builddeps file again, to make sure it uses the latest variables!
31227    . $builddepsfile
31228    # Look for a target and build machine specific resource!
31229    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31230    if test "x$resource" = x; then
31231      # Ok, lets instead look for a target specific resource
31232      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31233    fi
31234    if test "x$resource" = x; then
31235      # Ok, lets instead look for a build specific resource
31236      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31237    fi
31238    if test "x$resource" = x; then
31239      # Ok, lets instead look for a generic resource
31240      # (The cups comes from M4 and not the shell, thus no need for eval here.)
31241      resource=${builddep_cups}
31242    fi
31243    if test "x$resource" != x; then
31244      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31245$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31246      # If the resource in the builddeps.conf file is an existing directory,
31247      # for example /java/linux/cups
31248      if test -d ${resource}; then
31249        depdir=${resource}
31250      else
31251
31252  # cups is for example mymodule
31253  # $resource is for example libs/general/libmymod_1_2_3.zip
31254  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31255  # $with_builddeps_dir is for example /localhome/builddeps
31256  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31257  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31258  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31259  filename=`basename $resource`
31260  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31261  filebase=${filename%%.*}
31262  extension=${filename#*.}
31263  installdir=$with_builddeps_dir/$filebase
31264  if test ! -f $installdir/$filename.unpacked; then
31265    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31266$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31267    if test ! -d $installdir; then
31268      mkdir -p $installdir
31269    fi
31270    if test ! -d $installdir; then
31271      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31272    fi
31273    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31274    touch $tmpfile
31275    if test ! -f $tmpfile; then
31276      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31277    fi
31278
31279  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31280  # $tmpfile is the local file name for the downloaded file.
31281  VALID_TOOL=no
31282  if test "x$BDEPS_FTP" = xwget; then
31283    VALID_TOOL=yes
31284    wget -O $tmpfile $with_builddeps_server/$resource
31285  fi
31286  if test "x$BDEPS_FTP" = xlftp; then
31287    VALID_TOOL=yes
31288    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31289  fi
31290  if test "x$BDEPS_FTP" = xftp; then
31291    VALID_TOOL=yes
31292    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31293    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31294    FTPUSERPWD=${FTPSERVER%%@*}
31295    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31296      FTPUSER=${userpwd%%:*}
31297      FTPPWD=${userpwd#*@}
31298      FTPSERVER=${FTPSERVER#*@}
31299    else
31300      FTPUSER=ftp
31301      FTPPWD=ftp
31302    fi
31303    # the "pass" command does not work on some
31304    # ftp clients (read ftp.exe) but if it works,
31305    # passive mode is better!
31306    ( \
31307        echo "user $FTPUSER $FTPPWD"        ; \
31308        echo "pass"                         ; \
31309        echo "bin"                          ; \
31310        echo "get $FTPPATH $tmpfile"              ; \
31311    ) | ftp -in $FTPSERVER
31312  fi
31313  if test "x$VALID_TOOL" != xyes; then
31314    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31315  fi
31316
31317    mv $tmpfile $installdir/$filename
31318    if test ! -s $installdir/$filename; then
31319      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31320    fi
31321    case "$extension" in
31322      zip)  echo "Unzipping $installdir/$filename..."
31323        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31324        ;;
31325      tar.gz) echo "Untaring $installdir/$filename..."
31326        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31327        ;;
31328      tgz) echo "Untaring $installdir/$filename..."
31329        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31330        ;;
31331      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31332        ;;
31333    esac
31334  fi
31335  if test -f $installdir/$filename.unpacked; then
31336    depdir=$installdir
31337  fi
31338
31339      fi
31340      # Source the builddeps file again, because in the previous command, the depdir
31341      # was updated to point at the current build dependency install directory.
31342      . $builddepsfile
31343      # Now extract variables from the builddeps.conf files.
31344      theroot=${builddep_cups_ROOT}
31345      thecflags=${builddep_cups_CFLAGS}
31346      thelibs=${builddep_cups_LIBS}
31347      if test "x$depdir" = x; then
31348        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31349      fi
31350      CUPS=$depdir
31351      if test "x$theroot" != x; then
31352        CUPS="$theroot"
31353      fi
31354      if test "x$thecflags" != x; then
31355        CUPS_CFLAGS="$thecflags"
31356      fi
31357      if test "x$thelibs" != x; then
31358        CUPS_LIBS="$thelibs"
31359      fi
31360      CUPS_FOUND=yes
31361
31362    fi
31363
31364  fi
31365
31366    fi
31367    if test "x$CUPS_FOUND" = xno; then
31368      # Are the cups headers installed in the default /usr/include location?
31369      for ac_header in cups/cups.h cups/ppd.h
31370do :
31371  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31372ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31373if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31374  cat >>confdefs.h <<_ACEOF
31375#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31376_ACEOF
31377
31378            CUPS_FOUND=yes
31379            CUPS_CFLAGS=
31380            DEFAULT_CUPS=yes
31381
31382
31383fi
31384
31385done
31386
31387    fi
31388    if test "x$CUPS_FOUND" = xno; then
31389      # Getting nervous now? Lets poke around for standard Solaris third-party
31390      # package installation locations.
31391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31392$as_echo_n "checking for cups headers... " >&6; }
31393      if test -s /opt/sfw/cups/include/cups/cups.h; then
31394        # An SFW package seems to be installed!
31395        CUPS_FOUND=yes
31396        CUPS_CFLAGS="-I/opt/sfw/cups/include"
31397      elif test -s /opt/csw/include/cups/cups.h; then
31398        # A CSW package seems to be installed!
31399        CUPS_FOUND=yes
31400        CUPS_CFLAGS="-I/opt/csw/include"
31401      fi
31402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31403$as_echo "$CUPS_FOUND" >&6; }
31404    fi
31405    if test "x$CUPS_FOUND" = xno; then
31406
31407  # Print a helpful message on how to acquire the necessary build dependency.
31408  # cups is the help tag: freetype, cups, pulse, alsa etc
31409  MISSING_DEPENDENCY=cups
31410
31411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31412    cygwin_help $MISSING_DEPENDENCY
31413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31414    msys_help $MISSING_DEPENDENCY
31415  else
31416    PKGHANDLER_COMMAND=
31417
31418    case $PKGHANDLER in
31419      apt-get)
31420        apt_help     $MISSING_DEPENDENCY ;;
31421      yum)
31422        yum_help     $MISSING_DEPENDENCY ;;
31423      port)
31424        port_help    $MISSING_DEPENDENCY ;;
31425      pkgutil)
31426        pkgutil_help $MISSING_DEPENDENCY ;;
31427      pkgadd)
31428        pkgadd_help  $MISSING_DEPENDENCY ;;
31429    esac
31430
31431    if test "x$PKGHANDLER_COMMAND" != x; then
31432      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31433    fi
31434  fi
31435
31436      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31437    fi
31438  fi
31439
31440
31441
31442
31443
31444
31445  ###############################################################################
31446  #
31447  # The ubiquitous freetype library is used to render fonts.
31448  #
31449
31450# Check whether --with-freetype was given.
31451if test "${with_freetype+set}" = set; then :
31452  withval=$with_freetype;
31453fi
31454
31455
31456# Check whether --with-freetype-include was given.
31457if test "${with_freetype_include+set}" = set; then :
31458  withval=$with_freetype_include;
31459fi
31460
31461
31462# Check whether --with-freetype-lib was given.
31463if test "${with_freetype_lib+set}" = set; then :
31464  withval=$with_freetype_lib;
31465fi
31466
31467  # Check whether --enable-freetype-bundling was given.
31468if test "${enable_freetype_bundling+set}" = set; then :
31469  enableval=$enable_freetype_bundling;
31470fi
31471
31472
31473  FREETYPE_CFLAGS=
31474  FREETYPE_LIBS=
31475  FREETYPE_BUNDLE_LIB_PATH=
31476
31477  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31478    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31479      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31480$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31481    fi
31482    if test "x$enable_freetype_bundling" != x; then
31483      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31484$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31485    fi
31486  else
31487    # freetype is needed to build; go get it!
31488
31489    BUNDLE_FREETYPE="$enable_freetype_bundling"
31490
31491    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31492      # User has specified settings
31493
31494      if test "x$BUNDLE_FREETYPE" = x; then
31495        # If not specified, default is to bundle freetype
31496        BUNDLE_FREETYPE=yes
31497      fi
31498
31499      if test "x$with_freetype" != x; then
31500        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31501        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31502      fi
31503
31504      # Allow --with-freetype-lib and --with-freetype-include to override
31505      if test "x$with_freetype_include" != x; then
31506        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31507      fi
31508      if test "x$with_freetype_lib" != x; then
31509        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31510      fi
31511
31512      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31513        # Okay, we got it. Check that it works.
31514
31515  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31516  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31517  METHOD="--with-freetype"
31518
31519  # First check if the files exists.
31520  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31521    # We found an arbitrary include file. That's a good sign.
31522    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31523$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31524    FOUND_FREETYPE=yes
31525
31526    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31527    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31528      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31529$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31530      FOUND_FREETYPE=no
31531    else
31532      if test "x$OPENJDK_TARGET_OS" = xwindows; then
31533        # On Windows, we will need both .lib and .dll file.
31534        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31535          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31536$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31537          FOUND_FREETYPE=no
31538        fi
31539      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
31540        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31541        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31542      fi
31543    fi
31544  fi
31545
31546  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
31605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31607  fi
31608
31609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31610
31611  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
31643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31664    fi
31665
31666    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31667  fi
31668
31669
31670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31671
31672  # Input might be given as Windows format, start by converting to
31673  # unix format.
31674  path="$POTENTIAL_FREETYPE_LIB_PATH"
31675  new_path=`$CYGPATH -u "$path"`
31676
31677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31680  # "foo.exe" is OK but "foo" is an error.
31681  #
31682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31683  # It is also a way to make sure we got the proper file name for the real test later on.
31684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31685  if test "x$test_shortpath" = x; then
31686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31688    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31689  fi
31690
31691  # Call helper function which possibly converts this using DOS-style short mode.
31692  # If so, the updated path is stored in $new_path.
31693
31694  input_path="$new_path"
31695  # Check if we need to convert this using DOS-style short mode. If the path
31696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31697  # take no chances and rewrite it.
31698  # Note: m4 eats our [], so we need to use [ and ] instead.
31699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31700  if test "x$has_forbidden_chars" != x; then
31701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31705      # Going to short mode and back again did indeed matter. Since short mode is
31706      # case insensitive, let's make it lowercase to improve readability.
31707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31708      # Now convert it back to Unix-stile (cygpath)
31709      input_path=`$CYGPATH -u "$shortmode_path"`
31710      new_path="$input_path"
31711    fi
31712  fi
31713
31714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31715  if test "x$test_cygdrive_prefix" = x; then
31716    # As a simple fix, exclude /usr/bin since it's not a real path.
31717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31719      # a path prefixed by /cygdrive for fixpath to work.
31720      new_path="$CYGWIN_ROOT_PATH$input_path"
31721    fi
31722  fi
31723
31724
31725  if test "x$path" != "x$new_path"; then
31726    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31728$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31729  fi
31730
31731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31732
31733  path="$POTENTIAL_FREETYPE_LIB_PATH"
31734  has_colon=`$ECHO $path | $GREP ^.:`
31735  new_path="$path"
31736  if test "x$has_colon" = x; then
31737    # Not in mixed or Windows style, start by that.
31738    new_path=`cmd //c echo $path`
31739  fi
31740
31741
31742  input_path="$new_path"
31743  # Check if we need to convert this using DOS-style short mode. If the path
31744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31745  # take no chances and rewrite it.
31746  # Note: m4 eats our [], so we need to use [ and ] instead.
31747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31748  if test "x$has_forbidden_chars" != x; then
31749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31751  fi
31752
31753
31754  windows_path="$new_path"
31755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31756    unix_path=`$CYGPATH -u "$windows_path"`
31757    new_path="$unix_path"
31758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31760    new_path="$unix_path"
31761  fi
31762
31763  if test "x$path" != "x$new_path"; then
31764    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31767  fi
31768
31769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31771
31772  else
31773    # We're on a posix platform. Hooray! :)
31774    path="$POTENTIAL_FREETYPE_LIB_PATH"
31775    has_space=`$ECHO "$path" | $GREP " "`
31776    if test "x$has_space" != x; then
31777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31779      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31780    fi
31781
31782    # Use eval to expand a potential ~
31783    eval path="$path"
31784    if test ! -f "$path" && test ! -d "$path"; then
31785      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31786    fi
31787
31788    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31789  fi
31790
31791
31792    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31794$as_echo_n "checking for freetype includes... " >&6; }
31795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31796$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31797    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31799$as_echo_n "checking for freetype libraries... " >&6; }
31800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31801$as_echo "$FREETYPE_LIB_PATH" >&6; }
31802  fi
31803
31804        if test "x$FOUND_FREETYPE" != xyes; then
31805          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31806        fi
31807      else
31808        # User specified only one of lib or include. This is an error.
31809        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31810          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31811$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31812          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31813        else
31814          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31815$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31816          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31817        fi
31818      fi
31819    else
31820      # User did not specify settings, but we need freetype. Try to locate it.
31821
31822      if test "x$BUNDLE_FREETYPE" = x; then
31823        # If not specified, default is to bundle freetype only on windows
31824        if test "x$OPENJDK_TARGET_OS" = xwindows; then
31825          BUNDLE_FREETYPE=yes
31826        else
31827          BUNDLE_FREETYPE=no
31828        fi
31829      fi
31830
31831      if test "x$FOUND_FREETYPE" != xyes; then
31832        # Check builddeps
31833
31834
31835  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31836    # Source the builddeps file again, to make sure it uses the latest variables!
31837    . $builddepsfile
31838    # Look for a target and build machine specific resource!
31839    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31840    if test "x$resource" = x; then
31841      # Ok, lets instead look for a target specific resource
31842      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31843    fi
31844    if test "x$resource" = x; then
31845      # Ok, lets instead look for a build specific resource
31846      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31847    fi
31848    if test "x$resource" = x; then
31849      # Ok, lets instead look for a generic resource
31850      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31851      resource=${builddep_freetype2}
31852    fi
31853    if test "x$resource" != x; then
31854      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31855$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31856      # If the resource in the builddeps.conf file is an existing directory,
31857      # for example /java/linux/cups
31858      if test -d ${resource}; then
31859        depdir=${resource}
31860      else
31861
31862  # freetype2 is for example mymodule
31863  # $resource is for example libs/general/libmymod_1_2_3.zip
31864  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31865  # $with_builddeps_dir is for example /localhome/builddeps
31866  # depdir is the name of the variable into which we store the depdir, eg MYMOD
31867  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31868  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31869  filename=`basename $resource`
31870  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31871  filebase=${filename%%.*}
31872  extension=${filename#*.}
31873  installdir=$with_builddeps_dir/$filebase
31874  if test ! -f $installdir/$filename.unpacked; then
31875    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31876$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31877    if test ! -d $installdir; then
31878      mkdir -p $installdir
31879    fi
31880    if test ! -d $installdir; then
31881      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31882    fi
31883    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31884    touch $tmpfile
31885    if test ! -f $tmpfile; then
31886      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31887    fi
31888
31889  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31890  # $tmpfile is the local file name for the downloaded file.
31891  VALID_TOOL=no
31892  if test "x$BDEPS_FTP" = xwget; then
31893    VALID_TOOL=yes
31894    wget -O $tmpfile $with_builddeps_server/$resource
31895  fi
31896  if test "x$BDEPS_FTP" = xlftp; then
31897    VALID_TOOL=yes
31898    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31899  fi
31900  if test "x$BDEPS_FTP" = xftp; then
31901    VALID_TOOL=yes
31902    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31903    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31904    FTPUSERPWD=${FTPSERVER%%@*}
31905    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31906      FTPUSER=${userpwd%%:*}
31907      FTPPWD=${userpwd#*@}
31908      FTPSERVER=${FTPSERVER#*@}
31909    else
31910      FTPUSER=ftp
31911      FTPPWD=ftp
31912    fi
31913    # the "pass" command does not work on some
31914    # ftp clients (read ftp.exe) but if it works,
31915    # passive mode is better!
31916    ( \
31917        echo "user $FTPUSER $FTPPWD"        ; \
31918        echo "pass"                         ; \
31919        echo "bin"                          ; \
31920        echo "get $FTPPATH $tmpfile"              ; \
31921    ) | ftp -in $FTPSERVER
31922  fi
31923  if test "x$VALID_TOOL" != xyes; then
31924    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31925  fi
31926
31927    mv $tmpfile $installdir/$filename
31928    if test ! -s $installdir/$filename; then
31929      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31930    fi
31931    case "$extension" in
31932      zip)  echo "Unzipping $installdir/$filename..."
31933        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31934        ;;
31935      tar.gz) echo "Untaring $installdir/$filename..."
31936        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31937        ;;
31938      tgz) echo "Untaring $installdir/$filename..."
31939        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31940        ;;
31941      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31942        ;;
31943    esac
31944  fi
31945  if test -f $installdir/$filename.unpacked; then
31946    depdir=$installdir
31947  fi
31948
31949      fi
31950      # Source the builddeps file again, because in the previous command, the depdir
31951      # was updated to point at the current build dependency install directory.
31952      . $builddepsfile
31953      # Now extract variables from the builddeps.conf files.
31954      theroot=${builddep_freetype2_ROOT}
31955      thecflags=${builddep_freetype2_CFLAGS}
31956      thelibs=${builddep_freetype2_LIBS}
31957      if test "x$depdir" = x; then
31958        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31959      fi
31960      FREETYPE=$depdir
31961      if test "x$theroot" != x; then
31962        FREETYPE="$theroot"
31963      fi
31964      if test "x$thecflags" != x; then
31965        FREETYPE_CFLAGS="$thecflags"
31966      fi
31967      if test "x$thelibs" != x; then
31968        FREETYPE_LIBS="$thelibs"
31969      fi
31970      FOUND_FREETYPE=yes
31971      else FOUND_FREETYPE=no
31972
31973    fi
31974    else FOUND_FREETYPE=no
31975
31976  fi
31977
31978        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31979        if test "x$FOUND_FREETYPE" = xyes; then
31980          if test "x$BUNDLE_FREETYPE" = xyes; then
31981            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31982$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31983            FOUND_FREETYPE=no
31984          else
31985            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
31986$as_echo_n "checking for freetype... " >&6; }
31987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
31988$as_echo "yes (using builddeps)" >&6; }
31989          fi
31990        fi
31991      fi
31992
31993      if test "x$FOUND_FREETYPE" != xyes; then
31994        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
31995        if test "x$PKG_CONFIG" != x; then
31996
31997pkg_failed=no
31998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
31999$as_echo_n "checking for FREETYPE... " >&6; }
32000
32001if test -n "$FREETYPE_CFLAGS"; then
32002    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
32003 elif test -n "$PKG_CONFIG"; then
32004    if test -n "$PKG_CONFIG" && \
32005    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32006  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32007  ac_status=$?
32008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32009  test $ac_status = 0; }; then
32010  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
32011else
32012  pkg_failed=yes
32013fi
32014 else
32015    pkg_failed=untried
32016fi
32017if test -n "$FREETYPE_LIBS"; then
32018    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
32019 elif test -n "$PKG_CONFIG"; then
32020    if test -n "$PKG_CONFIG" && \
32021    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32022  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32023  ac_status=$?
32024  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32025  test $ac_status = 0; }; then
32026  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
32027else
32028  pkg_failed=yes
32029fi
32030 else
32031    pkg_failed=untried
32032fi
32033
32034
32035
32036if test $pkg_failed = yes; then
32037
32038if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32039        _pkg_short_errors_supported=yes
32040else
32041        _pkg_short_errors_supported=no
32042fi
32043        if test $_pkg_short_errors_supported = yes; then
32044	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32045        else
32046	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32047        fi
32048	# Put the nasty error message in config.log where it belongs
32049	echo "$FREETYPE_PKG_ERRORS" >&5
32050
32051	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32052$as_echo "no" >&6; }
32053                FOUND_FREETYPE=no
32054elif test $pkg_failed = untried; then
32055	FOUND_FREETYPE=no
32056else
32057	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32058	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32060$as_echo "yes" >&6; }
32061	FOUND_FREETYPE=yes
32062fi
32063          if test "x$FOUND_FREETYPE" = xyes; then
32064            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32065            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32066            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32067            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32068              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32069            fi
32070            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32071            if test "x$BUNDLE_FREETYPE" = xyes; then
32072              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32073$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32074              FOUND_FREETYPE=no
32075            else
32076              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32077$as_echo_n "checking for freetype... " >&6; }
32078              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32079$as_echo "yes (using pkg-config)" >&6; }
32080            fi
32081          fi
32082        fi
32083      fi
32084
32085      if test "x$FOUND_FREETYPE" != xyes; then
32086        # Check in well-known locations
32087        if test "x$OPENJDK_TARGET_OS" = xwindows; then
32088          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32089
32090  windows_path="$FREETYPE_BASE_DIR"
32091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32092    unix_path=`$CYGPATH -u "$windows_path"`
32093    FREETYPE_BASE_DIR="$unix_path"
32094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32096    FREETYPE_BASE_DIR="$unix_path"
32097  fi
32098
32099
32100  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32101  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32102  METHOD="well-known location"
32103
32104  # First check if the files exists.
32105  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32106    # We found an arbitrary include file. That's a good sign.
32107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32108$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32109    FOUND_FREETYPE=yes
32110
32111    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32112    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32113      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32114$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32115      FOUND_FREETYPE=no
32116    else
32117      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32118        # On Windows, we will need both .lib and .dll file.
32119        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32120          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32121$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32122          FOUND_FREETYPE=no
32123        fi
32124      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
32125        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32126        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32127      fi
32128    fi
32129  fi
32130
32131  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
32190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32192  fi
32193
32194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32195
32196  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
32228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32249    fi
32250
32251    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32252  fi
32253
32254
32255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32256
32257  # Input might be given as Windows format, start by converting to
32258  # unix format.
32259  path="$POTENTIAL_FREETYPE_LIB_PATH"
32260  new_path=`$CYGPATH -u "$path"`
32261
32262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32265  # "foo.exe" is OK but "foo" is an error.
32266  #
32267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32268  # It is also a way to make sure we got the proper file name for the real test later on.
32269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32270  if test "x$test_shortpath" = x; then
32271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32273    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32274  fi
32275
32276  # Call helper function which possibly converts this using DOS-style short mode.
32277  # If so, the updated path is stored in $new_path.
32278
32279  input_path="$new_path"
32280  # Check if we need to convert this using DOS-style short mode. If the path
32281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32282  # take no chances and rewrite it.
32283  # Note: m4 eats our [], so we need to use [ and ] instead.
32284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32285  if test "x$has_forbidden_chars" != x; then
32286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32290      # Going to short mode and back again did indeed matter. Since short mode is
32291      # case insensitive, let's make it lowercase to improve readability.
32292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32293      # Now convert it back to Unix-stile (cygpath)
32294      input_path=`$CYGPATH -u "$shortmode_path"`
32295      new_path="$input_path"
32296    fi
32297  fi
32298
32299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32300  if test "x$test_cygdrive_prefix" = x; then
32301    # As a simple fix, exclude /usr/bin since it's not a real path.
32302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32304      # a path prefixed by /cygdrive for fixpath to work.
32305      new_path="$CYGWIN_ROOT_PATH$input_path"
32306    fi
32307  fi
32308
32309
32310  if test "x$path" != "x$new_path"; then
32311    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32314  fi
32315
32316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32317
32318  path="$POTENTIAL_FREETYPE_LIB_PATH"
32319  has_colon=`$ECHO $path | $GREP ^.:`
32320  new_path="$path"
32321  if test "x$has_colon" = x; then
32322    # Not in mixed or Windows style, start by that.
32323    new_path=`cmd //c echo $path`
32324  fi
32325
32326
32327  input_path="$new_path"
32328  # Check if we need to convert this using DOS-style short mode. If the path
32329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32330  # take no chances and rewrite it.
32331  # Note: m4 eats our [], so we need to use [ and ] instead.
32332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32333  if test "x$has_forbidden_chars" != x; then
32334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32336  fi
32337
32338
32339  windows_path="$new_path"
32340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32341    unix_path=`$CYGPATH -u "$windows_path"`
32342    new_path="$unix_path"
32343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32345    new_path="$unix_path"
32346  fi
32347
32348  if test "x$path" != "x$new_path"; then
32349    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32351$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32352  fi
32353
32354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32356
32357  else
32358    # We're on a posix platform. Hooray! :)
32359    path="$POTENTIAL_FREETYPE_LIB_PATH"
32360    has_space=`$ECHO "$path" | $GREP " "`
32361    if test "x$has_space" != x; then
32362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32363$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32364      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32365    fi
32366
32367    # Use eval to expand a potential ~
32368    eval path="$path"
32369    if test ! -f "$path" && test ! -d "$path"; then
32370      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32371    fi
32372
32373    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32374  fi
32375
32376
32377    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32379$as_echo_n "checking for freetype includes... " >&6; }
32380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32381$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32382    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32384$as_echo_n "checking for freetype libraries... " >&6; }
32385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32386$as_echo "$FREETYPE_LIB_PATH" >&6; }
32387  fi
32388
32389          if test "x$FOUND_FREETYPE" != xyes; then
32390            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32391
32392  windows_path="$FREETYPE_BASE_DIR"
32393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32394    unix_path=`$CYGPATH -u "$windows_path"`
32395    FREETYPE_BASE_DIR="$unix_path"
32396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32398    FREETYPE_BASE_DIR="$unix_path"
32399  fi
32400
32401
32402  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32403  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32404  METHOD="well-known location"
32405
32406  # First check if the files exists.
32407  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32408    # We found an arbitrary include file. That's a good sign.
32409    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32410$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32411    FOUND_FREETYPE=yes
32412
32413    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32414    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32415      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32417      FOUND_FREETYPE=no
32418    else
32419      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32420        # On Windows, we will need both .lib and .dll file.
32421        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32422          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32423$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32424          FOUND_FREETYPE=no
32425        fi
32426      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
32427        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32428        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32429      fi
32430    fi
32431  fi
32432
32433  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
32492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32494  fi
32495
32496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32497
32498  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
32530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32551    fi
32552
32553    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32554  fi
32555
32556
32557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32558
32559  # Input might be given as Windows format, start by converting to
32560  # unix format.
32561  path="$POTENTIAL_FREETYPE_LIB_PATH"
32562  new_path=`$CYGPATH -u "$path"`
32563
32564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32567  # "foo.exe" is OK but "foo" is an error.
32568  #
32569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32570  # It is also a way to make sure we got the proper file name for the real test later on.
32571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32572  if test "x$test_shortpath" = x; then
32573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32576  fi
32577
32578  # Call helper function which possibly converts this using DOS-style short mode.
32579  # If so, the updated path is stored in $new_path.
32580
32581  input_path="$new_path"
32582  # Check if we need to convert this using DOS-style short mode. If the path
32583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32584  # take no chances and rewrite it.
32585  # Note: m4 eats our [], so we need to use [ and ] instead.
32586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32587  if test "x$has_forbidden_chars" != x; then
32588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32592      # Going to short mode and back again did indeed matter. Since short mode is
32593      # case insensitive, let's make it lowercase to improve readability.
32594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32595      # Now convert it back to Unix-stile (cygpath)
32596      input_path=`$CYGPATH -u "$shortmode_path"`
32597      new_path="$input_path"
32598    fi
32599  fi
32600
32601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32602  if test "x$test_cygdrive_prefix" = x; then
32603    # As a simple fix, exclude /usr/bin since it's not a real path.
32604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32606      # a path prefixed by /cygdrive for fixpath to work.
32607      new_path="$CYGWIN_ROOT_PATH$input_path"
32608    fi
32609  fi
32610
32611
32612  if test "x$path" != "x$new_path"; then
32613    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32616  fi
32617
32618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32619
32620  path="$POTENTIAL_FREETYPE_LIB_PATH"
32621  has_colon=`$ECHO $path | $GREP ^.:`
32622  new_path="$path"
32623  if test "x$has_colon" = x; then
32624    # Not in mixed or Windows style, start by that.
32625    new_path=`cmd //c echo $path`
32626  fi
32627
32628
32629  input_path="$new_path"
32630  # Check if we need to convert this using DOS-style short mode. If the path
32631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32632  # take no chances and rewrite it.
32633  # Note: m4 eats our [], so we need to use [ and ] instead.
32634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32635  if test "x$has_forbidden_chars" != x; then
32636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32638  fi
32639
32640
32641  windows_path="$new_path"
32642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643    unix_path=`$CYGPATH -u "$windows_path"`
32644    new_path="$unix_path"
32645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32647    new_path="$unix_path"
32648  fi
32649
32650  if test "x$path" != "x$new_path"; then
32651    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32654  fi
32655
32656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32658
32659  else
32660    # We're on a posix platform. Hooray! :)
32661    path="$POTENTIAL_FREETYPE_LIB_PATH"
32662    has_space=`$ECHO "$path" | $GREP " "`
32663    if test "x$has_space" != x; then
32664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32666      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32667    fi
32668
32669    # Use eval to expand a potential ~
32670    eval path="$path"
32671    if test ! -f "$path" && test ! -d "$path"; then
32672      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32673    fi
32674
32675    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32676  fi
32677
32678
32679    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32681$as_echo_n "checking for freetype includes... " >&6; }
32682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32683$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32684    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32686$as_echo_n "checking for freetype libraries... " >&6; }
32687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32688$as_echo "$FREETYPE_LIB_PATH" >&6; }
32689  fi
32690
32691          fi
32692        else
32693          if test "x$SYS_ROOT" = "x/"; then
32694            FREETYPE_ROOT=
32695          else
32696            FREETYPE_ROOT="$SYS_ROOT"
32697          fi
32698          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32699
32700  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32701  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32702  METHOD="well-known location"
32703
32704  # First check if the files exists.
32705  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32706    # We found an arbitrary include file. That's a good sign.
32707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32708$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32709    FOUND_FREETYPE=yes
32710
32711    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32712    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32713      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32715      FOUND_FREETYPE=no
32716    else
32717      if test "x$OPENJDK_TARGET_OS" = xwindows; then
32718        # On Windows, we will need both .lib and .dll file.
32719        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32720          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32721$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32722          FOUND_FREETYPE=no
32723        fi
32724      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
32725        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32726        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32727      fi
32728    fi
32729  fi
32730
32731  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
32790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32792  fi
32793
32794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32795
32796  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
32828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32849    fi
32850
32851    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32852  fi
32853
32854
32855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32856
32857  # Input might be given as Windows format, start by converting to
32858  # unix format.
32859  path="$POTENTIAL_FREETYPE_LIB_PATH"
32860  new_path=`$CYGPATH -u "$path"`
32861
32862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32865  # "foo.exe" is OK but "foo" is an error.
32866  #
32867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32868  # It is also a way to make sure we got the proper file name for the real test later on.
32869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32870  if test "x$test_shortpath" = x; then
32871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32873    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32874  fi
32875
32876  # Call helper function which possibly converts this using DOS-style short mode.
32877  # If so, the updated path is stored in $new_path.
32878
32879  input_path="$new_path"
32880  # Check if we need to convert this using DOS-style short mode. If the path
32881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32882  # take no chances and rewrite it.
32883  # Note: m4 eats our [], so we need to use [ and ] instead.
32884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32885  if test "x$has_forbidden_chars" != x; then
32886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32890      # Going to short mode and back again did indeed matter. Since short mode is
32891      # case insensitive, let's make it lowercase to improve readability.
32892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32893      # Now convert it back to Unix-stile (cygpath)
32894      input_path=`$CYGPATH -u "$shortmode_path"`
32895      new_path="$input_path"
32896    fi
32897  fi
32898
32899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32900  if test "x$test_cygdrive_prefix" = x; then
32901    # As a simple fix, exclude /usr/bin since it's not a real path.
32902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32904      # a path prefixed by /cygdrive for fixpath to work.
32905      new_path="$CYGWIN_ROOT_PATH$input_path"
32906    fi
32907  fi
32908
32909
32910  if test "x$path" != "x$new_path"; then
32911    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32914  fi
32915
32916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32917
32918  path="$POTENTIAL_FREETYPE_LIB_PATH"
32919  has_colon=`$ECHO $path | $GREP ^.:`
32920  new_path="$path"
32921  if test "x$has_colon" = x; then
32922    # Not in mixed or Windows style, start by that.
32923    new_path=`cmd //c echo $path`
32924  fi
32925
32926
32927  input_path="$new_path"
32928  # Check if we need to convert this using DOS-style short mode. If the path
32929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32930  # take no chances and rewrite it.
32931  # Note: m4 eats our [], so we need to use [ and ] instead.
32932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32933  if test "x$has_forbidden_chars" != x; then
32934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32936  fi
32937
32938
32939  windows_path="$new_path"
32940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32941    unix_path=`$CYGPATH -u "$windows_path"`
32942    new_path="$unix_path"
32943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32945    new_path="$unix_path"
32946  fi
32947
32948  if test "x$path" != "x$new_path"; then
32949    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32952  fi
32953
32954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32956
32957  else
32958    # We're on a posix platform. Hooray! :)
32959    path="$POTENTIAL_FREETYPE_LIB_PATH"
32960    has_space=`$ECHO "$path" | $GREP " "`
32961    if test "x$has_space" != x; then
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32964      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32965    fi
32966
32967    # Use eval to expand a potential ~
32968    eval path="$path"
32969    if test ! -f "$path" && test ! -d "$path"; then
32970      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32971    fi
32972
32973    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32974  fi
32975
32976
32977    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32979$as_echo_n "checking for freetype includes... " >&6; }
32980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32981$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32982    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32984$as_echo_n "checking for freetype libraries... " >&6; }
32985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32986$as_echo "$FREETYPE_LIB_PATH" >&6; }
32987  fi
32988
32989
32990          if test "x$FOUND_FREETYPE" != xyes; then
32991            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
32992
32993  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32994  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32995  METHOD="well-known location"
32996
32997  # First check if the files exists.
32998  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32999    # We found an arbitrary include file. That's a good sign.
33000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33001$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33002    FOUND_FREETYPE=yes
33003
33004    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33005    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33006      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33008      FOUND_FREETYPE=no
33009    else
33010      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33011        # On Windows, we will need both .lib and .dll file.
33012        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33013          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33014$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33015          FOUND_FREETYPE=no
33016        fi
33017      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
33018        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33019        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33020      fi
33021    fi
33022  fi
33023
33024  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33043$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33044    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33085  fi
33086
33087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33088
33089  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33142    fi
33143
33144    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33145  fi
33146
33147
33148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33149
33150  # Input might be given as Windows format, start by converting to
33151  # unix format.
33152  path="$POTENTIAL_FREETYPE_LIB_PATH"
33153  new_path=`$CYGPATH -u "$path"`
33154
33155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33158  # "foo.exe" is OK but "foo" is an error.
33159  #
33160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33161  # It is also a way to make sure we got the proper file name for the real test later on.
33162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33163  if test "x$test_shortpath" = x; then
33164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33165$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33166    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33167  fi
33168
33169  # Call helper function which possibly converts this using DOS-style short mode.
33170  # If so, the updated path is stored in $new_path.
33171
33172  input_path="$new_path"
33173  # Check if we need to convert this using DOS-style short mode. If the path
33174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33175  # take no chances and rewrite it.
33176  # Note: m4 eats our [], so we need to use [ and ] instead.
33177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33178  if test "x$has_forbidden_chars" != x; then
33179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33183      # Going to short mode and back again did indeed matter. Since short mode is
33184      # case insensitive, let's make it lowercase to improve readability.
33185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33186      # Now convert it back to Unix-stile (cygpath)
33187      input_path=`$CYGPATH -u "$shortmode_path"`
33188      new_path="$input_path"
33189    fi
33190  fi
33191
33192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33193  if test "x$test_cygdrive_prefix" = x; then
33194    # As a simple fix, exclude /usr/bin since it's not a real path.
33195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33197      # a path prefixed by /cygdrive for fixpath to work.
33198      new_path="$CYGWIN_ROOT_PATH$input_path"
33199    fi
33200  fi
33201
33202
33203  if test "x$path" != "x$new_path"; then
33204    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33207  fi
33208
33209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33210
33211  path="$POTENTIAL_FREETYPE_LIB_PATH"
33212  has_colon=`$ECHO $path | $GREP ^.:`
33213  new_path="$path"
33214  if test "x$has_colon" = x; then
33215    # Not in mixed or Windows style, start by that.
33216    new_path=`cmd //c echo $path`
33217  fi
33218
33219
33220  input_path="$new_path"
33221  # Check if we need to convert this using DOS-style short mode. If the path
33222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33223  # take no chances and rewrite it.
33224  # Note: m4 eats our [], so we need to use [ and ] instead.
33225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33226  if test "x$has_forbidden_chars" != x; then
33227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33229  fi
33230
33231
33232  windows_path="$new_path"
33233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234    unix_path=`$CYGPATH -u "$windows_path"`
33235    new_path="$unix_path"
33236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33238    new_path="$unix_path"
33239  fi
33240
33241  if test "x$path" != "x$new_path"; then
33242    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33245  fi
33246
33247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33249
33250  else
33251    # We're on a posix platform. Hooray! :)
33252    path="$POTENTIAL_FREETYPE_LIB_PATH"
33253    has_space=`$ECHO "$path" | $GREP " "`
33254    if test "x$has_space" != x; then
33255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33256$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33257      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33258    fi
33259
33260    # Use eval to expand a potential ~
33261    eval path="$path"
33262    if test ! -f "$path" && test ! -d "$path"; then
33263      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33264    fi
33265
33266    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33267  fi
33268
33269
33270    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33272$as_echo_n "checking for freetype includes... " >&6; }
33273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33274$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33275    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33277$as_echo_n "checking for freetype libraries... " >&6; }
33278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33279$as_echo "$FREETYPE_LIB_PATH" >&6; }
33280  fi
33281
33282          fi
33283
33284          if test "x$FOUND_FREETYPE" != xyes; then
33285            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33286            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33287
33288  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33289  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33290  METHOD="well-known location"
33291
33292  # First check if the files exists.
33293  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33294    # We found an arbitrary include file. That's a good sign.
33295    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33296$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33297    FOUND_FREETYPE=yes
33298
33299    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33300    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33301      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33303      FOUND_FREETYPE=no
33304    else
33305      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33306        # On Windows, we will need both .lib and .dll file.
33307        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33308          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33309$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33310          FOUND_FREETYPE=no
33311        fi
33312      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
33313        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33314        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33315      fi
33316    fi
33317  fi
33318
33319  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33339    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33380  fi
33381
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383
33384  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33437    fi
33438
33439    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33440  fi
33441
33442
33443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33444
33445  # Input might be given as Windows format, start by converting to
33446  # unix format.
33447  path="$POTENTIAL_FREETYPE_LIB_PATH"
33448  new_path=`$CYGPATH -u "$path"`
33449
33450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33453  # "foo.exe" is OK but "foo" is an error.
33454  #
33455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33456  # It is also a way to make sure we got the proper file name for the real test later on.
33457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33458  if test "x$test_shortpath" = x; then
33459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33462  fi
33463
33464  # Call helper function which possibly converts this using DOS-style short mode.
33465  # If so, the updated path is stored in $new_path.
33466
33467  input_path="$new_path"
33468  # Check if we need to convert this using DOS-style short mode. If the path
33469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33470  # take no chances and rewrite it.
33471  # Note: m4 eats our [], so we need to use [ and ] instead.
33472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33473  if test "x$has_forbidden_chars" != x; then
33474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33478      # Going to short mode and back again did indeed matter. Since short mode is
33479      # case insensitive, let's make it lowercase to improve readability.
33480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33481      # Now convert it back to Unix-stile (cygpath)
33482      input_path=`$CYGPATH -u "$shortmode_path"`
33483      new_path="$input_path"
33484    fi
33485  fi
33486
33487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33488  if test "x$test_cygdrive_prefix" = x; then
33489    # As a simple fix, exclude /usr/bin since it's not a real path.
33490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33492      # a path prefixed by /cygdrive for fixpath to work.
33493      new_path="$CYGWIN_ROOT_PATH$input_path"
33494    fi
33495  fi
33496
33497
33498  if test "x$path" != "x$new_path"; then
33499    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33502  fi
33503
33504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33505
33506  path="$POTENTIAL_FREETYPE_LIB_PATH"
33507  has_colon=`$ECHO $path | $GREP ^.:`
33508  new_path="$path"
33509  if test "x$has_colon" = x; then
33510    # Not in mixed or Windows style, start by that.
33511    new_path=`cmd //c echo $path`
33512  fi
33513
33514
33515  input_path="$new_path"
33516  # Check if we need to convert this using DOS-style short mode. If the path
33517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33518  # take no chances and rewrite it.
33519  # Note: m4 eats our [], so we need to use [ and ] instead.
33520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33521  if test "x$has_forbidden_chars" != x; then
33522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33524  fi
33525
33526
33527  windows_path="$new_path"
33528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33529    unix_path=`$CYGPATH -u "$windows_path"`
33530    new_path="$unix_path"
33531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33533    new_path="$unix_path"
33534  fi
33535
33536  if test "x$path" != "x$new_path"; then
33537    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33540  fi
33541
33542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33544
33545  else
33546    # We're on a posix platform. Hooray! :)
33547    path="$POTENTIAL_FREETYPE_LIB_PATH"
33548    has_space=`$ECHO "$path" | $GREP " "`
33549    if test "x$has_space" != x; then
33550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33552      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33553    fi
33554
33555    # Use eval to expand a potential ~
33556    eval path="$path"
33557    if test ! -f "$path" && test ! -d "$path"; then
33558      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33559    fi
33560
33561    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33562  fi
33563
33564
33565    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33567$as_echo_n "checking for freetype includes... " >&6; }
33568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33569$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33570    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33572$as_echo_n "checking for freetype libraries... " >&6; }
33573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33574$as_echo "$FREETYPE_LIB_PATH" >&6; }
33575  fi
33576
33577            else
33578
33579  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33580  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33581  METHOD="well-known location"
33582
33583  # First check if the files exists.
33584  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33585    # We found an arbitrary include file. That's a good sign.
33586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33587$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33588    FOUND_FREETYPE=yes
33589
33590    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33591    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33592      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33593$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33594      FOUND_FREETYPE=no
33595    else
33596      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33597        # On Windows, we will need both .lib and .dll file.
33598        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33599          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33601          FOUND_FREETYPE=no
33602        fi
33603      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
33604        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33605        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33606      fi
33607    fi
33608  fi
33609
33610  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33629$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33630    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33671  fi
33672
33673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33674
33675  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33728    fi
33729
33730    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33731  fi
33732
33733
33734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33735
33736  # Input might be given as Windows format, start by converting to
33737  # unix format.
33738  path="$POTENTIAL_FREETYPE_LIB_PATH"
33739  new_path=`$CYGPATH -u "$path"`
33740
33741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33744  # "foo.exe" is OK but "foo" is an error.
33745  #
33746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33747  # It is also a way to make sure we got the proper file name for the real test later on.
33748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33749  if test "x$test_shortpath" = x; then
33750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33751$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33752    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33753  fi
33754
33755  # Call helper function which possibly converts this using DOS-style short mode.
33756  # If so, the updated path is stored in $new_path.
33757
33758  input_path="$new_path"
33759  # Check if we need to convert this using DOS-style short mode. If the path
33760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33761  # take no chances and rewrite it.
33762  # Note: m4 eats our [], so we need to use [ and ] instead.
33763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33764  if test "x$has_forbidden_chars" != x; then
33765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33769      # Going to short mode and back again did indeed matter. Since short mode is
33770      # case insensitive, let's make it lowercase to improve readability.
33771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33772      # Now convert it back to Unix-stile (cygpath)
33773      input_path=`$CYGPATH -u "$shortmode_path"`
33774      new_path="$input_path"
33775    fi
33776  fi
33777
33778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33779  if test "x$test_cygdrive_prefix" = x; then
33780    # As a simple fix, exclude /usr/bin since it's not a real path.
33781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33783      # a path prefixed by /cygdrive for fixpath to work.
33784      new_path="$CYGWIN_ROOT_PATH$input_path"
33785    fi
33786  fi
33787
33788
33789  if test "x$path" != "x$new_path"; then
33790    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33793  fi
33794
33795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33796
33797  path="$POTENTIAL_FREETYPE_LIB_PATH"
33798  has_colon=`$ECHO $path | $GREP ^.:`
33799  new_path="$path"
33800  if test "x$has_colon" = x; then
33801    # Not in mixed or Windows style, start by that.
33802    new_path=`cmd //c echo $path`
33803  fi
33804
33805
33806  input_path="$new_path"
33807  # Check if we need to convert this using DOS-style short mode. If the path
33808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33809  # take no chances and rewrite it.
33810  # Note: m4 eats our [], so we need to use [ and ] instead.
33811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33812  if test "x$has_forbidden_chars" != x; then
33813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33815  fi
33816
33817
33818  windows_path="$new_path"
33819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33820    unix_path=`$CYGPATH -u "$windows_path"`
33821    new_path="$unix_path"
33822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33824    new_path="$unix_path"
33825  fi
33826
33827  if test "x$path" != "x$new_path"; then
33828    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33831  fi
33832
33833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33835
33836  else
33837    # We're on a posix platform. Hooray! :)
33838    path="$POTENTIAL_FREETYPE_LIB_PATH"
33839    has_space=`$ECHO "$path" | $GREP " "`
33840    if test "x$has_space" != x; then
33841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33843      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33844    fi
33845
33846    # Use eval to expand a potential ~
33847    eval path="$path"
33848    if test ! -f "$path" && test ! -d "$path"; then
33849      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33850    fi
33851
33852    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33853  fi
33854
33855
33856    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33858$as_echo_n "checking for freetype includes... " >&6; }
33859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33860$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33861    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33863$as_echo_n "checking for freetype libraries... " >&6; }
33864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33865$as_echo "$FREETYPE_LIB_PATH" >&6; }
33866  fi
33867
33868              if test "x$FOUND_FREETYPE" != xyes; then
33869
33870  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33871  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33872  METHOD="well-known location"
33873
33874  # First check if the files exists.
33875  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33876    # We found an arbitrary include file. That's a good sign.
33877    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33878$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33879    FOUND_FREETYPE=yes
33880
33881    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33882    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33883      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33884$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33885      FOUND_FREETYPE=no
33886    else
33887      if test "x$OPENJDK_TARGET_OS" = xwindows; then
33888        # On Windows, we will need both .lib and .dll file.
33889        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33890          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33891$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33892          FOUND_FREETYPE=no
33893        fi
33894      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
33895        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33896        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33897      fi
33898    fi
33899  fi
33900
33901  if test "x$FOUND_FREETYPE" = xyes; then
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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33921    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33962  fi
33963
33964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33965
33966  path="$POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH="$new_path"
33998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_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_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34019    fi
34020
34021    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34022  fi
34023
34024
34025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34026
34027  # Input might be given as Windows format, start by converting to
34028  # unix format.
34029  path="$POTENTIAL_FREETYPE_LIB_PATH"
34030  new_path=`$CYGPATH -u "$path"`
34031
34032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34035  # "foo.exe" is OK but "foo" is an error.
34036  #
34037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34038  # It is also a way to make sure we got the proper file name for the real test later on.
34039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34040  if test "x$test_shortpath" = x; then
34041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34044  fi
34045
34046  # Call helper function which possibly converts this using DOS-style short mode.
34047  # If so, the updated path is stored in $new_path.
34048
34049  input_path="$new_path"
34050  # Check if we need to convert this using DOS-style short mode. If the path
34051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34052  # take no chances and rewrite it.
34053  # Note: m4 eats our [], so we need to use [ and ] instead.
34054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34055  if test "x$has_forbidden_chars" != x; then
34056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34060      # Going to short mode and back again did indeed matter. Since short mode is
34061      # case insensitive, let's make it lowercase to improve readability.
34062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34063      # Now convert it back to Unix-stile (cygpath)
34064      input_path=`$CYGPATH -u "$shortmode_path"`
34065      new_path="$input_path"
34066    fi
34067  fi
34068
34069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34070  if test "x$test_cygdrive_prefix" = x; then
34071    # As a simple fix, exclude /usr/bin since it's not a real path.
34072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34074      # a path prefixed by /cygdrive for fixpath to work.
34075      new_path="$CYGWIN_ROOT_PATH$input_path"
34076    fi
34077  fi
34078
34079
34080  if test "x$path" != "x$new_path"; then
34081    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34084  fi
34085
34086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34087
34088  path="$POTENTIAL_FREETYPE_LIB_PATH"
34089  has_colon=`$ECHO $path | $GREP ^.:`
34090  new_path="$path"
34091  if test "x$has_colon" = x; then
34092    # Not in mixed or Windows style, start by that.
34093    new_path=`cmd //c echo $path`
34094  fi
34095
34096
34097  input_path="$new_path"
34098  # Check if we need to convert this using DOS-style short mode. If the path
34099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34100  # take no chances and rewrite it.
34101  # Note: m4 eats our [], so we need to use [ and ] instead.
34102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34103  if test "x$has_forbidden_chars" != x; then
34104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34106  fi
34107
34108
34109  windows_path="$new_path"
34110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34111    unix_path=`$CYGPATH -u "$windows_path"`
34112    new_path="$unix_path"
34113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34115    new_path="$unix_path"
34116  fi
34117
34118  if test "x$path" != "x$new_path"; then
34119    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34122  fi
34123
34124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34126
34127  else
34128    # We're on a posix platform. Hooray! :)
34129    path="$POTENTIAL_FREETYPE_LIB_PATH"
34130    has_space=`$ECHO "$path" | $GREP " "`
34131    if test "x$has_space" != x; then
34132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34134      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34135    fi
34136
34137    # Use eval to expand a potential ~
34138    eval path="$path"
34139    if test ! -f "$path" && test ! -d "$path"; then
34140      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34141    fi
34142
34143    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34144  fi
34145
34146
34147    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34149$as_echo_n "checking for freetype includes... " >&6; }
34150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34151$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34152    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34154$as_echo_n "checking for freetype libraries... " >&6; }
34155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34156$as_echo "$FREETYPE_LIB_PATH" >&6; }
34157  fi
34158
34159              fi
34160            fi
34161          fi
34162        fi
34163      fi # end check in well-known locations
34164
34165      if test "x$FOUND_FREETYPE" != xyes; then
34166
34167  # Print a helpful message on how to acquire the necessary build dependency.
34168  # freetype is the help tag: freetype, cups, pulse, alsa etc
34169  MISSING_DEPENDENCY=freetype
34170
34171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34172    cygwin_help $MISSING_DEPENDENCY
34173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34174    msys_help $MISSING_DEPENDENCY
34175  else
34176    PKGHANDLER_COMMAND=
34177
34178    case $PKGHANDLER in
34179      apt-get)
34180        apt_help     $MISSING_DEPENDENCY ;;
34181      yum)
34182        yum_help     $MISSING_DEPENDENCY ;;
34183      port)
34184        port_help    $MISSING_DEPENDENCY ;;
34185      pkgutil)
34186        pkgutil_help $MISSING_DEPENDENCY ;;
34187      pkgadd)
34188        pkgadd_help  $MISSING_DEPENDENCY ;;
34189    esac
34190
34191    if test "x$PKGHANDLER_COMMAND" != x; then
34192      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34193    fi
34194  fi
34195
34196        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34197      fi
34198    fi # end user specified settings
34199
34200    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34201    if test "x$FREETYPE_CFLAGS" = x; then
34202
34203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34204
34205  # Input might be given as Windows format, start by converting to
34206  # unix format.
34207  path="$FREETYPE_INCLUDE_PATH"
34208  new_path=`$CYGPATH -u "$path"`
34209
34210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34213  # "foo.exe" is OK but "foo" is an error.
34214  #
34215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34216  # It is also a way to make sure we got the proper file name for the real test later on.
34217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34218  if test "x$test_shortpath" = x; then
34219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34220$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34221    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34222  fi
34223
34224  # Call helper function which possibly converts this using DOS-style short mode.
34225  # If so, the updated path is stored in $new_path.
34226
34227  input_path="$new_path"
34228  # Check if we need to convert this using DOS-style short mode. If the path
34229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34230  # take no chances and rewrite it.
34231  # Note: m4 eats our [], so we need to use [ and ] instead.
34232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34233  if test "x$has_forbidden_chars" != x; then
34234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34238      # Going to short mode and back again did indeed matter. Since short mode is
34239      # case insensitive, let's make it lowercase to improve readability.
34240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34241      # Now convert it back to Unix-stile (cygpath)
34242      input_path=`$CYGPATH -u "$shortmode_path"`
34243      new_path="$input_path"
34244    fi
34245  fi
34246
34247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34248  if test "x$test_cygdrive_prefix" = x; then
34249    # As a simple fix, exclude /usr/bin since it's not a real path.
34250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34252      # a path prefixed by /cygdrive for fixpath to work.
34253      new_path="$CYGWIN_ROOT_PATH$input_path"
34254    fi
34255  fi
34256
34257
34258  if test "x$path" != "x$new_path"; then
34259    FREETYPE_INCLUDE_PATH="$new_path"
34260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34261$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34262  fi
34263
34264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34265
34266  path="$FREETYPE_INCLUDE_PATH"
34267  has_colon=`$ECHO $path | $GREP ^.:`
34268  new_path="$path"
34269  if test "x$has_colon" = x; then
34270    # Not in mixed or Windows style, start by that.
34271    new_path=`cmd //c echo $path`
34272  fi
34273
34274
34275  input_path="$new_path"
34276  # Check if we need to convert this using DOS-style short mode. If the path
34277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34278  # take no chances and rewrite it.
34279  # Note: m4 eats our [], so we need to use [ and ] instead.
34280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34281  if test "x$has_forbidden_chars" != x; then
34282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34284  fi
34285
34286
34287  windows_path="$new_path"
34288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34289    unix_path=`$CYGPATH -u "$windows_path"`
34290    new_path="$unix_path"
34291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34293    new_path="$unix_path"
34294  fi
34295
34296  if test "x$path" != "x$new_path"; then
34297    FREETYPE_INCLUDE_PATH="$new_path"
34298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34299$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34300  fi
34301
34302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34304
34305  else
34306    # We're on a posix platform. Hooray! :)
34307    path="$FREETYPE_INCLUDE_PATH"
34308    has_space=`$ECHO "$path" | $GREP " "`
34309    if test "x$has_space" != x; then
34310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34311$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34313    fi
34314
34315    # Use eval to expand a potential ~
34316    eval path="$path"
34317    if test ! -f "$path" && test ! -d "$path"; then
34318      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34319    fi
34320
34321    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34322  fi
34323
34324      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34325        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34326      else
34327        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34328      fi
34329    fi
34330
34331    if test "x$FREETYPE_LIBS" = x; then
34332
34333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34334
34335  # Input might be given as Windows format, start by converting to
34336  # unix format.
34337  path="$FREETYPE_LIB_PATH"
34338  new_path=`$CYGPATH -u "$path"`
34339
34340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34343  # "foo.exe" is OK but "foo" is an error.
34344  #
34345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
34346  # It is also a way to make sure we got the proper file name for the real test later on.
34347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34348  if test "x$test_shortpath" = x; then
34349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34350$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34351    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34352  fi
34353
34354  # Call helper function which possibly converts this using DOS-style short mode.
34355  # If so, the updated path is stored in $new_path.
34356
34357  input_path="$new_path"
34358  # Check if we need to convert this using DOS-style short mode. If the path
34359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34360  # take no chances and rewrite it.
34361  # Note: m4 eats our [], so we need to use [ and ] instead.
34362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34363  if test "x$has_forbidden_chars" != x; then
34364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34368      # Going to short mode and back again did indeed matter. Since short mode is
34369      # case insensitive, let's make it lowercase to improve readability.
34370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34371      # Now convert it back to Unix-stile (cygpath)
34372      input_path=`$CYGPATH -u "$shortmode_path"`
34373      new_path="$input_path"
34374    fi
34375  fi
34376
34377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34378  if test "x$test_cygdrive_prefix" = x; then
34379    # As a simple fix, exclude /usr/bin since it's not a real path.
34380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34382      # a path prefixed by /cygdrive for fixpath to work.
34383      new_path="$CYGWIN_ROOT_PATH$input_path"
34384    fi
34385  fi
34386
34387
34388  if test "x$path" != "x$new_path"; then
34389    FREETYPE_LIB_PATH="$new_path"
34390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34391$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34392  fi
34393
34394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34395
34396  path="$FREETYPE_LIB_PATH"
34397  has_colon=`$ECHO $path | $GREP ^.:`
34398  new_path="$path"
34399  if test "x$has_colon" = x; then
34400    # Not in mixed or Windows style, start by that.
34401    new_path=`cmd //c echo $path`
34402  fi
34403
34404
34405  input_path="$new_path"
34406  # Check if we need to convert this using DOS-style short mode. If the path
34407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34408  # take no chances and rewrite it.
34409  # Note: m4 eats our [], so we need to use [ and ] instead.
34410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34411  if test "x$has_forbidden_chars" != x; then
34412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34414  fi
34415
34416
34417  windows_path="$new_path"
34418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34419    unix_path=`$CYGPATH -u "$windows_path"`
34420    new_path="$unix_path"
34421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34423    new_path="$unix_path"
34424  fi
34425
34426  if test "x$path" != "x$new_path"; then
34427    FREETYPE_LIB_PATH="$new_path"
34428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34429$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34430  fi
34431
34432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
34433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34434
34435  else
34436    # We're on a posix platform. Hooray! :)
34437    path="$FREETYPE_LIB_PATH"
34438    has_space=`$ECHO "$path" | $GREP " "`
34439    if test "x$has_space" != x; then
34440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34441$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34442      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34443    fi
34444
34445    # Use eval to expand a potential ~
34446    eval path="$path"
34447    if test ! -f "$path" && test ! -d "$path"; then
34448      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34449    fi
34450
34451    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34452  fi
34453
34454      if test "x$OPENJDK_TARGET_OS" = xwindows; then
34455        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34456      else
34457        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34458      fi
34459    fi
34460
34461    # Try to compile it
34462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34463$as_echo_n "checking if we can compile and link with freetype... " >&6; }
34464    ac_ext=cpp
34465ac_cpp='$CXXCPP $CPPFLAGS'
34466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34469
34470    PREV_CXXCFLAGS="$CXXFLAGS"
34471    PREV_LIBS="$LIBS"
34472    PREV_CXX="$CXX"
34473    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34474    LIBS="$LIBS $FREETYPE_LIBS"
34475    CXX="$FIXPATH $CXX"
34476    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34477/* end confdefs.h.  */
34478
34479          #include<ft2build.h>
34480          #include FT_FREETYPE_H
34481          int main () {
34482            FT_Init_FreeType(NULL);
34483            return 0;
34484          }
34485
34486_ACEOF
34487if ac_fn_cxx_try_link "$LINENO"; then :
34488
34489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34490$as_echo "yes" >&6; }
34491
34492else
34493
34494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34495$as_echo "no" >&6; }
34496          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34497$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34498          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34499$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34500
34501
34502  # Print a helpful message on how to acquire the necessary build dependency.
34503  # freetype is the help tag: freetype, cups, pulse, alsa etc
34504  MISSING_DEPENDENCY=freetype
34505
34506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34507    cygwin_help $MISSING_DEPENDENCY
34508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34509    msys_help $MISSING_DEPENDENCY
34510  else
34511    PKGHANDLER_COMMAND=
34512
34513    case $PKGHANDLER in
34514      apt-get)
34515        apt_help     $MISSING_DEPENDENCY ;;
34516      yum)
34517        yum_help     $MISSING_DEPENDENCY ;;
34518      port)
34519        port_help    $MISSING_DEPENDENCY ;;
34520      pkgutil)
34521        pkgutil_help $MISSING_DEPENDENCY ;;
34522      pkgadd)
34523        pkgadd_help  $MISSING_DEPENDENCY ;;
34524    esac
34525
34526    if test "x$PKGHANDLER_COMMAND" != x; then
34527      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34528    fi
34529  fi
34530
34531
34532          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34533
34534
34535fi
34536rm -f core conftest.err conftest.$ac_objext \
34537    conftest$ac_exeext conftest.$ac_ext
34538    CXXCFLAGS="$PREV_CXXFLAGS"
34539    LIBS="$PREV_LIBS"
34540    CXX="$PREV_CXX"
34541    ac_ext=cpp
34542ac_cpp='$CXXCPP $CPPFLAGS'
34543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34546
34547
34548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34549$as_echo_n "checking if we should bundle freetype... " >&6; }
34550    if test "x$BUNDLE_FREETYPE" = xyes; then
34551      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34552    fi
34553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34554$as_echo "$BUNDLE_FREETYPE" >&6; }
34555
34556  fi # end freetype needed
34557
34558
34559
34560
34561
34562
34563
34564  ###############################################################################
34565  #
34566  # Check for alsa headers and libraries. Used on Linux/GNU systems.
34567  #
34568
34569# Check whether --with-alsa was given.
34570if test "${with_alsa+set}" = set; then :
34571  withval=$with_alsa;
34572fi
34573
34574
34575# Check whether --with-alsa-include was given.
34576if test "${with_alsa_include+set}" = set; then :
34577  withval=$with_alsa_include;
34578fi
34579
34580
34581# Check whether --with-alsa-lib was given.
34582if test "${with_alsa_lib+set}" = set; then :
34583  withval=$with_alsa_lib;
34584fi
34585
34586
34587  if test "x$ALSA_NOT_NEEDED" = xyes; then
34588    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34589      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34590$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34591    fi
34592    ALSA_CFLAGS=
34593    ALSA_LIBS=
34594  else
34595    ALSA_FOUND=no
34596
34597    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34598      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34599    fi
34600
34601    if test "x${with_alsa}" != x; then
34602      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34603      ALSA_CFLAGS="-I${with_alsa}/include"
34604      ALSA_FOUND=yes
34605    fi
34606    if test "x${with_alsa_include}" != x; then
34607      ALSA_CFLAGS="-I${with_alsa_include}"
34608      ALSA_FOUND=yes
34609    fi
34610    if test "x${with_alsa_lib}" != x; then
34611      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34612      ALSA_FOUND=yes
34613    fi
34614    if test "x$ALSA_FOUND" = xno; then
34615
34616
34617  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34618    # Source the builddeps file again, to make sure it uses the latest variables!
34619    . $builddepsfile
34620    # Look for a target and build machine specific resource!
34621    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34622    if test "x$resource" = x; then
34623      # Ok, lets instead look for a target specific resource
34624      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34625    fi
34626    if test "x$resource" = x; then
34627      # Ok, lets instead look for a build specific resource
34628      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34629    fi
34630    if test "x$resource" = x; then
34631      # Ok, lets instead look for a generic resource
34632      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34633      resource=${builddep_alsa}
34634    fi
34635    if test "x$resource" != x; then
34636      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34637$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34638      # If the resource in the builddeps.conf file is an existing directory,
34639      # for example /java/linux/cups
34640      if test -d ${resource}; then
34641        depdir=${resource}
34642      else
34643
34644  # alsa is for example mymodule
34645  # $resource is for example libs/general/libmymod_1_2_3.zip
34646  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34647  # $with_builddeps_dir is for example /localhome/builddeps
34648  # depdir is the name of the variable into which we store the depdir, eg MYMOD
34649  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34650  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34651  filename=`basename $resource`
34652  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34653  filebase=${filename%%.*}
34654  extension=${filename#*.}
34655  installdir=$with_builddeps_dir/$filebase
34656  if test ! -f $installdir/$filename.unpacked; then
34657    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34658$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34659    if test ! -d $installdir; then
34660      mkdir -p $installdir
34661    fi
34662    if test ! -d $installdir; then
34663      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34664    fi
34665    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34666    touch $tmpfile
34667    if test ! -f $tmpfile; then
34668      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34669    fi
34670
34671  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34672  # $tmpfile is the local file name for the downloaded file.
34673  VALID_TOOL=no
34674  if test "x$BDEPS_FTP" = xwget; then
34675    VALID_TOOL=yes
34676    wget -O $tmpfile $with_builddeps_server/$resource
34677  fi
34678  if test "x$BDEPS_FTP" = xlftp; then
34679    VALID_TOOL=yes
34680    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34681  fi
34682  if test "x$BDEPS_FTP" = xftp; then
34683    VALID_TOOL=yes
34684    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34685    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34686    FTPUSERPWD=${FTPSERVER%%@*}
34687    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34688      FTPUSER=${userpwd%%:*}
34689      FTPPWD=${userpwd#*@}
34690      FTPSERVER=${FTPSERVER#*@}
34691    else
34692      FTPUSER=ftp
34693      FTPPWD=ftp
34694    fi
34695    # the "pass" command does not work on some
34696    # ftp clients (read ftp.exe) but if it works,
34697    # passive mode is better!
34698    ( \
34699        echo "user $FTPUSER $FTPPWD"        ; \
34700        echo "pass"                         ; \
34701        echo "bin"                          ; \
34702        echo "get $FTPPATH $tmpfile"              ; \
34703    ) | ftp -in $FTPSERVER
34704  fi
34705  if test "x$VALID_TOOL" != xyes; then
34706    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34707  fi
34708
34709    mv $tmpfile $installdir/$filename
34710    if test ! -s $installdir/$filename; then
34711      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34712    fi
34713    case "$extension" in
34714      zip)  echo "Unzipping $installdir/$filename..."
34715        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34716        ;;
34717      tar.gz) echo "Untaring $installdir/$filename..."
34718        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34719        ;;
34720      tgz) echo "Untaring $installdir/$filename..."
34721        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34722        ;;
34723      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34724        ;;
34725    esac
34726  fi
34727  if test -f $installdir/$filename.unpacked; then
34728    depdir=$installdir
34729  fi
34730
34731      fi
34732      # Source the builddeps file again, because in the previous command, the depdir
34733      # was updated to point at the current build dependency install directory.
34734      . $builddepsfile
34735      # Now extract variables from the builddeps.conf files.
34736      theroot=${builddep_alsa_ROOT}
34737      thecflags=${builddep_alsa_CFLAGS}
34738      thelibs=${builddep_alsa_LIBS}
34739      if test "x$depdir" = x; then
34740        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34741      fi
34742      ALSA=$depdir
34743      if test "x$theroot" != x; then
34744        ALSA="$theroot"
34745      fi
34746      if test "x$thecflags" != x; then
34747        ALSA_CFLAGS="$thecflags"
34748      fi
34749      if test "x$thelibs" != x; then
34750        ALSA_LIBS="$thelibs"
34751      fi
34752      ALSA_FOUND=yes
34753      else ALSA_FOUND=no
34754
34755    fi
34756    else ALSA_FOUND=no
34757
34758  fi
34759
34760    fi
34761    if test "x$ALSA_FOUND" = xno; then
34762
34763pkg_failed=no
34764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34765$as_echo_n "checking for ALSA... " >&6; }
34766
34767if test -n "$ALSA_CFLAGS"; then
34768    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34769 elif test -n "$PKG_CONFIG"; then
34770    if test -n "$PKG_CONFIG" && \
34771    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34772  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34773  ac_status=$?
34774  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34775  test $ac_status = 0; }; then
34776  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34777else
34778  pkg_failed=yes
34779fi
34780 else
34781    pkg_failed=untried
34782fi
34783if test -n "$ALSA_LIBS"; then
34784    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34785 elif test -n "$PKG_CONFIG"; then
34786    if test -n "$PKG_CONFIG" && \
34787    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34788  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34789  ac_status=$?
34790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34791  test $ac_status = 0; }; then
34792  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34793else
34794  pkg_failed=yes
34795fi
34796 else
34797    pkg_failed=untried
34798fi
34799
34800
34801
34802if test $pkg_failed = yes; then
34803
34804if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34805        _pkg_short_errors_supported=yes
34806else
34807        _pkg_short_errors_supported=no
34808fi
34809        if test $_pkg_short_errors_supported = yes; then
34810	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34811        else
34812	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34813        fi
34814	# Put the nasty error message in config.log where it belongs
34815	echo "$ALSA_PKG_ERRORS" >&5
34816
34817	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34818$as_echo "no" >&6; }
34819                ALSA_FOUND=no
34820elif test $pkg_failed = untried; then
34821	ALSA_FOUND=no
34822else
34823	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34824	ALSA_LIBS=$pkg_cv_ALSA_LIBS
34825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34826$as_echo "yes" >&6; }
34827	ALSA_FOUND=yes
34828fi
34829    fi
34830    if test "x$ALSA_FOUND" = xno; then
34831      for ac_header in alsa/asoundlib.h
34832do :
34833  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34834if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34835  cat >>confdefs.h <<_ACEOF
34836#define HAVE_ALSA_ASOUNDLIB_H 1
34837_ACEOF
34838
34839            ALSA_FOUND=yes
34840            ALSA_CFLAGS=-Iignoreme
34841            ALSA_LIBS=-lasound
34842            DEFAULT_ALSA=yes
34843
34844else
34845  ALSA_FOUND=no
34846fi
34847
34848done
34849
34850    fi
34851    if test "x$ALSA_FOUND" = xno; then
34852
34853  # Print a helpful message on how to acquire the necessary build dependency.
34854  # alsa is the help tag: freetype, cups, pulse, alsa etc
34855  MISSING_DEPENDENCY=alsa
34856
34857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34858    cygwin_help $MISSING_DEPENDENCY
34859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34860    msys_help $MISSING_DEPENDENCY
34861  else
34862    PKGHANDLER_COMMAND=
34863
34864    case $PKGHANDLER in
34865      apt-get)
34866        apt_help     $MISSING_DEPENDENCY ;;
34867      yum)
34868        yum_help     $MISSING_DEPENDENCY ;;
34869      port)
34870        port_help    $MISSING_DEPENDENCY ;;
34871      pkgutil)
34872        pkgutil_help $MISSING_DEPENDENCY ;;
34873      pkgadd)
34874        pkgadd_help  $MISSING_DEPENDENCY ;;
34875    esac
34876
34877    if test "x$PKGHANDLER_COMMAND" != x; then
34878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34879    fi
34880  fi
34881
34882      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34883    fi
34884  fi
34885
34886
34887
34888
34889
34890
34891  ###############################################################################
34892  #
34893  # Check for the jpeg library
34894  #
34895
34896  USE_EXTERNAL_LIBJPEG=true
34897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34898$as_echo_n "checking for main in -ljpeg... " >&6; }
34899if ${ac_cv_lib_jpeg_main+:} false; then :
34900  $as_echo_n "(cached) " >&6
34901else
34902  ac_check_lib_save_LIBS=$LIBS
34903LIBS="-ljpeg  $LIBS"
34904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34905/* end confdefs.h.  */
34906
34907
34908int
34909main ()
34910{
34911return main ();
34912  ;
34913  return 0;
34914}
34915_ACEOF
34916if ac_fn_cxx_try_link "$LINENO"; then :
34917  ac_cv_lib_jpeg_main=yes
34918else
34919  ac_cv_lib_jpeg_main=no
34920fi
34921rm -f core conftest.err conftest.$ac_objext \
34922    conftest$ac_exeext conftest.$ac_ext
34923LIBS=$ac_check_lib_save_LIBS
34924fi
34925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34926$as_echo "$ac_cv_lib_jpeg_main" >&6; }
34927if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34928  cat >>confdefs.h <<_ACEOF
34929#define HAVE_LIBJPEG 1
34930_ACEOF
34931
34932  LIBS="-ljpeg $LIBS"
34933
34934else
34935   USE_EXTERNAL_LIBJPEG=false
34936      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34937$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34938
34939fi
34940
34941
34942
34943  ###############################################################################
34944  #
34945  # Check for the gif library
34946  #
34947
34948
34949# Check whether --with-giflib was given.
34950if test "${with_giflib+set}" = set; then :
34951  withval=$with_giflib;
34952fi
34953
34954
34955
34956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34957$as_echo_n "checking for which giflib to use... " >&6; }
34958
34959  # default is bundled
34960  DEFAULT_GIFLIB=bundled
34961
34962  #
34963  # if user didn't specify, use DEFAULT_GIFLIB
34964  #
34965  if test "x${with_giflib}" = "x"; then
34966    with_giflib=${DEFAULT_GIFLIB}
34967  fi
34968
34969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34970$as_echo "${with_giflib}" >&6; }
34971
34972  if test "x${with_giflib}" = "xbundled"; then
34973    USE_EXTERNAL_LIBGIF=false
34974  elif test "x${with_giflib}" = "xsystem"; then
34975    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34976if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34977
34978else
34979   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34980fi
34981
34982
34983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34984$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
34985if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
34986  $as_echo_n "(cached) " >&6
34987else
34988  ac_check_lib_save_LIBS=$LIBS
34989LIBS="-lgif  $LIBS"
34990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34991/* end confdefs.h.  */
34992
34993/* Override any GCC internal prototype to avoid an error.
34994   Use char because int might match the return type of a GCC
34995   builtin and then its argument prototype would still apply.  */
34996#ifdef __cplusplus
34997extern "C"
34998#endif
34999char DGifGetCode ();
35000int
35001main ()
35002{
35003return DGifGetCode ();
35004  ;
35005  return 0;
35006}
35007_ACEOF
35008if ac_fn_cxx_try_link "$LINENO"; then :
35009  ac_cv_lib_gif_DGifGetCode=yes
35010else
35011  ac_cv_lib_gif_DGifGetCode=no
35012fi
35013rm -f core conftest.err conftest.$ac_objext \
35014    conftest$ac_exeext conftest.$ac_ext
35015LIBS=$ac_check_lib_save_LIBS
35016fi
35017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
35018$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
35019if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
35020  cat >>confdefs.h <<_ACEOF
35021#define HAVE_LIBGIF 1
35022_ACEOF
35023
35024  LIBS="-lgif $LIBS"
35025
35026else
35027   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
35028fi
35029
35030
35031    USE_EXTERNAL_LIBGIF=true
35032  else
35033    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
35034  fi
35035
35036
35037  ###############################################################################
35038  #
35039  # Check for the zlib library
35040  #
35041
35042
35043# Check whether --with-zlib was given.
35044if test "${with_zlib+set}" = set; then :
35045  withval=$with_zlib;
35046fi
35047
35048
35049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35050$as_echo_n "checking for compress in -lz... " >&6; }
35051if ${ac_cv_lib_z_compress+:} false; then :
35052  $as_echo_n "(cached) " >&6
35053else
35054  ac_check_lib_save_LIBS=$LIBS
35055LIBS="-lz  $LIBS"
35056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35057/* end confdefs.h.  */
35058
35059/* Override any GCC internal prototype to avoid an error.
35060   Use char because int might match the return type of a GCC
35061   builtin and then its argument prototype would still apply.  */
35062#ifdef __cplusplus
35063extern "C"
35064#endif
35065char compress ();
35066int
35067main ()
35068{
35069return compress ();
35070  ;
35071  return 0;
35072}
35073_ACEOF
35074if ac_fn_cxx_try_link "$LINENO"; then :
35075  ac_cv_lib_z_compress=yes
35076else
35077  ac_cv_lib_z_compress=no
35078fi
35079rm -f core conftest.err conftest.$ac_objext \
35080    conftest$ac_exeext conftest.$ac_ext
35081LIBS=$ac_check_lib_save_LIBS
35082fi
35083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35084$as_echo "$ac_cv_lib_z_compress" >&6; }
35085if test "x$ac_cv_lib_z_compress" = xyes; then :
35086   ZLIB_FOUND=yes
35087else
35088   ZLIB_FOUND=no
35089fi
35090
35091
35092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35093$as_echo_n "checking for which zlib to use... " >&6; }
35094
35095  DEFAULT_ZLIB=bundled
35096  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35097    #
35098    # On macosx default is system...on others default is
35099    #
35100    DEFAULT_ZLIB=system
35101  fi
35102
35103  if test "x${ZLIB_FOUND}" != "xyes"; then
35104    #
35105    # If we don't find any system...set default to bundled
35106    #
35107    DEFAULT_ZLIB=bundled
35108  fi
35109
35110  #
35111  # If user didn't specify, use DEFAULT_ZLIB
35112  #
35113  if test "x${with_zlib}" = "x"; then
35114    with_zlib=${DEFAULT_ZLIB}
35115  fi
35116
35117  if test "x${with_zlib}" = "xbundled"; then
35118    USE_EXTERNAL_LIBZ=false
35119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35120$as_echo "bundled" >&6; }
35121  elif test "x${with_zlib}" = "xsystem"; then
35122    if test "x${ZLIB_FOUND}" = "xyes"; then
35123      USE_EXTERNAL_LIBZ=true
35124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35125$as_echo "system" >&6; }
35126    else
35127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35128$as_echo "system not found" >&6; }
35129      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35130    fi
35131  else
35132    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35133  fi
35134
35135
35136
35137  ###############################################################################
35138  LIBZIP_CAN_USE_MMAP=true
35139
35140
35141
35142  ###############################################################################
35143  #
35144  # Check if altzone exists in time.h
35145  #
35146
35147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35148/* end confdefs.h.  */
35149#include <time.h>
35150int
35151main ()
35152{
35153return (int)altzone;
35154  ;
35155  return 0;
35156}
35157_ACEOF
35158if ac_fn_cxx_try_link "$LINENO"; then :
35159  has_altzone=yes
35160else
35161  has_altzone=no
35162fi
35163rm -f core conftest.err conftest.$ac_objext \
35164    conftest$ac_exeext conftest.$ac_ext
35165  if test "x$has_altzone" = xyes; then
35166
35167$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35168
35169  fi
35170
35171  ###############################################################################
35172  #
35173  # Check the maths library
35174  #
35175
35176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35177$as_echo_n "checking for cos in -lm... " >&6; }
35178if ${ac_cv_lib_m_cos+:} false; then :
35179  $as_echo_n "(cached) " >&6
35180else
35181  ac_check_lib_save_LIBS=$LIBS
35182LIBS="-lm  $LIBS"
35183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35184/* end confdefs.h.  */
35185
35186/* Override any GCC internal prototype to avoid an error.
35187   Use char because int might match the return type of a GCC
35188   builtin and then its argument prototype would still apply.  */
35189#ifdef __cplusplus
35190extern "C"
35191#endif
35192char cos ();
35193int
35194main ()
35195{
35196return cos ();
35197  ;
35198  return 0;
35199}
35200_ACEOF
35201if ac_fn_cxx_try_link "$LINENO"; then :
35202  ac_cv_lib_m_cos=yes
35203else
35204  ac_cv_lib_m_cos=no
35205fi
35206rm -f core conftest.err conftest.$ac_objext \
35207    conftest$ac_exeext conftest.$ac_ext
35208LIBS=$ac_check_lib_save_LIBS
35209fi
35210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35211$as_echo "$ac_cv_lib_m_cos" >&6; }
35212if test "x$ac_cv_lib_m_cos" = xyes; then :
35213  cat >>confdefs.h <<_ACEOF
35214#define HAVE_LIBM 1
35215_ACEOF
35216
35217  LIBS="-lm $LIBS"
35218
35219else
35220
35221        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35222$as_echo "$as_me: Maths library was not found" >&6;}
35223
35224
35225fi
35226
35227
35228
35229  ###############################################################################
35230  #
35231  # Check for libdl.so
35232
35233  save_LIBS="$LIBS"
35234  LIBS=""
35235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35236$as_echo_n "checking for dlopen in -ldl... " >&6; }
35237if ${ac_cv_lib_dl_dlopen+:} false; then :
35238  $as_echo_n "(cached) " >&6
35239else
35240  ac_check_lib_save_LIBS=$LIBS
35241LIBS="-ldl  $LIBS"
35242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35243/* end confdefs.h.  */
35244
35245/* Override any GCC internal prototype to avoid an error.
35246   Use char because int might match the return type of a GCC
35247   builtin and then its argument prototype would still apply.  */
35248#ifdef __cplusplus
35249extern "C"
35250#endif
35251char dlopen ();
35252int
35253main ()
35254{
35255return dlopen ();
35256  ;
35257  return 0;
35258}
35259_ACEOF
35260if ac_fn_cxx_try_link "$LINENO"; then :
35261  ac_cv_lib_dl_dlopen=yes
35262else
35263  ac_cv_lib_dl_dlopen=no
35264fi
35265rm -f core conftest.err conftest.$ac_objext \
35266    conftest$ac_exeext conftest.$ac_ext
35267LIBS=$ac_check_lib_save_LIBS
35268fi
35269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35270$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35271if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35272  cat >>confdefs.h <<_ACEOF
35273#define HAVE_LIBDL 1
35274_ACEOF
35275
35276  LIBS="-ldl $LIBS"
35277
35278fi
35279
35280  LIBDL="$LIBS"
35281
35282  LIBS="$save_LIBS"
35283
35284
35285  ###############################################################################
35286  #
35287  # statically link libstdc++ before C++ ABI is stablized on Linux unless
35288  # dynamic build is configured on command line.
35289  #
35290
35291# Check whether --with-stdc++lib was given.
35292if test "${with_stdc__lib+set}" = set; then :
35293  withval=$with_stdc__lib;
35294        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35295                && test "x$with_stdc__lib" != xdefault; then
35296          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35297        fi
35298
35299else
35300  with_stdc__lib=default
35301
35302fi
35303
35304
35305  if test "x$OPENJDK_TARGET_OS" = xlinux; then
35306    # Test if -lstdc++ works.
35307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35308$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35309    ac_ext=cpp
35310ac_cpp='$CXXCPP $CPPFLAGS'
35311ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35312ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35313ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35314
35315    OLD_CXXFLAGS="$CXXFLAGS"
35316    CXXFLAGS="$CXXFLAGS -lstdc++"
35317    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35318/* end confdefs.h.  */
35319
35320int
35321main ()
35322{
35323return 0;
35324  ;
35325  return 0;
35326}
35327_ACEOF
35328if ac_fn_cxx_try_link "$LINENO"; then :
35329  has_dynamic_libstdcxx=yes
35330else
35331  has_dynamic_libstdcxx=no
35332fi
35333rm -f core conftest.err conftest.$ac_objext \
35334    conftest$ac_exeext conftest.$ac_ext
35335    CXXFLAGS="$OLD_CXXFLAGS"
35336    ac_ext=cpp
35337ac_cpp='$CXXCPP $CPPFLAGS'
35338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35341
35342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35343$as_echo "$has_dynamic_libstdcxx" >&6; }
35344
35345    # Test if stdc++ can be linked statically.
35346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35347$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35348    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35349    ac_ext=cpp
35350ac_cpp='$CXXCPP $CPPFLAGS'
35351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35354
35355    OLD_LIBS="$LIBS"
35356    OLD_CXX="$CXX"
35357    LIBS="$STATIC_STDCXX_FLAGS"
35358    CXX="$CC"
35359    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35360/* end confdefs.h.  */
35361
35362int
35363main ()
35364{
35365return 0;
35366  ;
35367  return 0;
35368}
35369_ACEOF
35370if ac_fn_cxx_try_link "$LINENO"; then :
35371  has_static_libstdcxx=yes
35372else
35373  has_static_libstdcxx=no
35374fi
35375rm -f core conftest.err conftest.$ac_objext \
35376    conftest$ac_exeext conftest.$ac_ext
35377    LIBS="$OLD_LIBS"
35378    CXX="$OLD_CXX"
35379    ac_ext=cpp
35380ac_cpp='$CXXCPP $CPPFLAGS'
35381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35384
35385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35386$as_echo "$has_static_libstdcxx" >&6; }
35387
35388    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35389      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35390    fi
35391
35392    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35393      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35394    fi
35395
35396    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35397      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35398    fi
35399
35400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35401$as_echo_n "checking how to link with libstdc++... " >&6; }
35402    # If dynamic was requested, it's available since it would fail above otherwise.
35403    # If dynamic wasn't requested, go with static unless it isn't available.
35404    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35405      LIBCXX="$LIBCXX -lstdc++"
35406      LDCXX="$CXX"
35407      STATIC_CXX_SETTING="STATIC_CXX=false"
35408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35409$as_echo "dynamic" >&6; }
35410    else
35411      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35412      LDCXX="$CC"
35413      STATIC_CXX_SETTING="STATIC_CXX=true"
35414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35415$as_echo "static" >&6; }
35416    fi
35417  fi
35418
35419
35420  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35421    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35422
35423pkg_failed=no
35424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35425$as_echo_n "checking for LIBFFI... " >&6; }
35426
35427if test -n "$LIBFFI_CFLAGS"; then
35428    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35429 elif test -n "$PKG_CONFIG"; then
35430    if test -n "$PKG_CONFIG" && \
35431    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35432  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35433  ac_status=$?
35434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35435  test $ac_status = 0; }; then
35436  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35437else
35438  pkg_failed=yes
35439fi
35440 else
35441    pkg_failed=untried
35442fi
35443if test -n "$LIBFFI_LIBS"; then
35444    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35445 elif test -n "$PKG_CONFIG"; then
35446    if test -n "$PKG_CONFIG" && \
35447    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35448  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35449  ac_status=$?
35450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35451  test $ac_status = 0; }; then
35452  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35453else
35454  pkg_failed=yes
35455fi
35456 else
35457    pkg_failed=untried
35458fi
35459
35460
35461
35462if test $pkg_failed = yes; then
35463
35464if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35465        _pkg_short_errors_supported=yes
35466else
35467        _pkg_short_errors_supported=no
35468fi
35469        if test $_pkg_short_errors_supported = yes; then
35470	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35471        else
35472	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35473        fi
35474	# Put the nasty error message in config.log where it belongs
35475	echo "$LIBFFI_PKG_ERRORS" >&5
35476
35477	as_fn_error $? "Package requirements (libffi) were not met:
35478
35479$LIBFFI_PKG_ERRORS
35480
35481Consider adjusting the PKG_CONFIG_PATH environment variable if you
35482installed software in a non-standard prefix.
35483
35484Alternatively, you may set the environment variables LIBFFI_CFLAGS
35485and LIBFFI_LIBS to avoid the need to call pkg-config.
35486See the pkg-config man page for more details.
35487" "$LINENO" 5
35488elif test $pkg_failed = untried; then
35489	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35491as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35492is in your PATH or set the PKG_CONFIG environment variable to the full
35493path to pkg-config.
35494
35495Alternatively, you may set the environment variables LIBFFI_CFLAGS
35496and LIBFFI_LIBS to avoid the need to call pkg-config.
35497See the pkg-config man page for more details.
35498
35499To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35500See \`config.log' for more details" "$LINENO" 5; }
35501else
35502	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35503	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35505$as_echo "yes" >&6; }
35506	:
35507fi
35508
35509  fi
35510
35511  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35512    # Extract the first word of "llvm-config", so it can be a program name with args.
35513set dummy llvm-config; ac_word=$2
35514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35515$as_echo_n "checking for $ac_word... " >&6; }
35516if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35517  $as_echo_n "(cached) " >&6
35518else
35519  if test -n "$LLVM_CONFIG"; then
35520  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35521else
35522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35523for as_dir in $PATH
35524do
35525  IFS=$as_save_IFS
35526  test -z "$as_dir" && as_dir=.
35527    for ac_exec_ext in '' $ac_executable_extensions; do
35528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35529    ac_cv_prog_LLVM_CONFIG="llvm-config"
35530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35531    break 2
35532  fi
35533done
35534  done
35535IFS=$as_save_IFS
35536
35537fi
35538fi
35539LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35540if test -n "$LLVM_CONFIG"; then
35541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35542$as_echo "$LLVM_CONFIG" >&6; }
35543else
35544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35545$as_echo "no" >&6; }
35546fi
35547
35548
35549
35550    if test "x$LLVM_CONFIG" != xllvm-config; then
35551      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35552    fi
35553
35554    llvm_components="jit mcjit engine nativecodegen native"
35555    unset LLVM_CFLAGS
35556    for flag in $("$LLVM_CONFIG" --cxxflags); do
35557      if echo "${flag}" | grep -q '^-[ID]'; then
35558        if test "${flag}" != "-D_DEBUG" ; then
35559          if test "${LLVM_CFLAGS}" != "" ; then
35560            LLVM_CFLAGS="${LLVM_CFLAGS} "
35561          fi
35562          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35563        fi
35564      fi
35565    done
35566    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35567    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35568
35569    unset LLVM_LDFLAGS
35570    for flag in $("${LLVM_CONFIG}" --ldflags); do
35571      if echo "${flag}" | grep -q '^-L'; then
35572        if test "${LLVM_LDFLAGS}" != ""; then
35573          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35574        fi
35575        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35576      fi
35577    done
35578
35579    unset LLVM_LIBS
35580    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35581      if echo "${flag}" | grep -q '^-l'; then
35582        if test "${LLVM_LIBS}" != ""; then
35583          LLVM_LIBS="${LLVM_LIBS} "
35584        fi
35585        LLVM_LIBS="${LLVM_LIBS}${flag}"
35586      fi
35587    done
35588
35589
35590
35591
35592  fi
35593
35594  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35595  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35596    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35597  fi
35598
35599  # TODO better (platform agnostic) test
35600  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35601    LIBCXX="-lstdc++"
35602  fi
35603
35604
35605
35606
35607
35608###############################################################################
35609#
35610# We need to do some final tweaking, when everything else is done.
35611#
35612###############################################################################
35613
35614
35615  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35616
35617
35618  # The name of the Service Agent jar.
35619  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35620  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35621    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35622  fi
35623
35624
35625
35626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35627$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35628
35629    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35630      ENABLE_INTREE_EC=yes
35631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35632$as_echo "yes" >&6; }
35633    else
35634      ENABLE_INTREE_EC=no
35635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35636$as_echo "no" >&6; }
35637    fi
35638
35639
35640
35641
35642###############################################################################
35643#
35644# Configure parts of the build that only affect the build performance,
35645# not the result.
35646#
35647###############################################################################
35648
35649
35650  # How many cores do we have on this build system?
35651
35652# Check whether --with-num-cores was given.
35653if test "${with_num_cores+set}" = set; then :
35654  withval=$with_num_cores;
35655fi
35656
35657  if test "x$with_num_cores" = x; then
35658    # The number of cores were not specified, try to probe them.
35659
35660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35661$as_echo_n "checking for number of cores... " >&6; }
35662  NUM_CORES=1
35663  FOUND_CORES=no
35664
35665  if test -f /proc/cpuinfo; then
35666    # Looks like a Linux (or cygwin) system
35667    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35668    FOUND_CORES=yes
35669  elif test -x /usr/sbin/psrinfo; then
35670    # Looks like a Solaris system
35671    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35672    FOUND_CORES=yes
35673  elif test -x /usr/sbin/system_profiler; then
35674    # Looks like a MacOSX system
35675    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35676    FOUND_CORES=yes
35677  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35678    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35679    FOUND_CORES=yes
35680  elif test -n "$NUMBER_OF_PROCESSORS"; then
35681    # On windows, look in the env
35682    NUM_CORES=$NUMBER_OF_PROCESSORS
35683    FOUND_CORES=yes
35684  fi
35685
35686  if test "x$FOUND_CORES" = xyes; then
35687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35688$as_echo "$NUM_CORES" >&6; }
35689  else
35690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35691$as_echo "could not detect number of cores, defaulting to 1" >&6; }
35692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35693$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35694  fi
35695
35696  else
35697    NUM_CORES=$with_num_cores
35698  fi
35699
35700
35701
35702  # How much memory do we have on this build system?
35703
35704# Check whether --with-memory-size was given.
35705if test "${with_memory_size+set}" = set; then :
35706  withval=$with_memory_size;
35707fi
35708
35709  if test "x$with_memory_size" = x; then
35710    # The memory size was not specified, try to probe it.
35711
35712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35713$as_echo_n "checking for memory size... " >&6; }
35714  # Default to 1024 MB
35715  MEMORY_SIZE=1024
35716  FOUND_MEM=no
35717
35718  if test -f /proc/meminfo; then
35719    # Looks like a Linux (or cygwin) system
35720    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35721    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35722    FOUND_MEM=yes
35723  elif test -x /usr/sbin/prtconf; then
35724    # Looks like a Solaris or AIX system
35725    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35726    FOUND_MEM=yes
35727  elif test -x /usr/sbin/system_profiler; then
35728    # Looks like a MacOSX system
35729    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35730    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35731    FOUND_MEM=yes
35732  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35733    # Windows, but without cygwin
35734    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35735    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35736    FOUND_MEM=yes
35737  fi
35738
35739  if test "x$FOUND_MEM" = xyes; then
35740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35741$as_echo "$MEMORY_SIZE MB" >&6; }
35742  else
35743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35744$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35745    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35746$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35747  fi
35748
35749  else
35750    MEMORY_SIZE=$with_memory_size
35751  fi
35752
35753
35754
35755  # Provide a decent default number of parallel jobs for make depending on
35756  # number of cores, amount of memory and machine architecture.
35757
35758# Check whether --with-jobs was given.
35759if test "${with_jobs+set}" = set; then :
35760  withval=$with_jobs;
35761fi
35762
35763  if test "x$with_jobs" = x; then
35764    # Number of jobs was not specified, calculate.
35765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35766$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35767    # Approximate memory in GB, rounding up a bit.
35768    memory_gb=`expr $MEMORY_SIZE / 1100`
35769    # Pick the lowest of memory in gb and number of cores.
35770    if test "$memory_gb" -lt "$NUM_CORES"; then
35771      JOBS="$memory_gb"
35772    else
35773      JOBS="$NUM_CORES"
35774      # On bigger machines, leave some room for other processes to run
35775      if test "$JOBS" -gt "4"; then
35776        JOBS=`expr $JOBS '*' 90 / 100`
35777      fi
35778    fi
35779    # Cap number of jobs to 16
35780    if test "$JOBS" -gt "16"; then
35781      JOBS=16
35782    fi
35783    if test "$JOBS" -eq "0"; then
35784      JOBS=1
35785    fi
35786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35787$as_echo "$JOBS" >&6; }
35788  else
35789    JOBS=$with_jobs
35790  fi
35791
35792
35793
35794# Setup smart javac (after cores and memory have been setup)
35795
35796
35797# Check whether --with-sjavac-server-java was given.
35798if test "${with_sjavac_server_java+set}" = set; then :
35799  withval=$with_sjavac_server_java;
35800fi
35801
35802
35803  if test "x$with_sjavac_server_java" != x; then
35804    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35805    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35806    if test "x$FOUND_VERSION" = x; then
35807      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35808    fi
35809  else
35810    SJAVAC_SERVER_JAVA=""
35811    # Hotspot specific options.
35812
35813  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35814  $ECHO "Command: $JAVA -verbosegc -version" >&5
35815  OUTPUT=`$JAVA -verbosegc -version 2>&1`
35816  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35817  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35818  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35819    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35820    JVM_ARG_OK=true
35821  else
35822    $ECHO "Arg failed:" >&5
35823    $ECHO "$OUTPUT" >&5
35824    JVM_ARG_OK=false
35825  fi
35826
35827    # JRockit specific options.
35828
35829  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35830  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35831  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35832  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35833  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35834  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35835    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35836    JVM_ARG_OK=true
35837  else
35838    $ECHO "Arg failed:" >&5
35839    $ECHO "$OUTPUT" >&5
35840    JVM_ARG_OK=false
35841  fi
35842
35843    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35844  fi
35845
35846
35847  if test "$MEMORY_SIZE" -gt "2500"; then
35848
35849  $ECHO "Check if jvm arg is ok: -d64" >&5
35850  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35851  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35852  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35853  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35854  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35855    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35856    JVM_ARG_OK=true
35857  else
35858    $ECHO "Arg failed:" >&5
35859    $ECHO "$OUTPUT" >&5
35860    JVM_ARG_OK=false
35861  fi
35862
35863    if test "$JVM_ARG_OK" = true; then
35864      JVM_64BIT=true
35865      JVM_ARG_OK=false
35866    fi
35867  fi
35868
35869  if test "$JVM_64BIT" = true; then
35870    if test "$MEMORY_SIZE" -gt "17000"; then
35871
35872  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35873  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35874  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35875  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35876  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35877  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35878    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35879    JVM_ARG_OK=true
35880  else
35881    $ECHO "Arg failed:" >&5
35882    $ECHO "$OUTPUT" >&5
35883    JVM_ARG_OK=false
35884  fi
35885
35886    fi
35887    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35888
35889  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35890  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35891  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35892  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35893  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35894  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35895    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35896    JVM_ARG_OK=true
35897  else
35898    $ECHO "Arg failed:" >&5
35899    $ECHO "$OUTPUT" >&5
35900    JVM_ARG_OK=false
35901  fi
35902
35903    fi
35904    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35905
35906  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35907  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35908  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35909  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35910  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35911  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35912    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35913    JVM_ARG_OK=true
35914  else
35915    $ECHO "Arg failed:" >&5
35916    $ECHO "$OUTPUT" >&5
35917    JVM_ARG_OK=false
35918  fi
35919
35920    fi
35921    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35922
35923  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35924  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35925  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35926  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35927  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35928  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35929    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35930    JVM_ARG_OK=true
35931  else
35932    $ECHO "Arg failed:" >&5
35933    $ECHO "$OUTPUT" >&5
35934    JVM_ARG_OK=false
35935  fi
35936
35937    fi
35938  fi
35939  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35940
35941  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35942  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35943  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35944  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35945  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35946  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35947    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35948    JVM_ARG_OK=true
35949  else
35950    $ECHO "Arg failed:" >&5
35951    $ECHO "$OUTPUT" >&5
35952    JVM_ARG_OK=false
35953  fi
35954
35955  fi
35956  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35957
35958  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35959  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35960  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35961  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35962  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35963  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35964    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35965    JVM_ARG_OK=true
35966  else
35967    $ECHO "Arg failed:" >&5
35968    $ECHO "$OUTPUT" >&5
35969    JVM_ARG_OK=false
35970  fi
35971
35972  fi
35973  if test "$JVM_ARG_OK" = false; then
35974
35975  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35976  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35977  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35978  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35979  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35980  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35981    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35982    JVM_ARG_OK=true
35983  else
35984    $ECHO "Arg failed:" >&5
35985    $ECHO "$OUTPUT" >&5
35986    JVM_ARG_OK=false
35987  fi
35988
35989  fi
35990
35991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
35992$as_echo_n "checking whether to use sjavac... " >&6; }
35993  # Check whether --enable-sjavac was given.
35994if test "${enable_sjavac+set}" = set; then :
35995  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
35996else
35997  ENABLE_SJAVAC='no'
35998fi
35999
36000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
36001$as_echo "$ENABLE_SJAVAC" >&6; }
36002
36003
36004  if test "x$ENABLE_SJAVAC" = xyes; then
36005    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
36006  else
36007    SJAVAC_SERVER_DIR=
36008  fi
36009
36010
36011
36012# Can the C/C++ compiler use precompiled headers?
36013
36014
36015  ###############################################################################
36016  #
36017  # Can the C/C++ compiler use precompiled headers?
36018  #
36019  # Check whether --enable-precompiled-headers was given.
36020if test "${enable_precompiled_headers+set}" = set; then :
36021  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
36022else
36023  ENABLE_PRECOMPH=yes
36024fi
36025
36026
36027  USE_PRECOMPILED_HEADER=1
36028  if test "x$ENABLE_PRECOMPH" = xno; then
36029    USE_PRECOMPILED_HEADER=0
36030  fi
36031
36032  if test "x$ENABLE_PRECOMPH" = xyes; then
36033    # Check that the compiler actually supports precomp headers.
36034    if test "x$GCC" = xyes; then
36035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
36036$as_echo_n "checking that precompiled headers work... " >&6; }
36037      echo "int alfa();" > conftest.h
36038      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
36039      if test ! -f conftest.hpp.gch; then
36040        USE_PRECOMPILED_HEADER=0
36041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36042$as_echo "no" >&6; }
36043      else
36044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36045$as_echo "yes" >&6; }
36046      fi
36047      rm -f conftest.h conftest.hpp.gch
36048    fi
36049  fi
36050
36051
36052
36053
36054# Setup use of ccache, if available
36055
36056  # Check whether --enable-ccache was given.
36057if test "${enable_ccache+set}" = set; then :
36058  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
36059else
36060  ENABLE_CCACHE=yes
36061fi
36062
36063  if test "x$ENABLE_CCACHE" = xyes; then
36064    OLD_PATH="$PATH"
36065    if test "x$TOOLS_DIR" != x; then
36066      PATH=$TOOLS_DIR:$PATH
36067    fi
36068    # Extract the first word of "ccache", so it can be a program name with args.
36069set dummy ccache; ac_word=$2
36070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36071$as_echo_n "checking for $ac_word... " >&6; }
36072if ${ac_cv_path_CCACHE+:} false; then :
36073  $as_echo_n "(cached) " >&6
36074else
36075  case $CCACHE in
36076  [\\/]* | ?:[\\/]*)
36077  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36078  ;;
36079  *)
36080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36081for as_dir in $PATH
36082do
36083  IFS=$as_save_IFS
36084  test -z "$as_dir" && as_dir=.
36085    for ac_exec_ext in '' $ac_executable_extensions; do
36086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36087    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36089    break 2
36090  fi
36091done
36092  done
36093IFS=$as_save_IFS
36094
36095  ;;
36096esac
36097fi
36098CCACHE=$ac_cv_path_CCACHE
36099if test -n "$CCACHE"; then
36100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36101$as_echo "$CCACHE" >&6; }
36102else
36103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36104$as_echo "no" >&6; }
36105fi
36106
36107
36108    PATH="$OLD_PATH"
36109  else
36110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36111$as_echo_n "checking for ccache... " >&6; }
36112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36113$as_echo "explicitly disabled" >&6; }
36114    CCACHE=
36115  fi
36116
36117
36118
36119# Check whether --with-ccache-dir was given.
36120if test "${with_ccache_dir+set}" = set; then :
36121  withval=$with_ccache_dir;
36122fi
36123
36124
36125  if test "x$with_ccache_dir" != x; then
36126    # When using a non home ccache directory, assume the use is to share ccache files
36127    # with other users. Thus change the umask.
36128    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36129  fi
36130  CCACHE_FOUND=""
36131  if test "x$CCACHE" != x; then
36132
36133  if test "x$CCACHE" != x; then
36134    CCACHE_FOUND="true"
36135    # Only use ccache if it is 3.1.4 or later, which supports
36136    # precompiled headers.
36137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36138$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36139    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36140    if test "x$HAS_GOOD_CCACHE" = x; then
36141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36142$as_echo "no, disabling ccache" >&6; }
36143      CCACHE=
36144    else
36145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36146$as_echo "yes" >&6; }
36147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36148$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36149      PUSHED_FLAGS="$CXXFLAGS"
36150      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36151      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36152/* end confdefs.h.  */
36153
36154int
36155main ()
36156{
36157
36158  ;
36159  return 0;
36160}
36161_ACEOF
36162if ac_fn_cxx_try_compile "$LINENO"; then :
36163  CC_KNOWS_CCACHE_TRICK=yes
36164else
36165  CC_KNOWS_CCACHE_TRICK=no
36166fi
36167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36168      CXXFLAGS="$PUSHED_FLAGS"
36169      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36171$as_echo "yes" >&6; }
36172      else
36173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36174$as_echo "no, disabling ccaching of precompiled headers" >&6; }
36175        CCACHE=
36176      fi
36177    fi
36178  fi
36179
36180  if test "x$CCACHE" != x; then
36181    CCACHE_SLOPPINESS=time_macros
36182    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36183    CCACHE_FLAGS=-fpch-preprocess
36184
36185    if test "x$SET_CCACHE_DIR" != x; then
36186      mkdir -p $CCACHE_DIR > /dev/null 2>&1
36187      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36188    fi
36189  fi
36190
36191  fi
36192
36193
36194###############################################################################
36195#
36196# And now the finish...
36197#
36198###############################################################################
36199
36200# Check for some common pitfalls
36201
36202  if test x"$OPENJDK_BUILD_OS" = xwindows; then
36203    file_to_test="$SRC_ROOT/LICENSE"
36204    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36205      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
36206    fi
36207  fi
36208
36209
36210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36211$as_echo_n "checking if build directory is on local disk... " >&6; }
36212
36213  # df -l lists only local disks; if the given directory is not found then
36214  # a non-zero exit code is given
36215  if test "x$DF" = x; then
36216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36217      # msys does not have df; use Windows "net use" instead.
36218      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36219      if test "x$IS_NETWORK_DISK" = x; then
36220        OUTPUT_DIR_IS_LOCAL="yes"
36221      else
36222        OUTPUT_DIR_IS_LOCAL="no"
36223      fi
36224    else
36225      # No df here, say it's local
36226      OUTPUT_DIR_IS_LOCAL="yes"
36227    fi
36228  else
36229    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36230      OUTPUT_DIR_IS_LOCAL="yes"
36231    else
36232      OUTPUT_DIR_IS_LOCAL="no"
36233    fi
36234  fi
36235
36236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36237$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36238
36239
36240
36241  # Check if the user has any old-style ALT_ variables set.
36242  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36243
36244  # Before generating output files, test if they exist. If they do, this is a reconfigure.
36245  # Since we can't properly handle the dependencies for this, warn the user about the situation
36246  if test -e $OUTPUT_ROOT/spec.gmk; then
36247    IS_RECONFIGURE=yes
36248  else
36249    IS_RECONFIGURE=no
36250  fi
36251
36252  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36253    HIDE_PERFORMANCE_HINTS=yes
36254  else
36255    HIDE_PERFORMANCE_HINTS=no
36256    # Hide it the next time around...
36257    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36258  fi
36259
36260
36261# At the end, call the custom hook. (Dummy macro if no custom sources available)
36262
36263
36264# We're messing a bit with internal autoconf variables to put the config.status
36265# in the output directory instead of the current directory.
36266CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36267
36268# Create the actual output files. Now the main work of configure is done.
36269cat >confcache <<\_ACEOF
36270# This file is a shell script that caches the results of configure
36271# tests run on this system so they can be shared between configure
36272# scripts and configure runs, see configure's option --config-cache.
36273# It is not useful on other systems.  If it contains results you don't
36274# want to keep, you may remove or edit it.
36275#
36276# config.status only pays attention to the cache file if you give it
36277# the --recheck option to rerun configure.
36278#
36279# `ac_cv_env_foo' variables (set or unset) will be overridden when
36280# loading this file, other *unset* `ac_cv_foo' will be assigned the
36281# following values.
36282
36283_ACEOF
36284
36285# The following way of writing the cache mishandles newlines in values,
36286# but we know of no workaround that is simple, portable, and efficient.
36287# So, we kill variables containing newlines.
36288# Ultrix sh set writes to stderr and can't be redirected directly,
36289# and sets the high bit in the cache file unless we assign to the vars.
36290(
36291  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36292    eval ac_val=\$$ac_var
36293    case $ac_val in #(
36294    *${as_nl}*)
36295      case $ac_var in #(
36296      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36297$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36298      esac
36299      case $ac_var in #(
36300      _ | IFS | as_nl) ;; #(
36301      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36302      *) { eval $ac_var=; unset $ac_var;} ;;
36303      esac ;;
36304    esac
36305  done
36306
36307  (set) 2>&1 |
36308    case $as_nl`(ac_space=' '; set) 2>&1` in #(
36309    *${as_nl}ac_space=\ *)
36310      # `set' does not quote correctly, so add quotes: double-quote
36311      # substitution turns \\\\ into \\, and sed turns \\ into \.
36312      sed -n \
36313	"s/'/'\\\\''/g;
36314	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36315      ;; #(
36316    *)
36317      # `set' quotes correctly as required by POSIX, so do not add quotes.
36318      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36319      ;;
36320    esac |
36321    sort
36322) |
36323  sed '
36324     /^ac_cv_env_/b end
36325     t clear
36326     :clear
36327     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36328     t end
36329     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36330     :end' >>confcache
36331if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36332  if test -w "$cache_file"; then
36333    if test "x$cache_file" != "x/dev/null"; then
36334      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36335$as_echo "$as_me: updating cache $cache_file" >&6;}
36336      if test ! -f "$cache_file" || test -h "$cache_file"; then
36337	cat confcache >"$cache_file"
36338      else
36339        case $cache_file in #(
36340        */* | ?:*)
36341	  mv -f confcache "$cache_file"$$ &&
36342	  mv -f "$cache_file"$$ "$cache_file" ;; #(
36343        *)
36344	  mv -f confcache "$cache_file" ;;
36345	esac
36346      fi
36347    fi
36348  else
36349    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36350$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36351  fi
36352fi
36353rm -f confcache
36354
36355test "x$prefix" = xNONE && prefix=$ac_default_prefix
36356# Let make expand exec_prefix.
36357test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36358
36359DEFS=-DHAVE_CONFIG_H
36360
36361ac_libobjs=
36362ac_ltlibobjs=
36363U=
36364for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36365  # 1. Remove the extension, and $U if already installed.
36366  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36367  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36368  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36369  #    will be set to the directory where LIBOBJS objects are built.
36370  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36371  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36372done
36373LIBOBJS=$ac_libobjs
36374
36375LTLIBOBJS=$ac_ltlibobjs
36376
36377
36378
36379: "${CONFIG_STATUS=./config.status}"
36380ac_write_fail=0
36381ac_clean_files_save=$ac_clean_files
36382ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36383{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36384$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36385as_write_fail=0
36386cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36387#! $SHELL
36388# Generated by $as_me.
36389# Run this file to recreate the current configuration.
36390# Compiler output produced by configure, useful for debugging
36391# configure, is in config.log if it exists.
36392
36393debug=false
36394ac_cs_recheck=false
36395ac_cs_silent=false
36396
36397SHELL=\${CONFIG_SHELL-$SHELL}
36398export SHELL
36399_ASEOF
36400cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36401## -------------------- ##
36402## M4sh Initialization. ##
36403## -------------------- ##
36404
36405# Be more Bourne compatible
36406DUALCASE=1; export DUALCASE # for MKS sh
36407if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36408  emulate sh
36409  NULLCMD=:
36410  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36411  # is contrary to our usage.  Disable this feature.
36412  alias -g '${1+"$@"}'='"$@"'
36413  setopt NO_GLOB_SUBST
36414else
36415  case `(set -o) 2>/dev/null` in #(
36416  *posix*) :
36417    set -o posix ;; #(
36418  *) :
36419     ;;
36420esac
36421fi
36422
36423
36424as_nl='
36425'
36426export as_nl
36427# Printing a long string crashes Solaris 7 /usr/bin/printf.
36428as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36429as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36430as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36431# Prefer a ksh shell builtin over an external printf program on Solaris,
36432# but without wasting forks for bash or zsh.
36433if test -z "$BASH_VERSION$ZSH_VERSION" \
36434    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36435  as_echo='print -r --'
36436  as_echo_n='print -rn --'
36437elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36438  as_echo='printf %s\n'
36439  as_echo_n='printf %s'
36440else
36441  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36442    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36443    as_echo_n='/usr/ucb/echo -n'
36444  else
36445    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36446    as_echo_n_body='eval
36447      arg=$1;
36448      case $arg in #(
36449      *"$as_nl"*)
36450	expr "X$arg" : "X\\(.*\\)$as_nl";
36451	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36452      esac;
36453      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36454    '
36455    export as_echo_n_body
36456    as_echo_n='sh -c $as_echo_n_body as_echo'
36457  fi
36458  export as_echo_body
36459  as_echo='sh -c $as_echo_body as_echo'
36460fi
36461
36462# The user is always right.
36463if test "${PATH_SEPARATOR+set}" != set; then
36464  PATH_SEPARATOR=:
36465  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36466    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36467      PATH_SEPARATOR=';'
36468  }
36469fi
36470
36471
36472# IFS
36473# We need space, tab and new line, in precisely that order.  Quoting is
36474# there to prevent editors from complaining about space-tab.
36475# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36476# splitting by setting IFS to empty value.)
36477IFS=" ""	$as_nl"
36478
36479# Find who we are.  Look in the path if we contain no directory separator.
36480as_myself=
36481case $0 in #((
36482  *[\\/]* ) as_myself=$0 ;;
36483  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36484for as_dir in $PATH
36485do
36486  IFS=$as_save_IFS
36487  test -z "$as_dir" && as_dir=.
36488    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36489  done
36490IFS=$as_save_IFS
36491
36492     ;;
36493esac
36494# We did not find ourselves, most probably we were run as `sh COMMAND'
36495# in which case we are not to be found in the path.
36496if test "x$as_myself" = x; then
36497  as_myself=$0
36498fi
36499if test ! -f "$as_myself"; then
36500  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36501  exit 1
36502fi
36503
36504# Unset variables that we do not need and which cause bugs (e.g. in
36505# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36506# suppresses any "Segmentation fault" message there.  '((' could
36507# trigger a bug in pdksh 5.2.14.
36508for as_var in BASH_ENV ENV MAIL MAILPATH
36509do eval test x\${$as_var+set} = xset \
36510  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36511done
36512PS1='$ '
36513PS2='> '
36514PS4='+ '
36515
36516# NLS nuisances.
36517LC_ALL=C
36518export LC_ALL
36519LANGUAGE=C
36520export LANGUAGE
36521
36522# CDPATH.
36523(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36524
36525
36526# as_fn_error STATUS ERROR [LINENO LOG_FD]
36527# ----------------------------------------
36528# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36529# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36530# script with STATUS, using 1 if that was 0.
36531as_fn_error ()
36532{
36533  as_status=$1; test $as_status -eq 0 && as_status=1
36534  if test "$4"; then
36535    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36536    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36537  fi
36538  $as_echo "$as_me: error: $2" >&2
36539  as_fn_exit $as_status
36540} # as_fn_error
36541
36542
36543# as_fn_set_status STATUS
36544# -----------------------
36545# Set $? to STATUS, without forking.
36546as_fn_set_status ()
36547{
36548  return $1
36549} # as_fn_set_status
36550
36551# as_fn_exit STATUS
36552# -----------------
36553# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36554as_fn_exit ()
36555{
36556  set +e
36557  as_fn_set_status $1
36558  exit $1
36559} # as_fn_exit
36560
36561# as_fn_unset VAR
36562# ---------------
36563# Portably unset VAR.
36564as_fn_unset ()
36565{
36566  { eval $1=; unset $1;}
36567}
36568as_unset=as_fn_unset
36569# as_fn_append VAR VALUE
36570# ----------------------
36571# Append the text in VALUE to the end of the definition contained in VAR. Take
36572# advantage of any shell optimizations that allow amortized linear growth over
36573# repeated appends, instead of the typical quadratic growth present in naive
36574# implementations.
36575if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36576  eval 'as_fn_append ()
36577  {
36578    eval $1+=\$2
36579  }'
36580else
36581  as_fn_append ()
36582  {
36583    eval $1=\$$1\$2
36584  }
36585fi # as_fn_append
36586
36587# as_fn_arith ARG...
36588# ------------------
36589# Perform arithmetic evaluation on the ARGs, and store the result in the
36590# global $as_val. Take advantage of shells that can avoid forks. The arguments
36591# must be portable across $(()) and expr.
36592if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36593  eval 'as_fn_arith ()
36594  {
36595    as_val=$(( $* ))
36596  }'
36597else
36598  as_fn_arith ()
36599  {
36600    as_val=`expr "$@" || test $? -eq 1`
36601  }
36602fi # as_fn_arith
36603
36604
36605if expr a : '\(a\)' >/dev/null 2>&1 &&
36606   test "X`expr 00001 : '.*\(...\)'`" = X001; then
36607  as_expr=expr
36608else
36609  as_expr=false
36610fi
36611
36612if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36613  as_basename=basename
36614else
36615  as_basename=false
36616fi
36617
36618if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36619  as_dirname=dirname
36620else
36621  as_dirname=false
36622fi
36623
36624as_me=`$as_basename -- "$0" ||
36625$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36626	 X"$0" : 'X\(//\)$' \| \
36627	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36628$as_echo X/"$0" |
36629    sed '/^.*\/\([^/][^/]*\)\/*$/{
36630	    s//\1/
36631	    q
36632	  }
36633	  /^X\/\(\/\/\)$/{
36634	    s//\1/
36635	    q
36636	  }
36637	  /^X\/\(\/\).*/{
36638	    s//\1/
36639	    q
36640	  }
36641	  s/.*/./; q'`
36642
36643# Avoid depending upon Character Ranges.
36644as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36645as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36646as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36647as_cr_digits='0123456789'
36648as_cr_alnum=$as_cr_Letters$as_cr_digits
36649
36650ECHO_C= ECHO_N= ECHO_T=
36651case `echo -n x` in #(((((
36652-n*)
36653  case `echo 'xy\c'` in
36654  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
36655  xy)  ECHO_C='\c';;
36656  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36657       ECHO_T='	';;
36658  esac;;
36659*)
36660  ECHO_N='-n';;
36661esac
36662
36663rm -f conf$$ conf$$.exe conf$$.file
36664if test -d conf$$.dir; then
36665  rm -f conf$$.dir/conf$$.file
36666else
36667  rm -f conf$$.dir
36668  mkdir conf$$.dir 2>/dev/null
36669fi
36670if (echo >conf$$.file) 2>/dev/null; then
36671  if ln -s conf$$.file conf$$ 2>/dev/null; then
36672    as_ln_s='ln -s'
36673    # ... but there are two gotchas:
36674    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36675    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36676    # In both cases, we have to default to `cp -pR'.
36677    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36678      as_ln_s='cp -pR'
36679  elif ln conf$$.file conf$$ 2>/dev/null; then
36680    as_ln_s=ln
36681  else
36682    as_ln_s='cp -pR'
36683  fi
36684else
36685  as_ln_s='cp -pR'
36686fi
36687rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36688rmdir conf$$.dir 2>/dev/null
36689
36690
36691# as_fn_mkdir_p
36692# -------------
36693# Create "$as_dir" as a directory, including parents if necessary.
36694as_fn_mkdir_p ()
36695{
36696
36697  case $as_dir in #(
36698  -*) as_dir=./$as_dir;;
36699  esac
36700  test -d "$as_dir" || eval $as_mkdir_p || {
36701    as_dirs=
36702    while :; do
36703      case $as_dir in #(
36704      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36705      *) as_qdir=$as_dir;;
36706      esac
36707      as_dirs="'$as_qdir' $as_dirs"
36708      as_dir=`$as_dirname -- "$as_dir" ||
36709$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36710	 X"$as_dir" : 'X\(//\)[^/]' \| \
36711	 X"$as_dir" : 'X\(//\)$' \| \
36712	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36713$as_echo X"$as_dir" |
36714    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36715	    s//\1/
36716	    q
36717	  }
36718	  /^X\(\/\/\)[^/].*/{
36719	    s//\1/
36720	    q
36721	  }
36722	  /^X\(\/\/\)$/{
36723	    s//\1/
36724	    q
36725	  }
36726	  /^X\(\/\).*/{
36727	    s//\1/
36728	    q
36729	  }
36730	  s/.*/./; q'`
36731      test -d "$as_dir" && break
36732    done
36733    test -z "$as_dirs" || eval "mkdir $as_dirs"
36734  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36735
36736
36737} # as_fn_mkdir_p
36738if mkdir -p . 2>/dev/null; then
36739  as_mkdir_p='mkdir -p "$as_dir"'
36740else
36741  test -d ./-p && rmdir ./-p
36742  as_mkdir_p=false
36743fi
36744
36745
36746# as_fn_executable_p FILE
36747# -----------------------
36748# Test if FILE is an executable regular file.
36749as_fn_executable_p ()
36750{
36751  test -f "$1" && test -x "$1"
36752} # as_fn_executable_p
36753as_test_x='test -x'
36754as_executable_p=as_fn_executable_p
36755
36756# Sed expression to map a string onto a valid CPP name.
36757as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36758
36759# Sed expression to map a string onto a valid variable name.
36760as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36761
36762
36763exec 6>&1
36764## ----------------------------------- ##
36765## Main body of $CONFIG_STATUS script. ##
36766## ----------------------------------- ##
36767_ASEOF
36768test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36769
36770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36771# Save the log message, to keep $0 and so on meaningful, and to
36772# report actual input values of CONFIG_FILES etc. instead of their
36773# values after options handling.
36774ac_log="
36775This file was extended by OpenJDK $as_me jdk8, which was
36776generated by GNU Autoconf 2.69.  Invocation command line was
36777
36778  CONFIG_FILES    = $CONFIG_FILES
36779  CONFIG_HEADERS  = $CONFIG_HEADERS
36780  CONFIG_LINKS    = $CONFIG_LINKS
36781  CONFIG_COMMANDS = $CONFIG_COMMANDS
36782  $ $0 $@
36783
36784on `(hostname || uname -n) 2>/dev/null | sed 1q`
36785"
36786
36787_ACEOF
36788
36789case $ac_config_files in *"
36790"*) set x $ac_config_files; shift; ac_config_files=$*;;
36791esac
36792
36793case $ac_config_headers in *"
36794"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36795esac
36796
36797
36798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36799# Files that config.status was made for.
36800config_files="$ac_config_files"
36801config_headers="$ac_config_headers"
36802
36803_ACEOF
36804
36805cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36806ac_cs_usage="\
36807\`$as_me' instantiates files and other configuration actions
36808from templates according to the current configuration.  Unless the files
36809and actions are specified as TAGs, all are instantiated by default.
36810
36811Usage: $0 [OPTION]... [TAG]...
36812
36813  -h, --help       print this help, then exit
36814  -V, --version    print version number and configuration settings, then exit
36815      --config     print configuration, then exit
36816  -q, --quiet, --silent
36817                   do not print progress messages
36818  -d, --debug      don't remove temporary files
36819      --recheck    update $as_me by reconfiguring in the same conditions
36820      --file=FILE[:TEMPLATE]
36821                   instantiate the configuration file FILE
36822      --header=FILE[:TEMPLATE]
36823                   instantiate the configuration header FILE
36824
36825Configuration files:
36826$config_files
36827
36828Configuration headers:
36829$config_headers
36830
36831Report bugs to <build-dev@openjdk.java.net>.
36832OpenJDK home page: <http://openjdk.java.net>."
36833
36834_ACEOF
36835cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36836ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36837ac_cs_version="\\
36838OpenJDK config.status jdk8
36839configured by $0, generated by GNU Autoconf 2.69,
36840  with options \\"\$ac_cs_config\\"
36841
36842Copyright (C) 2012 Free Software Foundation, Inc.
36843This config.status script is free software; the Free Software Foundation
36844gives unlimited permission to copy, distribute and modify it."
36845
36846ac_pwd='$ac_pwd'
36847srcdir='$srcdir'
36848AWK='$AWK'
36849test -n "\$AWK" || AWK=awk
36850_ACEOF
36851
36852cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36853# The default lists apply if the user does not specify any file.
36854ac_need_defaults=:
36855while test $# != 0
36856do
36857  case $1 in
36858  --*=?*)
36859    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36860    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36861    ac_shift=:
36862    ;;
36863  --*=)
36864    ac_option=`expr "X$1" : 'X\([^=]*\)='`
36865    ac_optarg=
36866    ac_shift=:
36867    ;;
36868  *)
36869    ac_option=$1
36870    ac_optarg=$2
36871    ac_shift=shift
36872    ;;
36873  esac
36874
36875  case $ac_option in
36876  # Handling of the options.
36877  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36878    ac_cs_recheck=: ;;
36879  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36880    $as_echo "$ac_cs_version"; exit ;;
36881  --config | --confi | --conf | --con | --co | --c )
36882    $as_echo "$ac_cs_config"; exit ;;
36883  --debug | --debu | --deb | --de | --d | -d )
36884    debug=: ;;
36885  --file | --fil | --fi | --f )
36886    $ac_shift
36887    case $ac_optarg in
36888    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36889    '') as_fn_error $? "missing file argument" ;;
36890    esac
36891    as_fn_append CONFIG_FILES " '$ac_optarg'"
36892    ac_need_defaults=false;;
36893  --header | --heade | --head | --hea )
36894    $ac_shift
36895    case $ac_optarg in
36896    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36897    esac
36898    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36899    ac_need_defaults=false;;
36900  --he | --h)
36901    # Conflict between --help and --header
36902    as_fn_error $? "ambiguous option: \`$1'
36903Try \`$0 --help' for more information.";;
36904  --help | --hel | -h )
36905    $as_echo "$ac_cs_usage"; exit ;;
36906  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36907  | -silent | --silent | --silen | --sile | --sil | --si | --s)
36908    ac_cs_silent=: ;;
36909
36910  # This is an error.
36911  -*) as_fn_error $? "unrecognized option: \`$1'
36912Try \`$0 --help' for more information." ;;
36913
36914  *) as_fn_append ac_config_targets " $1"
36915     ac_need_defaults=false ;;
36916
36917  esac
36918  shift
36919done
36920
36921ac_configure_extra_args=
36922
36923if $ac_cs_silent; then
36924  exec 6>/dev/null
36925  ac_configure_extra_args="$ac_configure_extra_args --silent"
36926fi
36927
36928_ACEOF
36929cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36930if \$ac_cs_recheck; then
36931  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36932  shift
36933  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36934  CONFIG_SHELL='$SHELL'
36935  export CONFIG_SHELL
36936  exec "\$@"
36937fi
36938
36939_ACEOF
36940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36941exec 5>>config.log
36942{
36943  echo
36944  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36945## Running $as_me. ##
36946_ASBOX
36947  $as_echo "$ac_log"
36948} >&5
36949
36950_ACEOF
36951cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36952_ACEOF
36953
36954cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36955
36956# Handling of arguments.
36957for ac_config_target in $ac_config_targets
36958do
36959  case $ac_config_target in
36960    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36961    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36962    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36963    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36964    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36965    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36966    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36967
36968  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36969  esac
36970done
36971
36972
36973# If the user did not use the arguments to specify the items to instantiate,
36974# then the envvar interface is used.  Set only those that are not.
36975# We use the long form for the default assignment because of an extremely
36976# bizarre bug on SunOS 4.1.3.
36977if $ac_need_defaults; then
36978  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36979  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36980fi
36981
36982# Have a temporary directory for convenience.  Make it in the build tree
36983# simply because there is no reason against having it here, and in addition,
36984# creating and moving files from /tmp can sometimes cause problems.
36985# Hook for its removal unless debugging.
36986# Note that there is a small window in which the directory will not be cleaned:
36987# after its creation but before its name has been assigned to `$tmp'.
36988$debug ||
36989{
36990  tmp= ac_tmp=
36991  trap 'exit_status=$?
36992  : "${ac_tmp:=$tmp}"
36993  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36994' 0
36995  trap 'as_fn_exit 1' 1 2 13 15
36996}
36997# Create a (secure) tmp directory for tmp files.
36998
36999{
37000  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37001  test -d "$tmp"
37002}  ||
37003{
37004  tmp=./conf$$-$RANDOM
37005  (umask 077 && mkdir "$tmp")
37006} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37007ac_tmp=$tmp
37008
37009# Set up the scripts for CONFIG_FILES section.
37010# No need to generate them if there are no CONFIG_FILES.
37011# This happens for instance with `./config.status config.h'.
37012if test -n "$CONFIG_FILES"; then
37013
37014
37015ac_cr=`echo X | tr X '\015'`
37016# On cygwin, bash can eat \r inside `` if the user requested igncr.
37017# But we know of no other shell where ac_cr would be empty at this
37018# point, so we can use a bashism as a fallback.
37019if test "x$ac_cr" = x; then
37020  eval ac_cr=\$\'\\r\'
37021fi
37022ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37023if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37024  ac_cs_awk_cr='\\r'
37025else
37026  ac_cs_awk_cr=$ac_cr
37027fi
37028
37029echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37030_ACEOF
37031
37032
37033{
37034  echo "cat >conf$$subs.awk <<_ACEOF" &&
37035  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37036  echo "_ACEOF"
37037} >conf$$subs.sh ||
37038  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37039ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37040ac_delim='%!_!# '
37041for ac_last_try in false false false false false :; do
37042  . ./conf$$subs.sh ||
37043    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37044
37045  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37046  if test $ac_delim_n = $ac_delim_num; then
37047    break
37048  elif $ac_last_try; then
37049    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37050  else
37051    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37052  fi
37053done
37054rm -f conf$$subs.sh
37055
37056cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37057cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37058_ACEOF
37059sed -n '
37060h
37061s/^/S["/; s/!.*/"]=/
37062p
37063g
37064s/^[^!]*!//
37065:repl
37066t repl
37067s/'"$ac_delim"'$//
37068t delim
37069:nl
37070h
37071s/\(.\{148\}\)..*/\1/
37072t more1
37073s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37074p
37075n
37076b repl
37077:more1
37078s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37079p
37080g
37081s/.\{148\}//
37082t nl
37083:delim
37084h
37085s/\(.\{148\}\)..*/\1/
37086t more2
37087s/["\\]/\\&/g; s/^/"/; s/$/"/
37088p
37089b
37090:more2
37091s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37092p
37093g
37094s/.\{148\}//
37095t delim
37096' <conf$$subs.awk | sed '
37097/^[^""]/{
37098  N
37099  s/\n//
37100}
37101' >>$CONFIG_STATUS || ac_write_fail=1
37102rm -f conf$$subs.awk
37103cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37104_ACAWK
37105cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37106  for (key in S) S_is_set[key] = 1
37107  FS = ""
37108
37109}
37110{
37111  line = $ 0
37112  nfields = split(line, field, "@")
37113  substed = 0
37114  len = length(field[1])
37115  for (i = 2; i < nfields; i++) {
37116    key = field[i]
37117    keylen = length(key)
37118    if (S_is_set[key]) {
37119      value = S[key]
37120      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37121      len += length(value) + length(field[++i])
37122      substed = 1
37123    } else
37124      len += 1 + keylen
37125  }
37126
37127  print line
37128}
37129
37130_ACAWK
37131_ACEOF
37132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37133if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37134  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37135else
37136  cat
37137fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37138  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37139_ACEOF
37140
37141# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37142# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37143# trailing colons and then remove the whole line if VPATH becomes empty
37144# (actually we leave an empty line to preserve line numbers).
37145if test "x$srcdir" = x.; then
37146  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
37147h
37148s///
37149s/^/:/
37150s/[	 ]*$/:/
37151s/:\$(srcdir):/:/g
37152s/:\${srcdir}:/:/g
37153s/:@srcdir@:/:/g
37154s/^:*//
37155s/:*$//
37156x
37157s/\(=[	 ]*\).*/\1/
37158G
37159s/\n//
37160s/^[^=]*=[	 ]*$//
37161}'
37162fi
37163
37164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37165fi # test -n "$CONFIG_FILES"
37166
37167# Set up the scripts for CONFIG_HEADERS section.
37168# No need to generate them if there are no CONFIG_HEADERS.
37169# This happens for instance with `./config.status Makefile'.
37170if test -n "$CONFIG_HEADERS"; then
37171cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37172BEGIN {
37173_ACEOF
37174
37175# Transform confdefs.h into an awk script `defines.awk', embedded as
37176# here-document in config.status, that substitutes the proper values into
37177# config.h.in to produce config.h.
37178
37179# Create a delimiter string that does not exist in confdefs.h, to ease
37180# handling of long lines.
37181ac_delim='%!_!# '
37182for ac_last_try in false false :; do
37183  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37184  if test -z "$ac_tt"; then
37185    break
37186  elif $ac_last_try; then
37187    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37188  else
37189    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37190  fi
37191done
37192
37193# For the awk script, D is an array of macro values keyed by name,
37194# likewise P contains macro parameters if any.  Preserve backslash
37195# newline sequences.
37196
37197ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37198sed -n '
37199s/.\{148\}/&'"$ac_delim"'/g
37200t rset
37201:rset
37202s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
37203t def
37204d
37205:def
37206s/\\$//
37207t bsnl
37208s/["\\]/\\&/g
37209s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37210D["\1"]=" \3"/p
37211s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
37212d
37213:bsnl
37214s/["\\]/\\&/g
37215s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
37216D["\1"]=" \3\\\\\\n"\\/p
37217t cont
37218s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37219t cont
37220d
37221:cont
37222n
37223s/.\{148\}/&'"$ac_delim"'/g
37224t clear
37225:clear
37226s/\\$//
37227t bsnlc
37228s/["\\]/\\&/g; s/^/"/; s/$/"/p
37229d
37230:bsnlc
37231s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37232b cont
37233' <confdefs.h | sed '
37234s/'"$ac_delim"'/"\\\
37235"/g' >>$CONFIG_STATUS || ac_write_fail=1
37236
37237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37238  for (key in D) D_is_set[key] = 1
37239  FS = ""
37240}
37241/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37242  line = \$ 0
37243  split(line, arg, " ")
37244  if (arg[1] == "#") {
37245    defundef = arg[2]
37246    mac1 = arg[3]
37247  } else {
37248    defundef = substr(arg[1], 2)
37249    mac1 = arg[2]
37250  }
37251  split(mac1, mac2, "(") #)
37252  macro = mac2[1]
37253  prefix = substr(line, 1, index(line, defundef) - 1)
37254  if (D_is_set[macro]) {
37255    # Preserve the white space surrounding the "#".
37256    print prefix "define", macro P[macro] D[macro]
37257    next
37258  } else {
37259    # Replace #undef with comments.  This is necessary, for example,
37260    # in the case of _POSIX_SOURCE, which is predefined and required
37261    # on some systems where configure will not decide to define it.
37262    if (defundef == "undef") {
37263      print "/*", prefix defundef, macro, "*/"
37264      next
37265    }
37266  }
37267}
37268{ print }
37269_ACAWK
37270_ACEOF
37271cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37272  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37273fi # test -n "$CONFIG_HEADERS"
37274
37275
37276eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37277shift
37278for ac_tag
37279do
37280  case $ac_tag in
37281  :[FHLC]) ac_mode=$ac_tag; continue;;
37282  esac
37283  case $ac_mode$ac_tag in
37284  :[FHL]*:*);;
37285  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37286  :[FH]-) ac_tag=-:-;;
37287  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37288  esac
37289  ac_save_IFS=$IFS
37290  IFS=:
37291  set x $ac_tag
37292  IFS=$ac_save_IFS
37293  shift
37294  ac_file=$1
37295  shift
37296
37297  case $ac_mode in
37298  :L) ac_source=$1;;
37299  :[FH])
37300    ac_file_inputs=
37301    for ac_f
37302    do
37303      case $ac_f in
37304      -) ac_f="$ac_tmp/stdin";;
37305      *) # Look for the file first in the build tree, then in the source tree
37306	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
37307	 # because $ac_f cannot contain `:'.
37308	 test -f "$ac_f" ||
37309	   case $ac_f in
37310	   [\\/$]*) false;;
37311	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37312	   esac ||
37313	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37314      esac
37315      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37316      as_fn_append ac_file_inputs " '$ac_f'"
37317    done
37318
37319    # Let's still pretend it is `configure' which instantiates (i.e., don't
37320    # use $as_me), people would be surprised to read:
37321    #    /* config.h.  Generated by config.status.  */
37322    configure_input='Generated from '`
37323	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37324	`' by configure.'
37325    if test x"$ac_file" != x-; then
37326      configure_input="$ac_file.  $configure_input"
37327      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37328$as_echo "$as_me: creating $ac_file" >&6;}
37329    fi
37330    # Neutralize special characters interpreted by sed in replacement strings.
37331    case $configure_input in #(
37332    *\&* | *\|* | *\\* )
37333       ac_sed_conf_input=`$as_echo "$configure_input" |
37334       sed 's/[\\\\&|]/\\\\&/g'`;; #(
37335    *) ac_sed_conf_input=$configure_input;;
37336    esac
37337
37338    case $ac_tag in
37339    *:-:* | *:-) cat >"$ac_tmp/stdin" \
37340      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37341    esac
37342    ;;
37343  esac
37344
37345  ac_dir=`$as_dirname -- "$ac_file" ||
37346$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37347	 X"$ac_file" : 'X\(//\)[^/]' \| \
37348	 X"$ac_file" : 'X\(//\)$' \| \
37349	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37350$as_echo X"$ac_file" |
37351    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37352	    s//\1/
37353	    q
37354	  }
37355	  /^X\(\/\/\)[^/].*/{
37356	    s//\1/
37357	    q
37358	  }
37359	  /^X\(\/\/\)$/{
37360	    s//\1/
37361	    q
37362	  }
37363	  /^X\(\/\).*/{
37364	    s//\1/
37365	    q
37366	  }
37367	  s/.*/./; q'`
37368  as_dir="$ac_dir"; as_fn_mkdir_p
37369  ac_builddir=.
37370
37371case "$ac_dir" in
37372.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37373*)
37374  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37375  # A ".." for each directory in $ac_dir_suffix.
37376  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37377  case $ac_top_builddir_sub in
37378  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37379  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37380  esac ;;
37381esac
37382ac_abs_top_builddir=$ac_pwd
37383ac_abs_builddir=$ac_pwd$ac_dir_suffix
37384# for backward compatibility:
37385ac_top_builddir=$ac_top_build_prefix
37386
37387case $srcdir in
37388  .)  # We are building in place.
37389    ac_srcdir=.
37390    ac_top_srcdir=$ac_top_builddir_sub
37391    ac_abs_top_srcdir=$ac_pwd ;;
37392  [\\/]* | ?:[\\/]* )  # Absolute name.
37393    ac_srcdir=$srcdir$ac_dir_suffix;
37394    ac_top_srcdir=$srcdir
37395    ac_abs_top_srcdir=$srcdir ;;
37396  *) # Relative name.
37397    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37398    ac_top_srcdir=$ac_top_build_prefix$srcdir
37399    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37400esac
37401ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37402
37403
37404  case $ac_mode in
37405  :F)
37406  #
37407  # CONFIG_FILE
37408  #
37409
37410_ACEOF
37411
37412cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37413# If the template does not know about datarootdir, expand it.
37414# FIXME: This hack should be removed a few years after 2.60.
37415ac_datarootdir_hack=; ac_datarootdir_seen=
37416ac_sed_dataroot='
37417/datarootdir/ {
37418  p
37419  q
37420}
37421/@datadir@/p
37422/@docdir@/p
37423/@infodir@/p
37424/@localedir@/p
37425/@mandir@/p'
37426case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37427*datarootdir*) ac_datarootdir_seen=yes;;
37428*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37429  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37430$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37431_ACEOF
37432cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37433  ac_datarootdir_hack='
37434  s&@datadir@&$datadir&g
37435  s&@docdir@&$docdir&g
37436  s&@infodir@&$infodir&g
37437  s&@localedir@&$localedir&g
37438  s&@mandir@&$mandir&g
37439  s&\\\${datarootdir}&$datarootdir&g' ;;
37440esac
37441_ACEOF
37442
37443# Neutralize VPATH when `$srcdir' = `.'.
37444# Shell code in configure.ac might set extrasub.
37445# FIXME: do we really want to maintain this feature?
37446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37447ac_sed_extra="$ac_vpsub
37448$extrasub
37449_ACEOF
37450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37451:t
37452/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37453s|@configure_input@|$ac_sed_conf_input|;t t
37454s&@top_builddir@&$ac_top_builddir_sub&;t t
37455s&@top_build_prefix@&$ac_top_build_prefix&;t t
37456s&@srcdir@&$ac_srcdir&;t t
37457s&@abs_srcdir@&$ac_abs_srcdir&;t t
37458s&@top_srcdir@&$ac_top_srcdir&;t t
37459s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37460s&@builddir@&$ac_builddir&;t t
37461s&@abs_builddir@&$ac_abs_builddir&;t t
37462s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37463$ac_datarootdir_hack
37464"
37465eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37466  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37467
37468test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37469  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37470  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
37471      "$ac_tmp/out"`; test -z "$ac_out"; } &&
37472  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37473which seems to be undefined.  Please make sure it is defined" >&5
37474$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37475which seems to be undefined.  Please make sure it is defined" >&2;}
37476
37477  rm -f "$ac_tmp/stdin"
37478  case $ac_file in
37479  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37480  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37481  esac \
37482  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37483 ;;
37484  :H)
37485  #
37486  # CONFIG_HEADER
37487  #
37488  if test x"$ac_file" != x-; then
37489    {
37490      $as_echo "/* $configure_input  */" \
37491      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37492    } >"$ac_tmp/config.h" \
37493      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37494    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37495      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37496$as_echo "$as_me: $ac_file is unchanged" >&6;}
37497    else
37498      rm -f "$ac_file"
37499      mv "$ac_tmp/config.h" "$ac_file" \
37500	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
37501    fi
37502  else
37503    $as_echo "/* $configure_input  */" \
37504      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37505      || as_fn_error $? "could not create -" "$LINENO" 5
37506  fi
37507 ;;
37508
37509
37510  esac
37511
37512done # for ac_tag
37513
37514
37515as_fn_exit 0
37516_ACEOF
37517ac_clean_files=$ac_clean_files_save
37518
37519test $ac_write_fail = 0 ||
37520  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37521
37522
37523# configure is writing to config.log, and then calls config.status.
37524# config.status does its own redirection, appending to config.log.
37525# Unfortunately, on DOS this fails, as config.log is still kept open
37526# by configure, so config.status won't be able to write to it; its
37527# output is simply discarded.  So we exec the FD to /dev/null,
37528# effectively closing config.log, so it can be properly (re)opened and
37529# appended to by config.status.  When coming back to configure, we
37530# need to make the FD available again.
37531if test "$no_create" != yes; then
37532  ac_cs_success=:
37533  ac_config_status_args=
37534  test "$silent" = yes &&
37535    ac_config_status_args="$ac_config_status_args --quiet"
37536  exec 5>/dev/null
37537  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37538  exec 5>>config.log
37539  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37540  # would make configure fail if this is the last instruction.
37541  $ac_cs_success || as_fn_exit 1
37542fi
37543if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37545$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37546fi
37547
37548
37549# Try to move the config.log file to the output directory.
37550if test -e ./config.log; then
37551  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37552fi
37553
37554# Make the compare script executable
37555$CHMOD +x $OUTPUT_ROOT/compare.sh
37556
37557# Finally output some useful information to the user
37558
37559  # Finally output some useful information to the user
37560
37561  if test "x$CCACHE_FOUND" != x; then
37562    if  test "x$HAS_GOOD_CCACHE" = x; then
37563      CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37564      CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37565    else
37566      CCACHE_STATUS="installed and in use"
37567    fi
37568  else
37569    if test "x$GCC" = xyes; then
37570      CCACHE_STATUS="not installed (consider installing)"
37571      CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37572    else
37573      CCACHE_STATUS="not available for your system"
37574    fi
37575  fi
37576
37577  printf "\n"
37578  printf "====================================================\n"
37579  printf "A new configuration has been successfully created in\n"
37580  printf "$OUTPUT_ROOT\n"
37581  if test "x$CONFIGURE_COMMAND_LINE" != x; then
37582    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37583  else
37584    printf "using default settings.\n"
37585  fi
37586
37587  printf "\n"
37588  printf "Configuration summary:\n"
37589  printf "* Debug level:    $DEBUG_LEVEL\n"
37590  printf "* JDK variant:    $JDK_VARIANT\n"
37591  printf "* JVM variants:   $with_jvm_variants\n"
37592  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37593
37594  printf "\n"
37595  printf "Tools summary:\n"
37596  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37597    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37598  fi
37599  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37600  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37601  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37602
37603  printf "\n"
37604  printf "Build performance summary:\n"
37605  printf "* Cores to use:   $JOBS\n"
37606  printf "* Memory limit:   $MEMORY_SIZE MB\n"
37607  printf "* ccache status:  $CCACHE_STATUS\n"
37608  printf "\n"
37609
37610  if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37611    printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37612    printf "$CCACHE_HELP_MSG\n"
37613
37614  # Print a helpful message on how to acquire the necessary build dependency.
37615  # ccache is the help tag: freetype, cups, pulse, alsa etc
37616  MISSING_DEPENDENCY=ccache
37617
37618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37619    cygwin_help $MISSING_DEPENDENCY
37620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37621    msys_help $MISSING_DEPENDENCY
37622  else
37623    PKGHANDLER_COMMAND=
37624
37625    case $PKGHANDLER in
37626      apt-get)
37627        apt_help     $MISSING_DEPENDENCY ;;
37628      yum)
37629        yum_help     $MISSING_DEPENDENCY ;;
37630      port)
37631        port_help    $MISSING_DEPENDENCY ;;
37632      pkgutil)
37633        pkgutil_help $MISSING_DEPENDENCY ;;
37634      pkgadd)
37635        pkgadd_help  $MISSING_DEPENDENCY ;;
37636    esac
37637
37638    if test "x$PKGHANDLER_COMMAND" != x; then
37639      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37640    fi
37641  fi
37642
37643    printf "$HELP_MSG\n"
37644    printf "\n"
37645  fi
37646
37647  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37648    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37649    printf "will result in longer build times.\n"
37650    printf "\n"
37651  fi
37652
37653  if test "x$FOUND_ALT_VARIABLES" != "x"; then
37654    printf "WARNING: You have old-style ALT_ environment variables set.\n"
37655    printf "These are not respected, and will be ignored. It is recommended\n"
37656    printf "that you clean your environment. The following variables are set:\n"
37657    printf "$FOUND_ALT_VARIABLES\n"
37658    printf "\n"
37659  fi
37660
37661  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37662    printf "WARNING: Your build output directory is not on a local disk.\n"
37663    printf "This will severely degrade build performance!\n"
37664    printf "It is recommended that you create an output directory on a local disk,\n"
37665    printf "and run the configure script again from that directory.\n"
37666    printf "\n"
37667  fi
37668
37669  if test "x$IS_RECONFIGURE" = "xyes"; then
37670    printf "WARNING: The result of this configuration has overridden an older\n"
37671    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37672    printf "proper build. Failure to do so might result in strange build problems.\n"
37673    printf "\n"
37674  fi
37675
37676